Discord.js v13 Slash commands are duplicated
Hello , I was registering slash commands but I ran into an error:
24[APPLICATION_COMMANDS_DUPLICATE_NAME]: Application command names must be unique
I checked the specified guild and I saw that the commands are duplicated. Why?
Code:
Notes: Using discord.js v13.8.0 node.js v1610 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.as in two of each command?
yep
Tag suggestion for @pooyaneftekhari:
If you have duplicate commands on your server, you registered both global and guild commands.
You can remove the duplicates by resetting either the global or guild commands
• Resetting global commands:
rest.put(Routes.applicationCommands(clientId), { body: [] })
• Resetting guild commands: rest.put(Routes.applicationGuildCommands(clientId, guildId), { body: [] })
the tag shows the fix
lemme check
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
no
this is main.js
just do the fix as in the tag