fix: don't crash if user tries to add a reaction on a page before the reactions are done filling up
this is kinda a hacky fix since it just ignores the user input, but it's the best that can be done until Paginate is moved to interactions (buttons)
This commit is contained in:
parent
eb4ee2afc1
commit
56155782c3
@ -169,8 +169,14 @@ public static class ContextUtils
|
||||
if (currentPage < 0) currentPage += pageCount;
|
||||
|
||||
// If we can, remove the user's reaction (so they can press again quickly)
|
||||
if ((await ctx.BotPermissions).HasFlag(PermissionSet.ManageMessages))
|
||||
if ((await ctx.BotPermissions).HasFlag(PermissionSet.ManageMessages)) try
|
||||
{
|
||||
await ctx.Rest.DeleteUserReaction(msg.ChannelId, msg.Id, reaction.Emoji, reaction.UserId);
|
||||
}
|
||||
catch (TooManyRequestsException)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Edit the embed with the new page
|
||||
var embed = await MakeEmbedForPage(currentPage);
|
||||
|
Loading…
Reference in New Issue
Block a user