mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user