From da950e08f274f6ca52ee27066747aad3e9a78bd5 Mon Sep 17 00:00:00 2001 From: Liam Date: Fri, 25 Oct 2024 18:00:15 +0100 Subject: [PATCH] bot stuff --- projects/backend/src/bot/bot.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/backend/src/bot/bot.ts b/projects/backend/src/bot/bot.ts index 1cffde1..55d375f 100644 --- a/projects/backend/src/bot/bot.ts +++ b/projects/backend/src/bot/bot.ts @@ -30,9 +30,14 @@ client.once("ready", () => { export async function initDiscordBot() { console.log("Initializing discord bot..."); + // Setup slash commands client.once("ready", async () => { await client.initApplicationCommands(); }); + client.on("interactionCreate", interaction => { + client.executeInteraction(interaction); + }); + await client.login(Config.discordBotToken!); }