diff --git a/RegexBot/Module/ModCommands/Commands/BanKick.cs b/RegexBot/Module/ModCommands/Commands/BanKick.cs index ffa8c72..aa7beaf 100644 --- a/RegexBot/Module/ModCommands/Commands/BanKick.cs +++ b/RegexBot/Module/ModCommands/Commands/BanKick.cs @@ -124,6 +124,20 @@ namespace Noikoio.RegexBot.Module.ModCommands.Commands return; } + // Hierarchy check + if ((msg.Author as SocketGuildUser).Hierarchy <= targetobj.Hierarchy) + { + // Block kick attempts if the invoking user is at or above the target in role hierarchy + await SendUsageMessageAsync(msg.Channel, ":x: You are not allowed to kick this user."); + return; + } + // Bot check + if (targetobj.IsBot) + { + await SendUsageMessageAsync(msg.Channel, ":x: I will not do that. Please kick bots manually."); + return; + } + // Send out message var notifyTask = SendNotificationMessage(targetobj, reason); diff --git a/RegexBot/RegexBot.csproj b/RegexBot/RegexBot.csproj index 7a464c3..f54c5d4 100644 --- a/RegexBot/RegexBot.csproj +++ b/RegexBot/RegexBot.csproj @@ -7,7 +7,7 @@ Highly configurable Discord moderation bot Noikoio - 2.6.5 + 2.6.6