Handle busy indicator without permission properly

This commit is contained in:
Ske 2019-08-12 18:07:29 +02:00
parent fb7f31d42d
commit 4d2c843442

View File

@ -205,6 +205,9 @@ namespace PluralKit.Bot {
{ {
var task = f(); var task = f();
// If we don't have permission to add reactions, don't bother, and just await the task normally.
if (!await ctx.HasPermission(ChannelPermission.AddReactions)) return await task;
try try
{ {
await Task.WhenAll(ctx.Message.AddReactionAsync(new Emoji(emoji)), task); await Task.WhenAll(ctx.Message.AddReactionAsync(new Emoji(emoji)), task);