slash-todo / todo-bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

todo-bot

This is a Node.js bot for use in the //Todo discord server.

Commands:

Todo: fill in commands

Currently available Plugins

  • RoleEmojiReactions - automatically assigns discord roles based on specified emoji reactions

Install

The following steps are necessary to install and run the bot.

  1. Clone the repository - git clone https://github.com/slash-todo/todo-bot
  2. Install dependencies - npm install
  3. Obtain a token from Discord's developer portal and set it as environment variable DISCORD_TOKEN
  4. Configure the bot inside the config.json
  5. Run the bot - npm start

Development

The bot is structured using a rudimentary plugin system. To extend the functionality add a plugin and tell the bot to load it.

Write a Plugin

A plugin exports a simple function taking the initialized Discord client and some plugin specific options as parameters.

module.exports = function MyPlugin(discordClient, myPluginOptions) {
    // perform plugin duties
}

During initialization of the bot the plugin gets loaded, the global Discord client and the options configured in config.json get passed to the plugin. The passed in client is an instance of discord.js.

About

License:MIT License


Languages

Language:JavaScript 56.7%Language:TypeScript 43.3%