Added a command to tweak the live stream status for relaying off-screen gambling

This commit is contained in:
barelyprofessional
2024-09-07 17:00:57 +08:00
parent b879efe256
commit cdca1259bb

View File

@@ -123,4 +123,21 @@ public class GmKasinoListCommand : ICommand
botInstance.SendChatMessage(result, true);
}
}
public class ToggleLiveStatusCommand : ICommand
{
public List<Regex> 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);
}
}