The error is that the command is duplicated, although I do not have such a command. #9903
Unanswered
ArtemLakeev
asked this question in
Q&A
Replies: 2 comments
-
Log the commands you're registering and see what it shows and I would recommend joining the Discord server as you can get help there much quicker. |
Beta Was this translation helpful? Give feedback.
0 replies
-
This typically means you have already registered the command with Discord. To fix this, try pushing an empty list to the application commands endpoint: import { Routes } from 'discord.js';
import { REST } from '@discordjs/rest';
const rest = new REST({ version: '10' }).setToken("<your token here>");
await rest.put(Routes.applicationCommands("<your client ID here>"), { body: [] })
.then(() => console.log('Successfully deleted all application commands.'))
.catch(console.error); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to register a command with a slash. I am creating a unique team on my entire server and in the bot. And when you run the code (link: https://guide.discordjs.dev/guide/creating-your-bot/registering-slash-commands ) gives an error that the command is duplicated (Started refreshing application (/) commands.
DiscordAPIError[50035]: Invalid Form Body
1[APPLICATION_COMMANDS_DUPLICATE_NAME]: Application command names must be unique) please help
Beta Was this translation helpful? Give feedback.
All reactions