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 docs2y 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
Jaworek2y ago
guild.commands.set([ uniqueCommands ])
d.js docs
d.js docs2y ago
property Guild#commands A manager of the application commands belonging to this guild
⚡AmirhN
⚡AmirhN2y ago
will this prevent them from showing up on other guilds tho?
d.js docs
d.js docs2y ago
guide Interactions: Registering slash commands - Guild commands read more
Jaworek
Jaworek2y ago
yeah
⚡AmirhN
⚡AmirhN2y 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
Jaworek2y ago
create is only creating single command yeah having in globall and guild will duplicate command
⚡AmirhN
⚡AmirhN2y ago
gotcha thanks!