How to delete Application Slash Commands

That's is quick but i accidentally put two commands that do the same (due the other one not showing up) now all tutorials i can find about deleting slash commands is outdated (or just don't work idk), how to do delete slash commands
24 Replies
d.js toolkit
d.js toolkit4mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - Marked as resolved by OP
d.js docs
d.js docs4mo ago
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: [] })
Solar
Solar4mo ago
It didn't work
No description
AlexCdDg
AlexCdDg4mo ago
You haven't defined rest
Solar
Solar4mo ago
How i do that? Like
d.js docs
d.js docs4mo ago
:guide: Creating Your Bot: Registering slash commands - Command registration > Guild commands Add two more properties to your config.json file, which we'll need in the deployment script: read more
AlexCdDg
AlexCdDg4mo ago
Follow that part, and instead of passing commands, pass an empty array (or if you already have the deploy commands file, just modify it and run it) Like here
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Solar
Solar4mo ago
Did i forget to add something?
No description
AlexCdDg
AlexCdDg4mo ago
Looks fine
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
AlexCdDg
AlexCdDg4mo ago
Ah, true
Solar
Solar4mo ago
I didn't put " so how do i fix it?
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Solar
Solar4mo ago
Ok
AlexCdDg
AlexCdDg4mo ago
By, literally putting " "
Solar
Solar4mo ago
Still rest not defined
Unknown User
Unknown User4mo ago
Message Not Public
Sign In & Join Server To View
Solar
Solar4mo ago
Ok Is bot token right?
AlexCdDg
AlexCdDg4mo ago
Yes
Solar
Solar4mo ago
I put in where? Just to don't get anything worng
AlexCdDg
AlexCdDg4mo ago
const rest = new REST().setToken('TOKEN-HERE')
const rest = new REST().setToken('TOKEN-HERE')
Solar
Solar4mo ago
Ok It worked, thanks!
AlexCdDg
AlexCdDg4mo ago
👍