set guild-only commands

is there any way to set some commands to be only available in certain guilds with IDs, and other commands get deployed globally?
9 Replies
d.js docs
d.js docs3y ago
• What's your exact discord.js npm list discord.js and node node -v version? • Post the full error stack trace, not just the top part! • Show your code! • Explain what exactly your issue is. • Not a discord.js issue? Check out #useful-servers.
Jaworek
Jaworek3y ago
guild.commands.set([ uniqueCommands ])
d.js docs
d.js docs3y ago
property Guild#commands A manager of the application commands belonging to this guild
⚡AmirhN
⚡AmirhNOP3y ago
will this prevent them from showing up on other guilds tho?
d.js docs
d.js docs3y ago
guide Interactions: Registering slash commands - Guild commands read more
Jaworek
Jaworek3y ago
yeah
⚡AmirhN
⚡AmirhNOP3y ago
thanks so, just setting them on one guild will remove it from others too? or do i have to remove them from client.commands.set and move them in guild.commands.set oooh, sooooo, the deploy-commands.js is actually same as guild.commands.set/create? they're doing the same thing? if yes i got it and ill handle this
Jaworek
Jaworek3y ago
create is only creating single command yeah having in globall and guild will duplicate command
⚡AmirhN
⚡AmirhNOP3y ago
gotcha thanks!
Want results from more Discord servers?
Add your server