Skip to content

A discord bot to automatically assign roles to users whenever they rejoin the server.

License

Notifications You must be signed in to change notification settings

shawwn/auto_assign_role

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto_assign_role

A discord bot to automatically assign roles to users whenever they rejoin the server.

quickstart

Follow the discord bot setup guide. Then...

git clone https://github.com/shawwn/auto_assign_role
cd auto_assign_role
pip3 install -r requirements.txt

echo 'DISCORD_TOKEN=replace this text with your discord token' > .env

DISCORD_ROLES='role1,role2' DISCORD_USERS='you#1234,someone#9999' python3 auto_assign_role.py

Whenever you#1234 or someone#9999 joins the server (or sends a message), the bot will verify that they have roles role1 and role2.

NOTE: In server settings -> roles, your bot's role must be above all the roles you wish to grant in the roles list. This confused me for some time. :)

(The bot also needs the "Manage Roles" permission, obviously. I also gave it "View Channels" for good measure, though I have no idea whether this is required.)

license

MIT.

credits

Thanks to Lucas Nestler for the initial proof of concept!

About

A discord bot to automatically assign roles to users whenever they rejoin the server.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages