From 52efb3c70a09e9a64f3c4cb09401a649f8c8fc53 Mon Sep 17 00:00:00 2001 From: spiral Date: Wed, 25 Aug 2021 12:43:33 -0400 Subject: [PATCH] fix: don't check for useless permission when deleting command messages this allows for deleting command messages in DMs, where the bot does not have manage messages permissions and just in general in channels where it doesn't have those permissions as well --- PluralKit.Bot/Handlers/ReactionAdded.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/PluralKit.Bot/Handlers/ReactionAdded.cs b/PluralKit.Bot/Handlers/ReactionAdded.cs index 7c1b4bae..f7f0f900 100644 --- a/PluralKit.Bot/Handlers/ReactionAdded.cs +++ b/PluralKit.Bot/Handlers/ReactionAdded.cs @@ -135,10 +135,6 @@ namespace PluralKit.Bot private async ValueTask HandleCommandDeleteReaction(MessageReactionAddEvent evt, CommandMessage msg) { - // TODO: why does the bot need manage messages if it's deleting its own messages?? - if (!_bot.PermissionsIn(evt.ChannelId).HasFlag(PermissionSet.ManageMessages)) - return; - // Can only delete your own message if (msg.AuthorId != evt.UserId) return;