Tembeon / omega

Customizable Discord bot for creating LFGs
1 stars 0 forks source link

feat: `Settings` class, `SettingsDatabase`, deprecation cleanup #38

Closed Tembeon closed 2 months ago

Tembeon commented 2 months ago

[!TIP] This PR is a part of new system to allow changing commands while bot is active (see #4)

Overview

This PR moves all settings to dart controlled classes.

Settings database

This settings was migrated from local files to SQL database:

  1. Timezones
  2. Activities (roles added)
  3. LFG / Promo channels

[!WARNING] All old config files was removed.

When a new settings database file is created, it is filled with initial data. See SettingsDatabase._setInitialData method for more.

Settings class

Used to communicate both with SettingsDatabase and Interactor. When changes are made, it notifies the Interactor of certain events.

[!TIP] Always use Settings class to make changes in Database. It is important to notify Interactor

Minor changes

  1. Removed all old config files and loaders
  2. Migrations from old loaders to new Settings
  3. Banner URL now can be null