mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Corrected use of Convert.ToInt32 to the SettingsProvider native type conversion
This commit is contained in:
@@ -11,8 +11,8 @@ public class AlmanacShill(ChatBot kfChatBot) : IDisposable
|
|||||||
|
|
||||||
private async Task AlmanacShillTask()
|
private async Task AlmanacShillTask()
|
||||||
{
|
{
|
||||||
var interval = await SettingsProvider.GetValueAsync(BuiltIn.Keys.BotAlmanacInterval);
|
var interval = (await SettingsProvider.GetValueAsync(BuiltIn.Keys.BotAlmanacInterval)).ToType<int>();
|
||||||
using var timer = new PeriodicTimer(TimeSpan.FromSeconds(Convert.ToInt32(interval.Value)));
|
using var timer = new PeriodicTimer(TimeSpan.FromSeconds(interval));
|
||||||
while (await timer.WaitForNextTickAsync(_almanacShillCts.Token))
|
while (await timer.WaitForNextTickAsync(_almanacShillCts.Token))
|
||||||
{
|
{
|
||||||
_logger.Info("Time to shill the almanac in chat");
|
_logger.Info("Time to shill the almanac in chat");
|
||||||
|
|||||||
Reference in New Issue
Block a user