Added a feature where the bot will send an image if it detects christopherdj is live when Bossman goes live and vice versa.

This commit is contained in:
barelyprofessional
2025-02-08 23:44:08 +08:00
parent 01847c5d3c
commit 4448a6a70a
3 changed files with 41 additions and 3 deletions

View File

@@ -388,4 +388,20 @@ public class RemoveCourtHearingCommand : ICommand
await Helpers.SetValueAsJsonObject(BuiltIn.Keys.BotCourtCalendar, hearings);
await botInstance.SendChatMessageAsync("Updated list of hearings", true);
}
}
public class NonceLiveCommand : ICommand
{
public List<Regex> Patterns => [
new Regex(@"^admin togglenonce$")
];
public string? HelpText => "Toggle IsChrisDjLive";
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.IsChrisDjLive = !botInstance.BotServices.IsChrisDjLive;
await botInstance.SendChatMessageAsync($"IsChrisDjLive => {botInstance.BotServices.IsChrisDjLive}", true);
}
}