New setting to control the initial state of the almanac shill

This commit is contained in:
barelyprofessional
2025-03-23 19:49:45 +08:00
parent 0c37596a66
commit e59bb880b5
2 changed files with 17 additions and 0 deletions

View File

@@ -245,6 +245,12 @@ public class BotServices
private async Task BuildAlmanacShill()
{
AlmanacShill = new AlmanacShill(_chatBot);
var initialState = await Helpers.GetValue(BuiltIn.Keys.BotAlmanacInitialState);
if (!initialState.ToBoolean())
{
_logger.Info("Built the almanac service but not enabling as initial state is false");
return;
}
AlmanacShill.StartShillTask();
_logger.Info("Built the almanac shill task");
}