Update to the Settings interface.

- Methods are now suffixed async
- Extension methods moved to the actual class and class renamed from SettingValue to Setting
- "Helpers" renamed to "SettingsProvider"
- Removed the ghetto CSV list method. Only setting using it was Pusher Channels which was orphaned by the new Kick channel feature. The call to ToList in the Chips.gg integration was incorrect and just proves lists should be consistently based around JSON objects instead of randomly string splitting
This commit is contained in:
barelyprofessional
2025-05-06 14:07:52 -05:00
parent 4fecdbce06
commit e2c70cc5c5
17 changed files with 167 additions and 229 deletions

View File

@@ -11,12 +11,12 @@ public class AlmanacShill(ChatBot kfChatBot) : IDisposable
private async Task AlmanacShillTask()
{
var interval = await Helpers.GetValue(BuiltIn.Keys.BotAlmanacInterval);
var interval = await SettingsProvider.GetValueAsync(BuiltIn.Keys.BotAlmanacInterval);
using var timer = new PeriodicTimer(TimeSpan.FromSeconds(Convert.ToInt32(interval.Value)));
while (await timer.WaitForNextTickAsync(_almanacShillCts.Token))
{
_logger.Info("Time to shill the almanac in chat");
var text = await Helpers.GetValue(BuiltIn.Keys.BotAlmanacText);
var text = await SettingsProvider.GetValueAsync(BuiltIn.Keys.BotAlmanacText);
await kfChatBot.SendChatMessageAsync($":!: {text.Value}", true);
}
}