Context menu commands not adding to the Context menu or not updating
Hi, i'm trying to add / remove context menu commands to my bots, i create them similarly to the ones that works fine, but they won't get added to the context menus, and the commands i remove from the bot stays there.
Do i have to do something on the server management side so that it gets refreshed ? or do i have to do something particular with the bot's code ?
Thanks in advance !
8 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!how do you deploy your commands
[email protected]
v16.15.1
in the ready event listener, by walking through my files, like in the documentation
i have a
client.commands
collection that i fill with the command name in command
the code is the same as what's done here :
https://discordjs.guide/creating-your-bot/command-deployment.html#guild-commandsdiscord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
the guide doesnt tell you to run it in your ready btw, its a standalone script
if you followed the exact guide, you need to run the deploy script separately
i figured, but i thought that just putting it in my ready would work just as well
it can, but its bad practise
the reason the script exists is to avoid running it every time your bot (re)starts
its to only run when you add / update commands
i see, well i'll just do that then
i'm guessing i might have issues with how i instanciate my rest client anyway so i'll just copy paste the code from the documentation in a separated script as its supposed to be