From eb40c4d736763b84c7e8aa12a25f5e615204fd5f Mon Sep 17 00:00:00 2001 From: neru Date: Sat, 10 Jan 2026 10:11:18 -0300 Subject: [PATCH] feat: use cmd manager --- src/bot.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/bot.ts b/src/bot.ts index 51480fb..018b150 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -10,6 +10,7 @@ import { } from 'discord.js'; import { Logger } from './utils/log'; import { config } from './utils/config'; +import { CommandManager } from './commands'; type BotEventListeners = { messageCreate: (message: Message) => void; @@ -23,6 +24,7 @@ export class Bot { private readonly token: string; private readonly clientId: string; + private cmdMgr: CommandManager; private readonly log: Logger; @@ -38,6 +40,7 @@ export class Bot { this.token = config.token; this.clientId = config.client_id; + this.cmdMgr = new CommandManager('./commands'); } public async init(): Promise { @@ -46,6 +49,9 @@ export class Bot { if (this.client) throw new Error('Client already exists, was init called twice?'); + this.log.info('Loading commands'); + await this.cmdMgr.init(); + this.log.info('Instantiating client'); this.client = new Client({ intents: [