From b5c5fb233c5b3937f10bdf40311faa2d93fa44be Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Fri, 20 Oct 2023 16:02:29 -0500 Subject: [PATCH] Player embeds updated --- helpers.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/helpers.py b/helpers.py index edb13c3..85dbb4f 100644 --- a/helpers.py +++ b/helpers.py @@ -111,7 +111,7 @@ INFIELD_X_CHART = { }, 'po': { 'rp': 'The batters hits a popup. None of the fielders take charge on the play and the ball drops in the ' - 'infield for a SI*! All runners advance 1 base.', + 'infield for a SI1! All runners advance 1 base.', 'e1': 'The catcher drops a popup for an error. All runners advance 1 base.', 'e2': 'The catcher grabs a squib in front of the plate and throws it into right field. The batter goes to ' 'second and all runners score.', @@ -147,7 +147,7 @@ INFIELD_X_CHART = { 'no': 'Consult Groundball Chart: `!gbC`' }, 'spd': { - 'rp': 'Catcher throws to first and hits the batter-runner in the back, SI*', + 'rp': 'Catcher throws to first and hits the batter-runner in the back, SI1', 'e1': 'Error, batter to first, runners advance 1 base.', 'e2': 'Error, batter to second, runners advance 2 bases.', 'no': 'Speed check, Batter\'s safe range = Running; if safe, SI*; if out, gbC' @@ -1537,12 +1537,12 @@ async def get_card_embeds(card, include_stats=False) -> list: # f'({card["player"]["set_num"]}/{card["player"]["cardset"]["total_cards"]})', # inline=False # ) - embed.add_field(name='Cost', value=f'{card["player"]["cost"]}₼') + embed.add_field(name='Player ID', value=f'{card["player"]["player_id"]}') embed.add_field(name='Rarity', value=f'{card["player"]["rarity"]["name"]}') + embed.add_field(name='Cost', value=f'{card["player"]["cost"]}₼') - player_pages = f'[BBRef]({get_player_url(card["player"], "bbref")})' - embed.add_field(name='Player Page', value=f'{player_pages}') - + pos_string = ", ".join(get_all_pos(card['player'])) + embed.add_field(name='Positions', value=pos_string) # all_dex = card['player']['paperdex'] all_dex = await db_get('paperdex', params=[("player_id", card["player"]["player_id"]), ('flat', True)]) count = all_dex['count'] @@ -1568,8 +1568,8 @@ async def get_card_embeds(card, include_stats=False) -> list: # embed.add_field(name='# Dupes', value=f'{count - 1} dupe{"s" if count - 1 != 1 else ""}') # embed.add_field(name='Team', value=f'{card["player"]["mlbclub"]}') - pos_string = ", ".join(get_all_pos(card['player'])) - embed.add_field(name='Positions', value=pos_string) + player_pages = f'[BBRef]({get_player_url(card["player"], "bbref")})' + embed.add_field(name='Player Page', value=f'{player_pages}') embed.set_image(url=card["player"]["image"]) headshot = card['player']['headshot'] if card['player']['headshot'] else await get_player_headshot(card['player'])