sudo apt install -y python3-pip
Install modules (second should be allready installed):
pip install --upgrade pip
pip install discord.py python-dotenv asyncio
Install App settings DEV
You must be developer, then add new application and copy TOKEN to .env.
- OAuth2 -> URL Generator, check BOT and Manage Roles. Then copy URL and run it.
- Bot -> Create New
- Bot -> Privileged Gateway Intents, check Presence Intent, Server Members Intent and Message Content Intent.
- Copy TOKEN
- Deploy. Can use service like Replit to host script.
App/OAuth2 -> URL Generator -> check BOT -> Permissions: Manage Roles, Send Messages.
After add bot thru OAuth2 URL, enter server roles and move up and down to choose which roles bot can give or remove. All roles below bot's role are manageable for bot. Now you can add bot's role to channel of choice.