From 059badaa9bc78525d62194c91106cec8e3d0e43b Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Mon, 13 May 2024 21:12:51 -0400 Subject: [PATCH] fix(seautils): use length_hint --- seautils/seautils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seautils/seautils.py b/seautils/seautils.py index b9f9ef8..66d877a 100644 --- a/seautils/seautils.py +++ b/seautils/seautils.py @@ -6,6 +6,7 @@ # |_____/ \___|\__,_|___/ \_/\_/ |_|_| |_| |_|_| |_| |_|\___|_| import inspect +import operator from discord import Embed from redbot.core import commands @@ -44,7 +45,7 @@ class SeaUtils(commands.Cog): page_length = 1977 ) content = [] - max_i = len(temp_content) + max_i = operator.length_hint(temp_content) i = 1 for page in temp_content: content.append(f"**Page {i}/{max_i}**\n{cf.box(page, lang='py')}")