To see more of my work, including more screenshots, go to https://kingrabbit.dev/
Role Assignment System (RAS) manages roles for a community server. The bot allows users to assign or unassign themselves specific roles by reacting with corresponding emojis to a message. The bot can also automatically display the list of available roles and the emojis associated with them for each panel of roles. Alternatively, users can have reaction roles added to a message sent by themself, another user, or another bot. Users are able to view their current roles and all available roles at any time through the /roles
command. Server staff can setup and manage reaction roles and panels through the /reaction-role
command.
<>
required parameter
[]
optional parameter
This is the public command usable by all server members.
- This command allows users to view what reaction roles they currently have selected.
- This command allows users to view a list of all available reaction roles across all available panels.
This is the staff-only command used to manage reaction roles and panels.
- This creates a panel of reaction roles which automatically updates to show a list of the roles it provides. Users can alternatively just use their own messages.
-
This adds a reaction role to a message. If the targeted message is a panel (created with
/reaction-role create ...
), then the message will be automatically updated to include the new role. -
This removes a reaction role from a message. If the targeted message is a panel (created with
/reaction-role create ...
), then the message will be automatically updated to remove the old option. Theemoji
parameter tab completes based on what emojis are on the provided message. -
This edits a panel (created with
/reaction-role create ...
)'s title and/or description. Users can alternatively choose to provide and update their own message to be used for reaction roles. - This ensures that a message with reaction roles has all the required reactions added to it by the bot. This can be used if the bot's reactions are mistakenly removen from a message.
The bot is built using Node.js 20. To run the bot, install the required dependencies with npm i
and then run the bot with npm run start
.
The bot requires environment variables to be set (optionally through the creation of a .env
file):
BOT_ID
- The bot's user IDBOT_TOKEN
- The bot tokenMONGO_URI
- The MongoDB URI the bot should connect to. This database will be used to store the reaction roles.