MODiX icon indicating copy to clipboard operation
MODiX copied to clipboard

Create a Runtime Configuration

Open TheBrambleShark opened this issue 6 years ago • 1 comments

Create a storage system for storing instance-specific configurations, whether this is its own section in the database or a json/yaml flat-file. This configuration section should be specifically related to MODiX, not to any guild/channel/user instance.

A few issues to address:

  • Should this be available at startup?
  • Where should this be stored?
  • What items should go into it? #467

TheBrambleShark avatar Apr 30 '19 00:04 TheBrambleShark

It seems like there are two different flavors of configuration:

  • Botwide configurations, such as the tokens, API endpoints, etc. These don't have any guild-specific context. This already exists in the form of the MODIX_ environment variables.
  • Guildwide configurations, such promotion prerequisites (e.g. require 30 days of activity before allowing a user to be promoted). This does not exist yet.

For guildwide configuration, I'm leaning toward a database table, but not sure what the best architecture would be.

Some database schema options:

  • GuildId - Json/Xml/Yaml/WhateverConfig structure.
  • GuildId - Key - Value structure.
  • GuildId - ConfigValue1 - ConfigValue2 - ... - ConfigValueN structure.

The first one probably gives us the most flexibility in terms of structuring the config data, but if we ever change the structure of the config object, I'm not sure how we'd create a migration for that.

Scott-Caldwell avatar May 01 '19 15:05 Scott-Caldwell

As part of a new effort to refocus on priorities, I will close this. If you feel this is imperative to the bot, a new issue can be opened to supersede this.

patrickklaeren avatar Mar 26 '24 14:03 patrickklaeren