A discord bot which allows users to have only the highest role in a defined list.
The bot will not modify any user's roles that you do not define in your config.yml
file, keeping them safe from removal.
Download this repository HERE
Learn how to create a Discord Bot and find a Discord ID.
If you already know how to do this continue to STEP 3.
- Go to Discord Developer
- Create a Application.
- Create a Bot.
- Enable intents for
PRESENCE INTENT
,SERVER MEMBERS INTENT
,MESSAGE CONTENT INTENT
- Create a token by selecting
Reset Token
, then copy and save the token, you will need it later. - Under
OAuth2
selectURL Generator
, then enablebot
&Administator
underScopes
&Permissions
. - Copy the generated url at he bottom of the page, and paste it into your browsers address bar.
- Follow the Discord popup steps for inviting the bot to your Discord server.
- Login to your Discord Account.
- Select the gear icon to open your user settings.
- Select the Advance tab on the side bar.
- Enable developer mode.
- Right click on your Role.
- Now copy the ID.
Add your Discord Bot Token and Role ID's to config.yml
, and save the file.
You can add as many Role ID's you want to the file by creating a new entry, it has no limit. The first Role ID is going to be highest role that you define, with every role below being in a lower position in the hierarchy.
Simply run the command.
docker run --name Hierarchy-Role-Bot -d --restart=unless-stopped -v /PATH TO CONFIG/:/app/config.yml zluckytraveler/discord-hierarchy-roles
Change the directory to where the files are stored.
cd <PATH TO DIRECTORY>
Build the image. The image name must be all lowercase without any spacing
docker build -t <YOUR IMAGE NAME> .
Start the container by using the Docker run command.
docker run -d --restart=unless-stopped <YOUR IMAGE NAME>
Change the directory to where the files are stored.
cd <PATH TO DIRECTORY>
Install the requirements.
pip3 install -r requirements.txt
Run the Bot.
python3 app.py