Restrict bots to certain channels

Comments

24 comments

  • NexusTheBrony

    Or, u could have the role bu default not hav permission to anything and enable for each channel it should hav access to...

    4
  • SamBro2901
    If this was ever implemented, you'd have to assign the bot perms to "Send Messages" in channels you'd want it to send in. This has more disadvantages to the advantages it has.
    -9
  • Gaetano96

    I don't get why all the downvotes. I want this feature.

    It is tedious to manually deny access to the bots (or even to roles for humans) on all channels, and I don't get why Discord can't just add the "Read messages" permission setting for all channels simultaneously.

    What are these "disadvantages" you're talking about, SamBro2901 ? (replying to this comment)

    25
  • Hydriin

    I believe that this would be a useful feature.

    7
  • blaze.

    Yeah, make it so you can edit channels and turn off the use of bot commands on them

    3
  • i have made a bot but is a restrict it i get a error so how to restrict it?

     

    0
  • mrTayto19

    How do you restrict them from certain channels

    18
  • KoreoBace

    For some reason it doesn’t work. I tried restricting Rythm only to a few channels but it still responds in other channels even though I made it unable to read or send messages in them.

    3
  • senan

    In response to KoreoBace, that's usually because the bot has the "Administrator" box checked in its permissions or in one of its roles. Administrator perms means it can access any channel and see everything in the server, regardless of what permissions you assign. Disabling that permission usually solves it.

    7
  • KoreoBace

    Thanks for the help!

    0
  • egg

    thanks so much senan

    0
  • MrGadget

    So this is the only permission my simple bot role has, and the bot is still visible in all public channels and still listening to everything.

    I really don't want to add the role to every channel just to block it, nor remember to do that for every channel that's created going forward.

    The intended way to interact with the bot is by DM only.

    0
  • Fox PW

    I think this feature would be great,I dont like bots spamming in other channels. :/

    2
  • Kessel

    So the way we have it set up is to have all the channels under one category. Then create a new role called 'Bots' and add it to the category's permission list and set 'read/manage/send' messages to 'Deny'.

    All the channels underneath that category will sync its permissions. Just assign the 'Bots' role to any bots you have and they'll automatically be denied access to all the channels under that category. NB: Make sure no bots have the 'administrator' role as this will overwrite the permissions.

    Then for any channel that you actually want a bot to have access to, add that bot to the channel permission list directly and allow 'read/send/manage messages'.

    For example, for a 'music request' channel, you'd add something like the Groovy bot to the channel's permission list and set to allow. The 'music request' channel still has the 'Bots' role set to 'Deny' so other bots can't read it but Groovy now has explicit permission and can interact here, even though it also has the 'Bots' role assigned to it.

    Then you just have to remember to assign the 'Bots' role to any new bots you add in future, and they'll automatically be denied access to your channels unless you explicitly give them rights to a specific one.

    Hope that helps!

    6
  • Sasha — SuperJelly.us

    @Kessel

    There are loads of servers with dozens of categories. Moving all channels to one category is not desirable. 

    Copy   |   Append   |   Search
    1
  • Kessel

    Of course. You'd just have to add the permissions for the bots role to each of the categories. Just meant you'd have to do the permissions on the one category only rather than on each channel. 12+ categories is still way less than all channels.

    2
  • _.𝓟𝓾𝓶𝓢𝓴𝓪𝓡._

    If you remove the bot's administrator permisions it just dissapears from the server so it doesn't  work! Any other ideas on how to do this?

     

    0
  • Stefani Kwan

    after removing bot's administrator permissions it "looks like" it disappears from the server but it's still there. Create a new channel, select Edit Channel, select Permissions, click the plus sign under Roles/Members find the BOT as either role or member, give it permission to read and write, then BOT will appear only in that channel.

    1
  • aragorn

    EDITED: previous answer was a bit long.

     

    Shortest way:-

    (1)for all bots go to server->settings->roles->select bot

    (2)scroll to bottom and select "clear role permission"

    (3)do 1 and 2 for all bots

    (4)go to specific channel->setting->permissions->add bot/role

    (5)allow permissions you want for the sepcific bot. (the green tick box, not neutral box)

    (all other bots wont be able to do anything to any channel, only the bot you allow in step 4+5 will have access to your specific channel)

    0
  • mr stevey

    ShreshthTiwari only works if your bot is in one server.

    0
  • Trekkie

    I'm surprised this is such an old request with little votes.   I would think you could also go for a 'channel' bot and a 'sever' bot level permission or something, utility bots like dic rollers or RPG systems would greatly benefit from being able to put the DND5E bot in one channel and Pathfinder 2E in the other, or Star Trek bot, etc.   But then there's the overall 'moderation' bot that could be system level.

    0
  • MinishCap

    This should be a priority item. Why is it not implemented? a spammer can easily use up the bot server's resources by repeatedly calling them from any channel. Isn't this a security concern?

     

    1
  • Nemirious

    @TheWeebOfTheProphecy You can restrict Spawns to a certain channel only :) I did it myself, because it really does get annoying when they spawn anywhere. The command for it would be your prefix, followed by “restrict” and the channel you wish to restrict the spawns to. As an ex, my prefix is !, so I would say


    !redirect #pokémon

    1
  • brandav

    I went to Server settings -> Integrations, and under Bots and Apps, clicked on Manage for the bot. Then I could restrict roles, users, and channels from the bot's commands. To test I had to switch to a test account, but you can also view the server as a specific role, just go to Roles, select the role and click View Server As Role at the bottom of the page.

    0

Please sign in to leave a comment.