Skip to content

Commit

Permalink
Update bot.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
duckodas committed Oct 17, 2023
1 parent 903a0b6 commit 16aa10f
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/bot/src/bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,16 @@ export class DiscordClient extends Client {
this.cluster = new ClusterClient(this);
}
public async loadClient() {
if (this.cluster.maintenance)
logger.info(`${this.user?.username} on maintenance mode with ${this.cluster.maintenance}`);

this.cluster.on('ready', async () => {
await loadCommands(this);
await loadEvents(this);
this.cluster.on('ready', () => {
loadEvents(this)
.then(() => {
loadCommands(this);
})
.catch((error) => {
console.error(error);
});
});

await this.startClient();
}
public async startClient() {
Expand Down

0 comments on commit 16aa10f

Please sign in to comment.