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 toolkit2mo 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/luna2mo ago
use global commands
d.js docs
d.js docs2mo ago
:guide: Creating Your Bot: Registering slash commands - Command registration > Global commands read more
constt 🎄❄
constt 🎄❄OP2mo ago
thx ill look at it
Kinect3000
Kinect30002mo ago
Just remember to remove the guild commands you deployed
constt 🎄❄
constt 🎄❄OP2mo ago
remove?
Kinect3000
Kinect30002mo ago
Yes
constt 🎄❄
constt 🎄❄OP2mo ago
how would i remove the,
treble/luna
treble/luna2mo ago
deploy an empty array
constt 🎄❄
constt 🎄❄OP2mo ago
ah okay
constt 🎄❄
constt 🎄❄OP2mo 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/luna2mo ago
no .
constt 🎄❄
constt 🎄❄OP2mo ago
did it
treble/luna
treble/luna2mo ago
Not in the code you showed
constt 🎄❄
constt 🎄❄OP2mo 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/luna2mo ago
did you refresh your discord client
constt 🎄❄
constt 🎄❄OP2mo ago
Oh thats for sure it u mean like CTRL+R
treble/luna
treble/luna2mo ago
yes
Want results from more Discord servers?
Add your server