From 632638fcb102cd4885a524ee4eb2a072c3006606 Mon Sep 17 00:00:00 2001 From: barelyprofessional <150058423+barelyprofessional@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:28:33 +1000 Subject: [PATCH] Add some extra info when a user doesn't have access to command --- KfChatDotNetKickBot/Services/BotCommands.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/KfChatDotNetKickBot/Services/BotCommands.cs b/KfChatDotNetKickBot/Services/BotCommands.cs index e14e6b1..0b2332b 100644 --- a/KfChatDotNetKickBot/Services/BotCommands.cs +++ b/KfChatDotNetKickBot/Services/BotCommands.cs @@ -1,4 +1,5 @@ -using KfChatDotNetKickBot.Commands; +using Humanizer; +using KfChatDotNetKickBot.Commands; using KfChatDotNetWsClient.Models.Events; using NLog; @@ -58,7 +59,7 @@ internal class BotCommands if (user == null) return; if (user.UserRight < command.RequiredRight) { - _bot.SendChatMessage($"@{message.Author.Username}, you do not have access to use this command.", true); + _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); break; } var task = Task.Run(() => command.RunCommand(_bot, message, match.Groups, _cancellationToken), _cancellationToken);