Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions features/tourney/tourney_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -594,8 +594,16 @@ async def update_progress_dashboard(self):

if data["bottlenecks"]:
bn_text = ""
for bn in data["bottlenecks"][:5]:
bn_text += f"**#{bn['id']}** (Round {bn['round']}) | {bn['team_a']} vs {bn['team_b']} ({bn['score_a']}-{bn['score_b']})\n"
shown = 0
total_bn = len(data["bottlenecks"])
for bn in data["bottlenecks"]:
line = f"**#{bn['id']}** (Round {bn['round']}) | {bn['team_a']} vs {bn['team_b']} ({bn['score_a']}-{bn['score_b']})\n"
if len(bn_text) + len(line) > 1000:
break
bn_text += line
shown += 1
if shown < total_bn:
bn_text += f"*+{total_bn - shown} more...*"
embed.add_field(
name="⚠️ Bottleneck Matches", value=bn_text, inline=False
)
Expand Down Expand Up @@ -2990,8 +2998,16 @@ async def tourney_progress(interaction: discord.Interaction):
# Bottlenecks (Laggards behind dominant round)
if data["bottlenecks"]:
bn_text = ""
for bn in data["bottlenecks"][:5]:
bn_text += f"**#{bn['id']}** (Round {bn['round']}) | {bn['team_a']} vs {bn['team_b']} ({bn['score_a']}-{bn['score_b']})\n"
shown = 0
total_bn = len(data["bottlenecks"])
for bn in data["bottlenecks"]:
line = f"**#{bn['id']}** (Round {bn['round']}) | {bn['team_a']} vs {bn['team_b']} ({bn['score_a']}-{bn['score_b']})\n"
if len(bn_text) + len(line) > 1000:
break
bn_text += line
shown += 1
if shown < total_bn:
bn_text += f"*+{total_bn - shown} more...*"
embed.add_field(name="⚠️ Bottleneck Matches", value=bn_text, inline=False)
else:
embed.add_field(
Expand Down
Loading