Clear guild commands on production

to avoid duplicates
This commit is contained in:
Minz committed 2023-05-31 21:39:36 +02:00
1 parent fc927aa664
commit 5a47d0695f
1 file changed
+1
+1
View File
@@ -18,6 +18,7 @@ module.exports = {
console.log("Registering commands..."); console.log("Registering commands...");
if(process.env.ENV === "production") { if(process.env.ENV === "production") {
await rest.put(Routes.applicationCommands(CLIENT_ID), {body: commands }); await rest.put(Routes.applicationCommands(CLIENT_ID), {body: commands });
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, process.env.GUILD_ID), {body: [] }); //Clear Guild commands on prod
console.log("Global commands registered"); console.log("Global commands registered");
} else { } else {
await rest.put(Routes.applicationGuildCommands(CLIENT_ID, process.env.GUILD_ID), {body: commands }); await rest.put(Routes.applicationGuildCommands(CLIENT_ID, process.env.GUILD_ID), {body: commands });