correct top role string generation

This commit is contained in:
LBlend committed 2023-05-06 21:10:51 +09:00
1 parent e35a529a9c
commit 757016f209
1 file changed
+3 -1
+3 -1
View File
@@ -506,7 +506,9 @@ class Info(commands.Cog):
"""
roles = sorted(interaction.guild.roles, key=lambda x: len(x.members), reverse=True)
roles_formatted = list(map(lambda r: f"**#{m[0] + 1}** {r.mention} - {len(r.members)} brukere", roles))
roles_formatted = list(
map(lambda r: f"**#{r[0] + 1}** {r[1].mention} - {len(r[1].members)} brukere", enumerate(roles))
)
paginator = misc_utils.Paginator(roles_formatted)
view = discord_utils.Scroller(paginator, self.__construct_ranking_embed)