To start with, I'm new to discord bot development. I've created and deployed a bot with a slash command and added the bot in a server, where I'm an admin myself. I have already set the bot and its slash command, under Sever Setting/Integration, to be used in a test channel only for everyone. Things works as I expected for non-admin users. They can use the slash command only in the test channel I specified in Integration. However, I noticed that admin users have access to the slash command in ANY channels. Is there a way to prevent that? Limiting admin users to use the command only in the specified test channel only?
I've try to override the command permission in Integration for the command itself to specify the test channel. But nothing's changed. Admins still have access to the command and every channels in the server.
Sadly it's not possible to "hide" the slashcommands for admin users as the admin privilege overrides these settings. The only way you can achieve something like this is by pre-defining every blacklisted channel within your code and not executing the commands. You could just delete the interaction response or however you would like to handle this.