From 87cd31e1af470d5ac52beb1edbb9e552eed9ece1 Mon Sep 17 00:00:00 2001 From: F4zii Date: Sun, 16 Feb 2020 18:22:40 +0200 Subject: 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. --- bot/pagination.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/pagination.py') 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: ] -- cgit v1.2.3