Why might a slash command delete itself after one use?

Hi. I just created a command for my bot which works as expected the first time, and then just deletes itself from the registry afterwards. I can only think the issue comes from sharding, since I recently created the sharding manager to experiment and have it ready. Any ideas?
No description
No description
12 Replies
d.js toolkit
d.js toolkit2mo 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
treble/luna
treble/luna2mo ago
you should not redeploy your commands every time your bot starts use the REST script and deploy when you make changes
Swyftey
SwyfteyOP2mo ago
Oh. Hm What's the best way to handle that then?
treble/luna
treble/luna2mo ago
Oh nvm, i read that wrong, my bad (unless you actually make the PUT call later on)
Swyftey
SwyfteyOP2mo ago
I do You are right, I have a "registerCommands" method firing on every launch
Swyftey
SwyfteyOP2mo ago
No description
treble/luna
treble/luna2mo ago
Though your issue does not really appear to be related to your commands, still something to note though
Swyftey
SwyfteyOP2mo ago
Alright Just in case, I'll fix up the method
treble/luna
treble/luna2mo ago
As for whats causing your issue, i havent seen that message a lot, perhaps try asking in ddevs or wait until someone else might answer
Swyftey
SwyfteyOP2mo ago
Thank you
Swyftey
SwyfteyOP2mo ago
No description
Swyftey
SwyfteyOP2mo ago
It is working fine now I think it was the rest (register commands) thing. I think Discord literally just updated to the halloween event for me, so maybe the API was bogged down or something.
Want results from more Discord servers?
Add your server