forked from cswimr/SeaCogs
fix(seautils): use length_hint
This commit is contained in:
parent
84d2728d3a
commit
059badaa9b
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
# |_____/ \___|\__,_|___/ \_/\_/ |_|_| |_| |_|_| |_| |_|\___|_|
|
# |_____/ \___|\__,_|___/ \_/\_/ |_|_| |_| |_|_| |_| |_|\___|_|
|
||||||
|
|
||||||
import inspect
|
import inspect
|
||||||
|
import operator
|
||||||
|
|
||||||
from discord import Embed
|
from discord import Embed
|
||||||
from redbot.core import commands
|
from redbot.core import commands
|
||||||
|
@ -44,7 +45,7 @@ class SeaUtils(commands.Cog):
|
||||||
page_length = 1977
|
page_length = 1977
|
||||||
)
|
)
|
||||||
content = []
|
content = []
|
||||||
max_i = len(temp_content)
|
max_i = operator.length_hint(temp_content)
|
||||||
i = 1
|
i = 1
|
||||||
for page in temp_content:
|
for page in temp_content:
|
||||||
content.append(f"**Page {i}/{max_i}**\n{cf.box(page, lang='py')}")
|
content.append(f"**Page {i}/{max_i}**\n{cf.box(page, lang='py')}")
|
||||||
|
|
Loading…
Reference in a new issue