A Discord bot that assigns a role to a user when they send a message and removes it after a fixed time.
-
Follow the instructions in create-discord-bot.
Don't forget to give your bot the
Manage Roles
permission! -
Download this bot and move the
src-discord-active-role-bot
folder into the /src/bots folder from step 1. -
Open config.json to configure your own settings:
[ { "guildId": "258167954913361930", "roleId": "682035618536095779", "roleDuration": 43200 } ]
Add as many rules as you want to configure for other servers.
guildId
is the server id.roleId
is the role to grant on activity.roleDuration
(in seconds) is how long the role is given to the member before it is removed.
-
npm start
to run the bot.
Visit for more help or information!