NKN1396 / Discord-EmojiToRole

A discord.js bot that assigns roles based on reactions to a message.
MIT License
58 stars 19 forks source link
bot choices discord discord-bot discord-js discordjs discordjs-bot discordjsbot node node-js nodejs pick reactions

EmojiToRole

A discord.js bot that assigns roles based on reactions to a message. It is inspired by Zira, a bot with similar functionality, but instead with a focus on ease of use.

The main features are:

Features

This bot offers two different modes of operation. The mode can be set independently for every message:

Disjoint (mutually exclusive)

Example: choosing a team

Independent

Example: selecting alert roles

Setup

To run it simply install all dependencies (npm i) before using npm start.

Token

Provide your token to the token.mjs file.

Configuration

All messages to track and their respective settings go into the config.mjs file. The bot tracks reactions on a per-message basis. The configuration for a single message looks like this:

{
  message: '446409003136712726',
  channel: '414617785415630855',
  disjoint: false,
  reactions: [
    {
      emoji: '%F0%9F%A4%94', // Thinking emoji 🤔
      roles: ['1001065452472111134']
    }, {
      emoji: 'SelenHappy:901432850396639232', // Custom guild emoji
      roles: ['1001065583422492794']
    }
  ]
}

In order to add more messages, simply paste the Object above into the Array in config.mjs.

Key: