register commands for multiple servers

i got the code for my command register file from the docs. there you need to input a guild id, but what if you can add my bot to multiple discord servers then i cant just all copy in ids right? how would i do that? is there a way to like globaly register commands?
18 Replies
d.js toolkit
d.js toolkit4mo 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! - Marked as resolved by OP
treble/luna
treble/luna4mo ago
use global commands
d.js docs
d.js docs4mo ago
:guide: Creating Your Bot: Registering slash commands - Command registration > Global commands read more
constt.mh
constt.mhOP4mo ago
thx ill look at it
Kinect3000
Kinect30004mo ago
Just remember to remove the guild commands you deployed
constt.mh
constt.mhOP4mo ago
remove?
Kinect3000
Kinect30004mo ago
Yes
constt.mh
constt.mhOP4mo ago
how would i remove the,
treble/luna
treble/luna4mo ago
deploy an empty array
constt.mh
constt.mhOP4mo ago
ah okay
constt.mh
constt.mhOP4mo ago
is this right?
const data = await rest.put(
Routes.applicationGuildCommands(process.env.CLIENT_ID),
{ body: commands }
);
const data = await rest.put(
Routes.applicationGuildCommands(process.env.CLIENT_ID),
{ body: commands }
);
No description
treble/luna
treble/luna4mo ago
no .
constt.mh
constt.mhOP4mo ago
did it
treble/luna
treble/luna4mo ago
Not in the code you showed
constt.mh
constt.mhOP4mo ago
yea ik but i changed it now to applicationCommands but on my guild i dont see the command (i registerd it too)
treble/luna
treble/luna4mo ago
did you refresh your discord client
constt.mh
constt.mhOP4mo ago
Oh thats for sure it u mean like CTRL+R
treble/luna
treble/luna4mo ago
yes

Did you find this page helpful?