diff options
author | 2020-02-16 18:22:40 +0200 | |
---|---|---|
committer | 2020-02-16 19:00:20 +0200 | |
commit | 87cd31e1af470d5ac52beb1edbb9e552eed9ece1 (patch) | |
tree | 2eb27ecfc51a5c9ce9e3866b3bdb8e6ca879d64e | |
parent | Remove metadata from PR template (diff) |
Fix the Pagination cog
When using pagination in the Reddit cog, clicking the LAST_EMOJI would
raise an exception like this:
TypeError: unsupported operand type(s) for -: 'list' and 'int'
This was resolved by taking the subtraction out of the len() function.
-rw-r--r-- | bot/pagination.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/pagination.py b/bot/pagination.py index f1233482..1858bd2d 100644 --- a/bot/pagination.py +++ b/bot/pagination.py @@ -389,7 +389,7 @@ class ImagePaginator(Paginator): log.debug("Got last page reaction, but we're on the last page - ignoring") continue - current_page = len(paginator.pages - 1) + current_page = len(paginator.pages) - 1 reaction_type = "last" # Previous reaction press - [:arrow_left: ] |