From 74ddbf1c137296b52c1d49fd78cfaa5a0a417d7b Mon Sep 17 00:00:00 2001 From: Matthew R Date: Wed, 15 Apr 2020 15:12:17 -0400 Subject: [PATCH] call Client#loadIntervals and Client#loadDatabase on startup --- src/main.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 28aa51e..e792bb0 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,10 +4,12 @@ import { Client } from './class'; async function main(): Promise { const read = await fs.readFile('../config.yaml', 'utf8'); - const config: { token: string, prefix: string, guildID: string } = parse(read); + const config: { token: string, prefix: string, guildID: string, mongoDB: string } = parse(read); const client = new Client(config.token, { defaultImageFormat: 'png' }); client.config = config; + await client.loadDatabase(); client.loadPlugins(); + await client.loadIntervals(); await client.loadEvents(); await client.loadCommands(); client.connect();