diff options
| author | Andrew Lee <andrew@alee14.me> | 2025-03-29 22:19:55 -0400 |
|---|---|---|
| committer | Andrew Lee <andrew@alee14.me> | 2025-03-29 22:19:55 -0400 |
| commit | 070825d2b779b114a1c345fbca210d324bf34d53 (patch) | |
| tree | 1a62f7676bc46b8bc799e8b4b486fa0ea2879f6f /bot/src/init.js | |
| parent | db6df8c2a3817a753a9b903feb6311c620a91a65 (diff) | |
| download | AleeBot-070825d2b779b114a1c345fbca210d324bf34d53.tar.gz AleeBot-070825d2b779b114a1c345fbca210d324bf34d53.tar.bz2 AleeBot-070825d2b779b114a1c345fbca210d324bf34d53.zip | |
Quote submit stats + input validation for author/year; API changes; Use toString for some stuff
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')); } |
