using System.Text.RegularExpressions; using KfChatDotNetBot.Models.DbModels; using KfChatDotNetBot.Settings; using KfChatDotNetWsClient.Models.Events; using NLog; using Zalgo; namespace KfChatDotNetBot.Commands; public class InsanityCommand : ICommand { public List Patterns => [new Regex("^insanity")]; public string? HelpText => "Insanity"; public UserRight RequiredRight => UserRight.Guest; public TimeSpan Timeout => TimeSpan.FromSeconds(10); public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) { // ReSharper disable once StringLiteralTypo await botInstance.SendChatMessageAsync("definition of insanity = doing the same thing over and over and over excecting a different result, and heres my dumbass trying to get rich every day and losing everythign i fucking touch every fucking time FUCK this bullshit FUCK MY LIEFdefinition of insanity = doing the same thing over and over and over excecting a different result, and heres my dumbass trying to get rich every day and losing everythign i fucking touch every fucking time FUCK this bullshit FUCK MY LIEF"); } } public class TwistedCommand : ICommand { public List Patterns => [new Regex("^twisted")]; public string? HelpText => "Get it twisted"; public UserRight RequiredRight => UserRight.Guest; public TimeSpan Timeout => TimeSpan.FromSeconds(10); public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) { // ReSharper disable once StringLiteralTypo await botInstance.SendChatMessageAsync("🦍 🗣 GET IT TWISTED 🌪 , GAMBLE ✅ . PLEASE START GAMBLING 👍 . GAMBLING IS AN INVESTMENT 🎰 AND AN INVESTMENT ONLY 👍 . YOU WILL PROFIT 💰 , YOU WILL WIN ❗ ️. YOU WILL DO ALL OF THAT 💯 , YOU UNDERSTAND ⁉ ️ YOU WILL BECOME A BILLIONAIRE 💵 📈 AND REBUILD YOUR FUCKING LIFE 🤯"); } } public class HelpMeCommand : ICommand { public List Patterns => [new Regex("^helpme")]; public string? HelpText => "Somebody please help me"; public UserRight RequiredRight => UserRight.Guest; public TimeSpan Timeout => TimeSpan.FromSeconds(10); public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) { // ReSharper disable once StringLiteralTypo await botInstance.SendChatMessageAsync("[img]https://i.postimg.cc/fTw6tGWZ/ineedmoneydumbfuck.png[/img]", true); } } public class SentCommand : ICommand { public List Patterns => [new Regex("^sent$")]; public string? HelpText => "Sent love"; public UserRight RequiredRight => UserRight.Guest; public TimeSpan Timeout => TimeSpan.FromSeconds(10); public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) { // ReSharper disable once StringLiteralTypo await botInstance.SendChatMessageAsync("[img]https://i.ibb.co/GHq7hb1/4373-g-N5-HEH2-Hkc.png[/img]", true); } } public class GmKasinoCommand : ICommand { public List Patterns => [new Regex("^gmkasino")]; public string? HelpText => "Good Morning Kasino"; public UserRight RequiredRight => UserRight.Guest; public TimeSpan Timeout => TimeSpan.FromSeconds(10); public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) { var images = (await Helpers.GetValue(BuiltIn.Keys.BotGmKasinoImageRotation)).JsonDeserialize>(); if (images == null) return; var random = new Random(); var image = images[random.Next(images.Count)]; await botInstance.SendChatMessageAsync($"[img]{image}[/img]", true); } } public class CrackedCommand : ICommand { public List Patterns => [ new Regex("^cracked (?.+)"), new Regex("^crackhead (?.+)") ]; public string? HelpText => "Crackhead Zalgo text"; public UserRight RequiredRight => UserRight.Guest; public TimeSpan Timeout => TimeSpan.FromSeconds(10); public async Task RunCommand(ChatBot botInstance, MessageModel message, UserDbModel user, GroupCollection arguments, CancellationToken ctx) { var logger = LogManager.GetCurrentClassLogger(); var msg = arguments["msg"].Value.TrimStart('/'); var settings = await Helpers.GetMultipleValues([ BuiltIn.Keys.CrackedZalgoFuckUpMode, BuiltIn.Keys.CrackedZalgoFuckUpPosition ]); var zalgo = new ZalgoString(msg, (FuckUpMode)settings[BuiltIn.Keys.CrackedZalgoFuckUpMode].ToType(), (FuckUpPosition)settings[BuiltIn.Keys.CrackedZalgoFuckUpPosition].ToType()); logger.Info($"Zalgo length: {zalgo.ToString().Length}"); await botInstance.SendChatMessageAsync(zalgo.ToString(), true, ChatBot.LengthLimitBehavior.TruncateExactly); } } 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); await botInstance.SendChatMessageAsync($"[img]{image.Value}[/img]", true); } }