mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Don't send ping message if bot doesn't have permissions
This commit is contained in:
parent
65bac86ac1
commit
60018bf69d
1 changed files with 2 additions and 1 deletions
|
|
@ -268,8 +268,9 @@ namespace PluralKit.Bot
|
|||
|
||||
private async Task HandleMessagePingByReaction(MessageReactionAddEventArgs args)
|
||||
{
|
||||
// Bail in DMs
|
||||
// Bail in DMs or if we don't have send permission
|
||||
if (args.Channel.Type != ChannelType.Text) return;
|
||||
if (!args.Channel.BotHasAllPermissions(Permissions.SendMessages)) return;
|
||||
|
||||
// Find the message in the DB
|
||||
var msg = await _data.GetMessage(args.Message.Id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue