From 5bff1a1035ef9dce0ff523a253736c288fa3be63 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Tue, 25 Jun 2024 00:33:29 +0800 Subject: [PATCH] Ghetto whois feature --- KfChatDotNetKickBot/KickBot.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/KfChatDotNetKickBot/KickBot.cs b/KfChatDotNetKickBot/KickBot.cs index 27dc984..2a733e0 100644 --- a/KfChatDotNetKickBot/KickBot.cs +++ b/KfChatDotNetKickBot/KickBot.cs @@ -30,6 +30,7 @@ public class KickBot private Shuffle _shuffle; private bool _isBmjLive = false; private bool _isBmjLiveSynced = false; + private Dictionary _userIdMapping = new(); public KickBot() { @@ -240,6 +241,22 @@ public class KickBot { _sendChatMessage("[img]https://i.postimg.cc/fTw6tGWZ/ineedmoneydumbfuck.png[/img]", true); } + else if (message.MessageRaw.StartsWith("!whois")) + { + var lookup = message.MessageRaw.Replace("!whois ", string.Empty).TrimStart('@').TrimEnd(' ').TrimEnd(','); + if (_userIdMapping.ContainsKey(lookup)) + { + _sendChatMessage($"{lookup}'s ID is {_userIdMapping[lookup]}", true); + } + else + { + _sendChatMessage("Don't know they who they are.", true); + } + } + else if (message.MessageRaw == "!sent") + { + _sendChatMessage("[img]https://i.ibb.co/GHq7hb1/4373-g-N5-HEH2-Hkc.png[/img]", true); + } } else { @@ -289,6 +306,10 @@ public class KickBot _gambaSeshPresent = true; } _logger.Info($"{user.Username} joined!"); + if (!_userIdMapping.ContainsKey(user.Username)) + { + _userIdMapping.Add(user.Username, user.Id); + } } }