Simplify globaltop output

This commit is contained in:
3nd3r
2025-12-30 22:54:07 -06:00
parent 1e4e1e31ba
commit a1afd25053

View File

@@ -1117,9 +1117,9 @@ class DuckHuntBot:
for idx, (xp, player_nick, channel_key) in enumerate(top5, 1): for idx, (xp, player_nick, channel_key) in enumerate(top5, 1):
prefix = medals.get(idx, f"#{idx}") prefix = medals.get(idx, f"#{idx}")
channel_label = _display_channel_key(channel_key) channel_label = _display_channel_key(channel_key)
parts.append(f"{prefix} {player_nick} in {channel_label}: {xp}XP") parts.append(f"{prefix} {player_nick} {xp}XP {channel_label}")
line = f"Top XP (all channels): {bold}{reset} " + " | ".join(parts) line = f"Top XP: {bold}{reset} " + " | ".join(parts)
self.send_message(channel, line) self.send_message(channel, line)
except Exception as e: except Exception as e:
self.logger.error(f"Error in handle_globaltop: {e}") self.logger.error(f"Error in handle_globaltop: {e}")