Skip to content

A discord bot which allows users to have only the highest role in a defined list.

License

Notifications You must be signed in to change notification settings

zluckytraveler/Discord-Hierarchy-Roles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DISCORD HIERARCHY ROLE BOT

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.

SETUP

STEP 1

Download this repository HERE

STEP 2

Learn how to create a Discord Bot and find a Discord ID.

If you already know how to do this continue to STEP 3.

DISCORD BOT

  1. Go to Discord Developer
  2. Create a Application.
  3. Create a Bot.
  4. Enable intents for PRESENCE INTENT, SERVER MEMBERS INTENT, MESSAGE CONTENT INTENT
  5. Create a token by selecting Reset Token, then copy and save the token, you will need it later.
  6. Under OAuth2 select URL Generator, then enable bot & Administator under Scopes & Permissions.
  7. Copy the generated url at he bottom of the page, and paste it into your browsers address bar.
  8. Follow the Discord popup steps for inviting the bot to your Discord server.

DISCORD ID

  1. Login to your Discord Account.
  2. Select the gear icon to open your user settings.
  3. Select the Advance tab on the side bar.
  4. Enable developer mode.
  5. Right click on your Role.
  6. Now copy the ID.

STEP 3

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.


INSTALL

DOCKER CLI

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

DOCKER BUILD

STEP 1

Change the directory to where the files are stored.

cd <PATH TO DIRECTORY>

STEP 2

Build the image. The image name must be all lowercase without any spacing

docker build -t <YOUR IMAGE NAME> .

STEP 3

Start the container by using the Docker run command.

docker run -d --restart=unless-stopped <YOUR IMAGE NAME>

LOCAL

STEP 1

Change the directory to where the files are stored.

cd <PATH TO DIRECTORY>

STEP 2

Install the requirements.

pip3 install -r requirements.txt

STEP 3

Run the Bot.

python3 app.py

About

A discord bot which allows users to have only the highest role in a defined list.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published