aboutsummaryrefslogtreecommitdiffstats
path: root/bot/pagination.py
diff options
context:
space:
mode:
authorGravatar F4zii <Basketball780237209>2020-02-16 18:22:40 +0200
committerGravatar F4zii <Basketball780237209>2020-02-16 19:00:20 +0200
commit87cd31e1af470d5ac52beb1edbb9e552eed9ece1 (patch)
tree2eb27ecfc51a5c9ce9e3866b3bdb8e6ca879d64e /bot/pagination.py
parentRemove 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.
Diffstat (limited to 'bot/pagination.py')
-rw-r--r--bot/pagination.py2
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: ]