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 toolkit8mo 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
NinhacheOP8mo ago
14.14.1 & 20.11 in case..
mallusrgreat
mallusrgreat8mo ago
you can just set commands globally, if the commands are exactly the same
Ninhache
NinhacheOP8mo ago
But the script requires a guild id ? Can I Omit it to make it globally ?
d.js docs
d.js docs8mo ago
Suggestion for @Ninhache: :guide: Creating Your Bot: Registering slash commands - Command registration > Global commands read more
NyR
NyR8mo ago
You just need to change the route, applicationGuildCommands --> applicationCommands The latter only takes client id (given that you are registering globally)
Ninhache
NinhacheOP8mo ago
Oh my bad Didnt see the "global" section
Want results from more Discord servers?
Add your server