/discord-bot

A simple Discord bot written in Node.js that assigns roles when you react to messages.

Primary LanguageJavaScriptMIT LicenseMIT

discord-bot

JavaScript Style Guide Conventional Commits Twitch Status

A simple Discord bot written in Node.js that assigns roles when you react to messages.

Installation

  1. Clone the repo
$ git clone https://github.com/IAmFletcher/discord-bot.git

// OR

$ git clone git@github.com:IAmFletcher/discord-bot.git
  1. Install the dependencies
$ yarn install // All dependencies

// OR

$ yarn install --production // Only production dependencies
  1. Run
$ yarn start

Prerequisites

  1. Install MariaDB and yarn

We use MariaDB, not MySQL, because the bot is only set-up to enable unicode emoji support in MariaDB.

  1. Create Discord application

    • Take note of Client ID
    • Go to Bot tab and Add Bot
    • Take note of Bot Token
  2. Add bot to a Discord server

Fill in the Client ID and follow this link: https://discordapp.com/api/oauth2/authorize?client_id=${CLIENT_ID}&permissions=268501056&scope=bot

  1. Set-up environment variables
DiscordBotID={ClientID}
DiscordBotToken={BotToken}
SQLUser=
SQLPassword=

Contributing

If you'd like to contribute to the project, please read the Contributing Guidelines first.

License

MIT