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:
parent
87676c2045
commit
52efb3c70a
@ -135,10 +135,6 @@ namespace PluralKit.Bot
|
|||||||
|
|
||||||
private async ValueTask HandleCommandDeleteReaction(MessageReactionAddEvent evt, CommandMessage msg)
|
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
|
// Can only delete your own message
|
||||||
if (msg.AuthorId != evt.UserId)
|
if (msg.AuthorId != evt.UserId)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user