How to Restrict Bots to Certain Channels on Discord

No server in Discord is complete without the addition of bots. Discord bots are always a fun and helpful addition to any server as they can help with many things.

An example is playing music, simple text games, or even functioning as an automatic moderator.

However, bots can sometimes be annoying if things like spam from the commands sent to the bots start cluttering up text channels. Another scenario is someone abusing the bot with instances of spam.

The easiest and most straightforward way to deal with this is to restrict bots to specific channels and prevent certain roles from using the bot.

Here in this article, let’s go over how to restrict bots to specific channels on Discord and only allow certain users to send commands to the bot.

How to Restrict Bots to Certain Channels

To restrict bots, you would want to access your server’s Role list in your Server settings.

Find the role that was created and assigned to the bot you want to be restricted. The role name is usually the bot’s name in Discord.

Open up the role and remove the bot’s “Administrator” privilege underneath the Permissions tab. After that, you can assign the bot any other permissions it might need except for Administrator.

The next thing you want to do is go to the channels you want to stop the bot from accessing. Right-click the channel and select “Edit Channel.”

Swap over to the Permissions tab, and under the Advanced Permissions, add the roles of the Bot/s you want to be restricted. Next, disable the following permissions: View Channel, Send Messages, and Receive Messages.

Repeat this for every other bot and channel you don’t want the bot sending messages. Channels without this modification will allow the bot to function normally.

Below is a step-by-step guide on how to restrict bots to specific channels.

Step 1. Find and Edit the Bot’s Role 

To find the option to modify or create new roles on your server, click on the Server settings in the server menu by clicking on the arrow located on top of the server’s channel list.

You will immediately find the Roles tab under the Overview tab. Selecting this tab will show a list of all the roles on your server.

You can either scroll through or use the search function to find the roles you want to edit. Once you find the role assigned to your bot (Which is usually the bot’s name), click on the “Edit” button to modify its Permissions.

Step 2. Remove “Administrator” in the Bot’s Permissions

Switch over to the Permissions tab of the role. Afterward, look for the “Administrator” permissions and disable them.

Then, give the bot all the necessary permissions it needs to function. If you are unsure about enabling, you can simply enable every permission except for the Administrator.

Repeat this step for every bot on your server.

Step 3. Modify your Channel’s Permissions

Find the channel/s you don’t want the bot to interact with and right-click it. Next, select “Edit Channel” and switch over to the Permissions tab.

In the Permissions tab, underneath the Advanced Permissions, add the bot’s role in the list.

Step 4. Disable Several Permissions

After adding the bot to the role/member list, select it and go over to its permissions. You would need to disable several permissions to prevent the bot from interacting with the channel.

You would need to disable the following: View Channel, Send Messages, and Read Message History. This needs to repeat for every channel you don’t want the bot to interact with.

Step 5. Do the opposite for channels you want the bot to function on

For channels you want the bot to function, you would need to do the opposite of what we did on step 4.

Same as before, add the bot to the channel’s permissions but instead of clicking on the X mark to disable them from interacting with the channel, select the checkmark instead.

How to prevent certain roles from using a Bot

Only a handful of bots in Discord have a built-in function that prevents their usage unless you are assigned a specific role.

If this function wasn’t coded in the bot, you would need to get a little creative to prevent specific roles from using the bot.

Before starting, make sure you properly read the bot’s functions and documentation to check if they have their version of this function. 

If they don’t, you can start by making a new role in your server.

Next, you want to modify a channel’s permissions to forbid everyone else from sending messages except for the role you just created.

 Remember, you would want to modify the channel you restricted the bot to otherwise, they wouldn’t function at all.

With everything set up, you simply have to assign the role to any member in your server if they want to send commands to the bot.

Below is a step-by-step guide on how to prevent certain roles from using a Bot on Discord

Step 1. Make a New Role

The first thing you need to do is make a role that you will be assigning the member/s you want to permit to use the bot.

There aren’t any specific permissions to apply when making this role. You can stick to the default permissions.

Step 2. Modify Channel Permissions

As soon as you finish making the role, go over to the channel your bot isn’t restricted to and modify its Permissions.

Go over to the @Everyone role in the advanced permissions, find the “Send Messages” permission, and disable it.

After that, add the role you just created into the list, and instead of disabling the “Send Messages” permissions, select the checkmark to allow any member with that role to send messages/commands to the channel.

Step 3. Assign the Role

The last thing you’ll have to do is assign the role to any member/s who wants to use the bot.

If they don’t have the role, they can still view the channel the bot is in but won’t be able to send messages/commands to it.

Continue Reading:

Share on facebook
Share on twitter
Share on linkedin
Related Articles

Author