@qntnt/dissonance
v1.0.11
Published
Plugin system for discord.js
Readme
Overview
To build bots with this framework, here's the basic process.
- Initialize and configure
Dissonance - Define some
CommandPlugins - Register your
CommandPluginswithDissonance
CommandPlugins
CommandPlugins are abstract classes that you can extend that provide you with lifecycle methods to simplify command handling. By default, a CommandPlugin can handle either message commands or application commands (slash commands).
Plugin Lifecycle
- attach
- start
- validateCommand
- parseArgs (required)
- validateArgs
- handle (required)
- cleanup
Run the example
Create a new Discord application, set up the bot, and invite it to your testing server. Set the following environment variables.
| Variable | Description |
| - | - |
| DISCORD_TOKEN | The bot token |
| DISCORD_APPLICATION_ID | The bot application's application id |
yarn
yarn example