This is a Node.js bot for use in the //Todo discord server.
Todo: fill in commands
- RoleEmojiReactions - automatically assigns discord roles based on specified emoji reactions
The following steps are necessary to install and run the bot.
- Clone the repository -
git clone https://github.com/slash-todo/todo-bot
- Install dependencies -
npm install
- Obtain a token from Discord's developer portal and set it as environment variable
DISCORD_TOKEN
- Configure the bot inside the
config.json
- Run the bot -
npm start
The bot is structured using a rudimentary plugin system. To extend the functionality add a plugin and tell the bot to load it.
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.