Skip to content

Commit

Permalink
Clearly it does because it broke now lol. Reverting change
Browse files Browse the repository at this point in the history
  • Loading branch information
natereprogle committed Nov 15, 2023
1 parent ef583a4 commit 9b54033
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/modules/events/ready.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { type Event } from "../../types/Event"
import { loadCommands } from "../utils/commandHandler"
import { getChannels } from "../utils/channelRegistrar"
import CrystalClient from "../../types/CrystalClient"
import type CrystalClient from "../../types/CrystalClient"

module.exports = {
name: "ready",
once: false,
rest: false,
execute: async function (client: CrystalClient): Promise<void> {
await loadCommands(CrystalClient.getClient())
await getChannels(CrystalClient.getClient())
await loadCommands(client)
await getChannels(client)

console.log(`Logged in as ${client.user?.tag}`)
},
Expand Down
3 changes: 1 addition & 2 deletions src/types/CrystalClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ export default class CrystalClient extends Client {

constructor(options: ClientOptions) {
super(options)
CrystalClient.client = this

CrystalClient.commands = new Collection()
CrystalClient.events = new Collection()

void loadEvents(CrystalClient.client)
CrystalClient.client = this

}

static getClient(): CrystalClient {
Expand Down

0 comments on commit 9b54033

Please sign in to comment.