mirror of
https://github.com/barelyprofessional/KfChatDotNet.git
synced 2026-05-02 04:22:04 -04:00
Forgot to add a check for ignored user
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user