diff --git a/bot/src/index.ts b/bot/src/index.ts index 8cf34a6c8..5e88424ba 100644 --- a/bot/src/index.ts +++ b/bot/src/index.ts @@ -2,6 +2,9 @@ import { Client, Intents } from "discord.js"; import { LoggerLayers } from "./config"; import { registerSlashCommands, slashCommands, SlashCommand } from "./slashCommands/register"; import { createLayeredLogger } from "./utils/logger"; +import { config } from "dotenv"; + +config(); const logger = createLayeredLogger(LoggerLayers.client); @@ -40,8 +43,8 @@ client.on("interactionCreate", async (interaction) => { await client.login(process.env.DISCORD_TOKEN); logger.info(`Logged in successfully to ${client.guilds.cache.size} guilds`); logger.info(`https://discord.com/api/oauth2/authorize?client_id=${client.application.id}&permissions=8&scope=applications.commands%20bot`); - - await registerSlashCommands(client); + + await registerSlashCommands(client); } catch (e) { logger.error("Log in Failed:", e); }