#My Slash Commands Are Registering 2 Times And Same Command Exist 2 Times
26 messages · Page 1 of 1 (latest)
• 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.
Pls send your code
Handler Code???
once on the guild, once globally
sure, redeploy to global with the list you want
Bust How TO Delte
if none - empty list
didnt undersood
don't know what more to say
you send a list of commands you want to be there
if you want something to not be on that list, don't send it when you deploy global commands
To remove them, simply send an empty array.
kk
Something I went through myself
What I did to resolve this is:
Whenever the bot is launched
- delete all guild command (test environment) or delete all global command (production environment)
- deploy all command either on guild or global depending on the environment
This way you don't end up with duplicates AND you remove old / deprecated / dropped / removed commands so that no garbage is kept along the way
Be careful, to my knowledge, Discord is limiting you from creating and deleting global commands, iirc it's 200 per day
that's such a bad suggestion... you should deploy commands when you know you changed arguments, not every time the bot restarts
additionally you even suggest a two-operation flow that can be done in one, you don't need to delete all and then deploy, you can do that by just deploying the ones you want to keep/the new status
depending on the amount of guilds that suggestion becomes even worse, of course