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
This commit is contained in:
spiral 2021-08-25 12:43:33 -04:00
parent 87676c2045
commit 52efb3c70a
No known key found for this signature in database
GPG Key ID: A6059F0CA0E1BD31

View File

@ -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;