Coder Social home page Coder Social logo

anthohansen / discord-reaction-role-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from peterthehan/discord-reaction-role-bot

1.0 0.0 0.0 3.93 MB

A Discord bot that allows users to self-assign roles using reactions.

License: MIT License

TypeScript 100.00%

discord-reaction-role-bot's Introduction

Discord Reaction Role Bot

Discord Twitter Follow

A Discord bot that allows users to self-assign roles using reactions.

demo

Setup

  1. Follow the instructions in create-discord-bot.

    Don't forget to give your bot the Manage Roles and Manage Messages permissions (only grant the latter if the bot should handle reactions)!

  2. Download this bot and move the src-discord-reaction-role-bot folder into the /src/bots folder from step 1.

  3. Open config.json to configure your own settings:

    [
      {
        "messageId": "858190737065902101",
        "channelId": "258314939998011393",
        "removeReaction": true,
        "policy": "any",
        "emojiRoleMap": {
          "๐Ÿค–": ["858186589187735565"],
          "๐ŸŽ‰": ["542138999511187486"],
          "๐Ÿฅค": ["785794153089990688"]
        }
      }
    ]

    Add as many rules as you want to configure for other servers.

    • messageId is the message you want the bot to react to for your reaction roles.

    • channelId is the text channel the message is in.

    • removeReaction determines whether the user reaction is removed (true) or not (false).

    • policy must be one of the following strings:

      • once: User is only allowed to react and claim roles once. Subsequent reactions are ignored.
      • any: User can react and claim as many roles as they want.
      • unique (default): User can react and claim only one emoji's set of roles at a time.
    • emojiRoleMap is a one-to-many key-value map between emoji and role ids. An emoji can be:

      • A unicode emoji. https://emojipedia.org is a good reference to copy and paste from.

          "emojiRoleMap": {
            "๐Ÿ˜ณ": ["ROLE_1_ID"],
            "๐Ÿฅบ": ["ROLE_2_ID", "ROLE_3_ID", "ROLE_4_ID"]
          }
      • An emoji ID for custom emojis. You can get a custom emoji's ID by sending \:YourCustomEmoji: in chat (prefix a backslash \ character in front of your desired emoji).

        "emojiRoleMap": {
          "716344914706694165": ["ROLE_1_ID"],
          "622635442013208589": ["ROLE_2_ID", "ROLE_3_ID", "ROLE_4_ID"]
        }
  4. npm start to run the bot.

Visit for more help or information!

discord-reaction-role-bot's People

Contributors

peterthehan avatar

Stargazers

windowsed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.