From e2cd755a10a4eb49afc73bc467b3501293d6478e Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Sat, 14 Sep 2024 17:06:14 +0800 Subject: [PATCH] Added winmanjack --- KfChatDotNetBot/Commands/MemeCommands.cs | 15 +++++++++++++++ KfChatDotNetBot/Settings/BuiltIn.cs | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/KfChatDotNetBot/Commands/MemeCommands.cs b/KfChatDotNetBot/Commands/MemeCommands.cs index ca676dd..c3bbc82 100644 --- a/KfChatDotNetBot/Commands/MemeCommands.cs +++ b/KfChatDotNetBot/Commands/MemeCommands.cs @@ -93,4 +93,19 @@ public class CrackedCommand : ICommand (FuckUpPosition)settings[BuiltIn.Keys.CrackedZalgoFuckUpPosition].ToType()); botInstance.SendChatMessage(zalgo.ToString(), true); } +} + +public class WinmanjackCommand : ICommand +{ + public List Patterns => [ + new Regex("^winmanjack") + ]; + public string? HelpText => "winmanjack.jpg"; + public UserRight RequiredRight => UserRight.Loser; + public TimeSpan Timeout => TimeSpan.FromSeconds(10); + public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) + { + var image = await Helpers.GetValue(BuiltIn.Keys.WinmanjackImgUrl); + botInstance.SendChatMessage($"[img]{image.Value}[/img]", true); + } } \ No newline at end of file diff --git a/KfChatDotNetBot/Settings/BuiltIn.cs b/KfChatDotNetBot/Settings/BuiltIn.cs index c3db3c9..e948d17 100644 --- a/KfChatDotNetBot/Settings/BuiltIn.cs +++ b/KfChatDotNetBot/Settings/BuiltIn.cs @@ -507,6 +507,15 @@ public static class BuiltIn Default = "2", IsSecret = false, CacheDuration = TimeSpan.FromHours(1) + }, + new BuiltInSettingsModel + { + Key = Keys.WinmanjackImgUrl, + Regex = ".+", + Description = "URL for the winmanjack image", + Default = "https://kiwifarms.st/attachments/winmanjack_bgr-png.6414050/", + IsSecret = false, + CacheDuration = TimeSpan.FromHours(1) } ]; @@ -555,5 +564,6 @@ public static class BuiltIn public static string JuiceLoserDivision = "Juice.LoserDivision"; public static string CrackedZalgoFuckUpMode = "Cracked.ZalgoFuckUpMode"; public static string CrackedZalgoFuckUpPosition = "Cracked.ZalgoFuckUpPosition"; + public static string WinmanjackImgUrl = "Winmanjack.ImgUrl"; } } \ No newline at end of file