feat: add prod check

This commit is contained in:
TheClashFruit 2024-02-10 14:04:22 +01:00
parent 393806051c
commit a06c0e0abf
Signed by: TheClashFruit
GPG key ID: D61666AC77D1C29F

View file

@ -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 // The put method is used to fully refresh all commands in the guild with the current set
const data = await rest.put( const data = await rest.put(
Routes.applicationGuildCommands('872411739155726336', '1127731341283307520'), process.env.PROD === '1' ? Routes.applicationCommands('872411739155726336') : Routes.applicationGuildCommands('872411739155726336', '1127731341283307520'),
{ body: commandsArray.map(cmd => cmd.builder) }, { body: commandsArray.map(cmd => cmd.builder) }
); );
console.log(`Successfully reloaded ${commands.size} application (/) commands.`); console.log(`Successfully reloaded ${commands.size} application (/) commands.`);