5HT2 / taro-bot

A fast, scalable and easily expandable Discord bot
https://frogg.ie/invite-taro-bot
ISC License
11 stars 1 forks source link

Ability for a plugin to save a config #11

Closed 5HT2 closed 2 years ago

5HT2 commented 2 years ago

This could be done in two ways:

  1. Register a json file for each plugin alongside the config.json (this would need to explicitly disallow naming your plugin "config" and/or throw an error if multiple plugins have the same name)
    • Pros: Allows for keeping multiple versions easily (i.e., with plugin versions). Maybe have a compatibleVersions field plugins can check to keep configs backwards compatible.
    • Cons: Multiple files. Takes a tiny bit of extra work to do.
  2. Register a new entry in the existing config with a map.
    • Pros: Easy to do.
    • Cons: Look at 1.'s pros section.
5HT2 commented 2 years ago

This is next on my priority list.