Command dissapears
Hi there so I have this little issue with one of my new commands
some useless background information. My bot is hosted on my linux server that I recently have moved it to from AWS to a cloud server
everything was working perfect until I added a new command. So one day I added a new command to my command folder, I use ssh in VSCode to edit all my files, add new files etc.
My new command has been added to the correct folder with all the other commands, usually I wouldn't need to rerun the deploy commands.js file in order to update the commands as I will just use to update the commands as the index will run deploy-commands.js, but I noticed since I switched to the new cloud server it didn't show the new command, after clearing my discord cache (crtl+r/cmd+r), it still didn't work. so I'm confused why it doesn't work, I run deploy-commands.js manually and clear my cache again in order to hopefully view the command in the list, hmm it worked but after a few minutes I wanted to rerun the command and I get the error , so I clear my discord cache again to check if it's still there and no it's not there anymore, I can do this over and over again but it keeps removing the command from the list, I am unsure what the possible problem could be. I will post the code as I don't think this is anything server related.
while running the deploy-commands.js it will also say the correct amount of commands so nothing wrong there, if you know anything more or suggestions for me please give me a ping so I get notified of any updates in the channel
appreciate the time for reading this and possible answers ❤️
11 Replies
- 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 OPShow your deploy script. The above snippet is irrelevant (at least in this context)
would seem odd to me if it was the deploy script as every time I have updated commands it worked fine
And it logs the commands length correctly when you deploy?
yes sir it does
Instead of logging
commands.length
try logging the returned data.length from the PUT
request. If it is still the same, then I suspect it is issue with discord client cache or something.deploy-commands gets manually ran, cache gets cleared and the command is there, few min later command stops working, I clear my cache again it's gone, very very odd
Maybe you can check on a different device
uhmm possibly actually
database etc does work on the new server, turning the old server off rn
have turned it off, will check in a minute
as of rn
should stop working soon
(unless it is because of the other server)
yeah must've been the other server
usually it should've been gone by now
appreciate ya'll for the replies