Added a feature to force gamba messages even while live

This commit is contained in:
barelyprofessional
2025-09-24 01:20:54 -05:00
parent 0432d5360a
commit 40a452b8b7
2 changed files with 20 additions and 0 deletions

View File

@@ -518,4 +518,22 @@ public class StartAlmanacCommand : ICommand
botInstance.BotServices.AlmanacShill.StartShillTask();
await botInstance.SendChatMessageAsync("Asked it nicely to start", true);
}
}
public class ToggleForcedGambaMessagesCommand : ICommand
{
public List<Regex> Patterns => [
new Regex("^admin toggle gamba")
];
public string? HelpText => "Toggle forced gamba messages while a stream is running";
public UserRight RequiredRight => UserRight.TrueAndHonest;
public TimeSpan Timeout => TimeSpan.FromSeconds(10);
public RateLimitOptionsModel? RateLimitOptions => null;
public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments,
CancellationToken ctx)
{
botInstance.BotServices.TemporarilyForceGambaMessages = !botInstance.BotServices.TemporarilyForceGambaMessages;
await botInstance.SendChatMessageAsync($"TemporarilyForceGambaMessages is now {botInstance.BotServices.TemporarilyForceGambaMessages}", true);
}
}