Slash command only for bot owner

How to set permissions that some command can only visible to bot owner across all servers bot is in?
4 Replies
d.js toolkit
d.js toolkit9mo 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 staff
duck
duck9mo ago
there isn't really a way to do that admins will always be able to use any application command available in the server therefore if you really have need of commands that only you can see/use, the best way to achieve this would be to deploy them separately as guild commands to a server you control rather than globally
Danial
Danial9mo ago
(Accidentally marked it as resolved, sorry about that)
bumpy
bumpy8mo ago
If you are ok with a command that server admins could see, but only the bot owner could use, you could simply test to see if the command user’s id matched the bot owner’s id.