From 070825d2b779b114a1c345fbca210d324bf34d53 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sat, 29 Mar 2025 22:19:55 -0400 Subject: Quote submit stats + input validation for author/year; API changes; Use toString for some stuff --- bot/src/init.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'bot/src/init.js') 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')); } -- cgit v1.2.3