From a06c0e0abf7fd9b3fa5108fd0f09be703fbeb09d Mon Sep 17 00:00:00 2001 From: TheClashFruit Date: Sat, 10 Feb 2024 14:04:22 +0100 Subject: [PATCH] feat: add prod check --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index b829620..802f7a3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,8 +32,8 @@ const rest = new REST().setToken(process.env.TOKEN!); // The put method is used to fully refresh all commands in the guild with the current set const data = await rest.put( - Routes.applicationGuildCommands('872411739155726336', '1127731341283307520'), - { body: commandsArray.map(cmd => cmd.builder) }, + process.env.PROD === '1' ? Routes.applicationCommands('872411739155726336') : Routes.applicationGuildCommands('872411739155726336', '1127731341283307520'), + { body: commandsArray.map(cmd => cmd.builder) } ); console.log(`Successfully reloaded ${commands.size} application (/) commands.`);