feat: implement db
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
|||||||
import { Logger } from './utils/log';
|
import { Logger } from './utils/log';
|
||||||
import { config } from './utils/config';
|
import { config } from './utils/config';
|
||||||
import { CommandManager } from './commands';
|
import { CommandManager } from './commands';
|
||||||
|
import { DatabaseManager } from './modules/db';
|
||||||
|
|
||||||
type BotEventListeners = {
|
type BotEventListeners = {
|
||||||
messageCreate: (message: Message) => void;
|
messageCreate: (message: Message) => void;
|
||||||
@@ -46,6 +47,12 @@ export class Bot {
|
|||||||
this.log.info('Loading commands');
|
this.log.info('Loading commands');
|
||||||
await this.cmdMgr.init();
|
await this.cmdMgr.init();
|
||||||
|
|
||||||
|
this.log.info('Configuring database');
|
||||||
|
DatabaseManager.get.init(
|
||||||
|
this.cmdMgr.getUserKeys(),
|
||||||
|
this.cmdMgr.getGuildKeys()
|
||||||
|
);
|
||||||
|
|
||||||
this.log.info('Instantiating client');
|
this.log.info('Instantiating client');
|
||||||
this.client = new Client({
|
this.client = new Client({
|
||||||
intents: [
|
intents: [
|
||||||
|
|||||||
Reference in New Issue
Block a user