From cdca1259bb4ece0e56410dc7e0ee65d196d59639 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sat, 7 Sep 2024 17:00:57 +0800 Subject: [PATCH] Added a command to tweak the live stream status for relaying off-screen gambling --- KfChatDotNetBot/Commands/AdminCommands.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/KfChatDotNetBot/Commands/AdminCommands.cs b/KfChatDotNetBot/Commands/AdminCommands.cs index 500aaaf..ddb8f41 100644 --- a/KfChatDotNetBot/Commands/AdminCommands.cs +++ b/KfChatDotNetBot/Commands/AdminCommands.cs @@ -123,4 +123,21 @@ public class GmKasinoListCommand : ICommand botInstance.SendChatMessage(result, true); } +} + +public class ToggleLiveStatusCommand : ICommand +{ + public List Patterns => [ + new Regex(@"^admin toggle livestatus$") + ]; + + public string? HelpText => "Toggle Bossman's live status so off screen gamba can be relayed"; + public UserRight RequiredRight => UserRight.TrueAndHonest; + public TimeSpan Timeout => TimeSpan.FromSeconds(10); + public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) + { + botInstance.BotServices.IsBmjLive = !botInstance.BotServices.IsBmjLive; + + botInstance.SendChatMessage($"IsBmjLive => {botInstance.BotServices.IsBmjLive}", true); + } } \ No newline at end of file