Global commands push cause dev/local commands guild to have duplicates

Hello, I'm currently trying to setup a system where in development I run local commands, but for production I global deploy. The problem is that my dev/local commands guild ends up with duplicates of each command. I read in the discord documentation that the put route should overwrite any commands with the same name, but this seems to only apply within each scope. So if do local deploy it overwrites, but if I then global push it creates new ones within the dev/local guild. If anyone has a solution to this it would be much appreciated! deployCommands.ts: https://codefile.io/f/InFuvMpf1h
5 Replies
d.js toolkit
d.js toolkit11mo 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!
chewie
chewie11mo ago
it doesnt create new ones on the local guild it has guild commands you never delete, and global commands thats just how global/guild commands word they dont get rid of each other
entropy
entropy11mo ago
I see so best would be to just clear guild commands on global push? The only thing is that if I wanted to continue development while the bot is running in production I would cause duplicates again, due to guild commands getting push again. I could just use a separate application for for development I suppose so then I could have the separation.
chewie
chewie11mo ago
yea
entropy
entropy11mo ago
damn ok thank you!