Merge pull request #318 from spiralw/fix/paginate-timeout

Fix error on paginate timeout when missing permissions
This commit is contained in:
Astrid 2021-04-27 12:22:58 +02:00 committed by GitHub
commit 2e3d771059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,6 +160,10 @@ namespace PluralKit.Bot {
} }
// If we get a "NotFound" error, the message has been deleted and thus not our problem // If we get a "NotFound" error, the message has been deleted and thus not our problem
catch (NotFoundException) { } catch (NotFoundException) { }
// If we get an "Unauthorized" error, we don't have permissions to remove our reaction
// which means we probably didn't add it in the first place, or permissions changed since then
// either way, nothing to do here
catch (UnauthorizedException) { }
} }
public static async Task<T> Choose<T>(this Context ctx, string description, IList<T> items, Func<T, string> display = null) public static async Task<T> Choose<T>(this Context ctx, string description, IList<T> items, Func<T, string> display = null)