aboutsummaryrefslogtreecommitdiff
path: root/bot/src/init.js
blob: 3557757c817c668c0d28a7864a19758ff0084079 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { syncDB } from './utils/sync.js';
import { apiServer } from './api/server.js';
import { event } from './handlers/event.js';
import { command } from './handlers/command.js';
//import { deployCommands } from './util/deploy.js';

export async function init(client) {
    if (process.env.NODE_ENV === 'development') {
        await syncDB();
    }
    //deployCommands().then(() => console.log('[>] Deployed commands'));
    await apiServer(client);
    await event(client).then(() => console.log('[>] Event module loaded'));
    await command(client).then(() => console.log('[>] Command module loaded'));
}