Do we've to register slash command for each server the bot is in ?

I can't make it more clear but I will try : If I'm making a bot that can run on many servers.. Imagine a Bot that helps for a specific topics, for each server he's in, do I've to register the commands for each servers ? Or one deployment is enough ... until I add or edit the command
7 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!
Ninhache
NinhacheOP11mo ago
14.14.1 & 20.11 in case..
mallusrgreat
mallusrgreat11mo ago
you can just set commands globally, if the commands are exactly the same
Ninhache
NinhacheOP11mo ago
But the script requires a guild id ? Can I Omit it to make it globally ?
d.js docs
d.js docs11mo ago
Suggestion for @Ninhache: :guide: Creating Your Bot: Registering slash commands - Command registration > Global commands read more
NyR
NyR11mo ago
You just need to change the route, applicationGuildCommands --> applicationCommands The latter only takes client id (given that you are registering globally)
Ninhache
NinhacheOP11mo ago
Oh my bad Didnt see the "global" section

Did you find this page helpful?