![]() Click on the little gear to edit the admins channel:Īnd set the channel as a Private Channel by turning the option on: Now we'll make the admins channel available for the bots/users with the admins_roles only. Therefore, click on Create Role:Ĭhoose a role name, admins_role in this case, then click on the bottom right button Save Changes:Ĭlick on the top right ESC button to go back to the main view: All the bots/users having this new role will have an access to the admins channel. We will not use it but instead add a new role. ![]() but there is also this simple way using the Discord interface.įirst click on the server name on the top left:Īmong the tabs that are visible on the left, click on the Roles:Īs you can see, there is already a role called CylabBot. This can be done by adding new bot permissions and implementing more bot features. Which is ensuring that only the users you chose as administrators are able to see and use commands in the admins channel. Ok, that's nice but we still need to do a little something. Here is the basic code you should add to that file: from discord.ext import commandsĭISCORD_TOKEN = "**?")īot.run(DISCORD_TOKEN) Restrict the admins channel with roles Now create a file called bot.py that will serve as the script of your bot. Note that you can find the docs in the discord.py API. You can also directly use pip3 if you installed it: pip3 install discord.py ![]() The first step is to install the discord.py module via pip: python3 -m pip install discord.py Now that we have added a bot on our server in Part 1, let's use it! For the following instructions, it is assumed that you already installed Python3 and are familiar with it. Mailing lists are still in use nowadays but there exists other modern ways like creating a Discord server to chat with a bot that can fulfill many tasks for you and your community! ![]() There are times when you need to manage a community. ![]()
0 Comments
Leave a Reply. |