tweak: Format updates for topvoice.

This commit is contained in:
2026-02-25 19:35:17 +10:00
parent dba0930e3e
commit 1eb9a32683

View File

@@ -41,7 +41,11 @@ class YarnCog(LionCog):
@LionCog.listener("on_reaction_remove") @LionCog.listener("on_reaction_remove")
async def lilac_unconfirms(self, reaction: discord.Reaction, user: discord.User): async def lilac_unconfirms(self, reaction: discord.Reaction, user: discord.User):
if reaction.me and reaction.count == 1: if (
reaction.me
and reaction.count == 1
and str(reaction.emoji) not in ("⬅️", "➡️")
):
await reaction.remove(self.bot.user) await reaction.remove(self.bot.user)
@cmds.hybrid_command(name="voicestate") @cmds.hybrid_command(name="voicestate")
@@ -100,7 +104,7 @@ class YarnCog(LionCog):
.group_by("userid") .group_by("userid")
.with_no_adapter() .with_no_adapter()
) )
leaderboard = [(row["userid"], row["total_time"]) for row in await query] leaderboard = [(row["userid"], int(row["total_time"])) for row in await query]
# Format for display and pager # Format for display and pager
# First collect names # First collect names
@@ -127,4 +131,4 @@ class YarnCog(LionCog):
title = "Voice Leaderboard" title = "Voice Leaderboard"
pages = paginate_list(lb_strings, block_length=page_len, title=title) pages = paginate_list(lb_strings, block_length=page_len, title=title)
await ctx.pager(pages) await pager(ctx, pages)