From 18a50a757d2bb4d925a1c8ffb48b6504776b50ad Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:58:10 +0800 Subject: [PATCH] Forgot to add a check for ignored user --- KfChatDotNetBot/Services/BotCommands.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/KfChatDotNetBot/Services/BotCommands.cs b/KfChatDotNetBot/Services/BotCommands.cs index a48940a..de859f1 100644 --- a/KfChatDotNetBot/Services/BotCommands.cs +++ b/KfChatDotNetBot/Services/BotCommands.cs @@ -57,6 +57,7 @@ internal class BotCommands var user = db.Users.FirstOrDefault(u => u.KfId == message.Author.Id); // This should never happen as brand-new users are created upon join if (user == null) return; + if (user.Ignored) return; if (user.UserRight < command.RequiredRight) { _bot.SendChatMessage($"@{message.Author.Username}, you do not have access to use this command. Your rank: {user.UserRight.Humanize()}; Required rank: {command.RequiredRight.Humanize()}", true);