From 5e63f0ada4f6f1550f1ed7113a37a77bfdffff24 Mon Sep 17 00:00:00 2001 From: brandons209 Date: Mon, 20 Jan 2020 12:39:36 -0500 Subject: [PATCH] added page number to punish list menu --- punish/punish.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/punish/punish.py b/punish/punish.py index b69ce05..6dbb07f 100644 --- a/punish/punish.py +++ b/punish/punish.py @@ -140,8 +140,9 @@ class Punish(commands.Cog): punished = await self.config.guild(guild).PUNISHED() embeds = [] - - for member_id, data in punished.items(): + num_p = len(punished) + for i, data in enumerate(punished.items()): + member_id, data = data member_name = getmname(member_id, guild) moderator = getmname(data['by'], guild) reason = data['reason'] @@ -155,6 +156,7 @@ class Punish(commands.Cog): for header, row_val in zip(headers, row): embed.add_field(name=header, value=row_val) + embed.set_footer(text=f"Page {i+1} out of {num_p}") embeds.append(embed) if not punished: