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
d.js toolkit
d.js toolkit16mo 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!
treble/luna
treble/luna16mo ago
how do you deploy your commands
Nenrikido
NenrikidoOP16mo ago
Nenrikido
NenrikidoOP16mo ago
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-commands
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
treble/luna
treble/luna16mo ago
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
Nenrikido
NenrikidoOP16mo ago
i figured, but i thought that just putting it in my ready would work just as well
treble/luna
treble/luna16mo ago
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
Nenrikido
NenrikidoOP16mo ago
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
Want results from more Discord servers?
Add your server