Androz2091 / discord-music-bot

The perfect music bot for your Discord server! 🤘
238 stars 128 forks source link

Duplicate commands #83

Closed oplexz closed 2 years ago

oplexz commented 2 years ago

image I tried readding the bot and reopening Discord, didn't help. I may have messed something up during setup, but I don't see any issues regarding duplicate commands.

oplexz commented 2 years ago

Just found this thread on Stackoverflow, I assume I have both global and guild commands set. Is there any built-in fix, or should I just create a dummy bot to clean both command lists?

oplexz commented 2 years ago

This ended up being a monologue, but oh well, I fixed it:

const Discord = require("discord.js");
const client = new Discord.Client({
    intents: [Discord.Intents.FLAGS.GUILDS]
});

client.login("<token>");

client.on("ready", () => {
    console.log(client.user.tag);
    client.application.commands.set([]);
    client.guilds.cache.get("508605274831978496").commands.set([]);
})