diff options
Diffstat (limited to 'bot/src/init.js')
| -rw-r--r-- | bot/src/init.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/bot/src/init.js b/bot/src/init.js index 3557757..45b9a41 100644 --- a/bot/src/init.js +++ b/bot/src/init.js @@ -5,11 +5,15 @@ 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(); + try { + 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')); + } catch (e) { + console.error(e); } - //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')); } |
