diff --git a/bot/src/index.ts b/bot/src/index.ts index 28c1ad831..1027fbf2f 100644 --- a/bot/src/index.ts +++ b/bot/src/index.ts @@ -38,9 +38,11 @@ client.on("interactionCreate", async (interaction) => { logger.info(`Running on ${process.env.ENV} environment`); 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); + logger.info( + `https://discord.com/api/oauth2/authorize?client_id=${client.application.id}&permissions=8&scope=applications.commands%20bot` + ); + + await registerSlashCommands(client); } catch (e) { logger.error("Log in Failed:", e); } diff --git a/bot/src/slashCommands/register.ts b/bot/src/slashCommands/register.ts index e305ea24a..a7e97e715 100644 --- a/bot/src/slashCommands/register.ts +++ b/bot/src/slashCommands/register.ts @@ -33,22 +33,16 @@ export const registerSlashCommands = async (client: Client): Promise => { if (process.env.ENV === "PROD") { logger.info("Registering global slash commands"); - await rest.put( - Routes.applicationCommands(client.application.id),{ - - body: slashCommands.map((command) => command.info) - } - ); + await rest.put(Routes.applicationCommands(client.application.id), { + body: slashCommands.map((command) => command.info) + }); } else { logger.info("Registering guild slash commands"); await tidyOldGuildCommands(client); - await rest.put( - Routes.applicationGuildCommands(client.application.id, process.env.DEV_SERVER_ID), - { - body: slashCommands.map(command => command.info) - } - ); + await rest.put(Routes.applicationGuildCommands(client.application.id, process.env.DEV_SERVER_ID), { + body: slashCommands.map((command) => command.info) + }); } logger.info("Successfully registered slash commands");