fix: remove empty if-pass stubs after db_post calls in complete_game (#38) #71

Closed
cal wants to merge 13 commits from ai/paper-dynasty-discord-38 into main
2 changed files with 9 additions and 1 deletions
Showing only changes of commit 8e605c2140 - Show all commits

View File

@ -221,6 +221,7 @@ class ScoutButton(discord.ui.Button):
{
"player_id": self.card["player"]["player_id"],
"team_id": scouter_team["id"],
"pack_id": self.card["pack"]["id"],
}
],
},

View File

@ -52,10 +52,17 @@ def _build_card_lines(cards: list[dict]) -> list[tuple[int, str]]:
player = card["player"]
rarity_val = player["rarity"]["value"]
symbol = RARITY_SYMBOLS.get(rarity_val, "\u26ab")
desc = player.get("description", "")
image_url = player.get("image", "")
name_display = (
f"[{desc} {player['p_name']}]({image_url})"
if image_url
else f"{desc} {player['p_name']}"
)
lines.append(
(
player["player_id"],
f"{symbol} {player['rarity']['name']}{player['p_name']}",
f"{symbol} {player['rarity']['name']}{name_display}",
)
)
random.shuffle(lines)