mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-05 21:37:55 +00:00
Handle busy indicator without permission properly
This commit is contained in:
parent
fb7f31d42d
commit
4d2c843442
1 changed files with 3 additions and 0 deletions
|
|
@ -205,6 +205,9 @@ namespace PluralKit.Bot {
|
|||
{
|
||||
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
|
||||
{
|
||||
await Task.WhenAll(ctx.Message.AddReactionAsync(new Emoji(emoji)), task);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue