call Client#loadIntervals and Client#loadDatabase on startup
parent
0df3168864
commit
74ddbf1c13
|
@ -4,10 +4,12 @@ import { Client } from './class';
|
||||||
|
|
||||||
async function main(): Promise<void> {
|
async function main(): Promise<void> {
|
||||||
const read = await fs.readFile('../config.yaml', 'utf8');
|
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' });
|
const client = new Client(config.token, { defaultImageFormat: 'png' });
|
||||||
client.config = config;
|
client.config = config;
|
||||||
|
await client.loadDatabase();
|
||||||
client.loadPlugins();
|
client.loadPlugins();
|
||||||
|
await client.loadIntervals();
|
||||||
await client.loadEvents();
|
await client.loadEvents();
|
||||||
await client.loadCommands();
|
await client.loadCommands();
|
||||||
client.connect();
|
client.connect();
|
||||||
|
|
Loading…
Reference in New Issue