fix: load token from config mgr instead of storing
This commit is contained in:
+1
-7
@@ -21,9 +21,6 @@ type BotEventListener<K extends keyof BotEventListeners> = BotEventListeners[K];
|
||||
|
||||
export class Bot {
|
||||
private client: Client | undefined;
|
||||
|
||||
private readonly token: string;
|
||||
private readonly clientId: string;
|
||||
private cmdMgr: CommandManager;
|
||||
|
||||
private readonly log: Logger;
|
||||
@@ -37,9 +34,6 @@ export class Bot {
|
||||
*/
|
||||
private constructor() {
|
||||
this.log = new Logger('Bot');
|
||||
|
||||
this.token = config.token;
|
||||
this.clientId = config.client_id;
|
||||
this.cmdMgr = new CommandManager('./commands');
|
||||
}
|
||||
|
||||
@@ -79,7 +73,7 @@ export class Bot {
|
||||
);
|
||||
|
||||
this.log.info('Logging in...');
|
||||
await this.client.login(this.token);
|
||||
await this.client.login(config.token);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user