diff --git a/cogs/players.py b/cogs/players.py index 02cca7d..9521342 100644 --- a/cogs/players.py +++ b/cogs/players.py @@ -445,7 +445,7 @@ class Players(commands.Cog): @app_commands.checks.has_any_role(PD_PLAYERS_ROLE_NAME) async def player_slash_command( self, interaction: discord.Interaction, player_name: str, - cardset: Literal['All', '1998 Live', '1998 Promos', '2024 Season', '2024 Promos', '2023 Season', '2023 Promos', '2022 Season', '2022 Promos', '2021 Season', '2019 Season', '2018 Season', '2018 Promos', '2016 Season', '2013 Season', '2012 Season', '2008 Season', 'Backyard Baseball', 'Mario Super Sluggers', 'Sams Choice'] = 'All'): + cardset: Literal['All', '2024 Season', '2024 Promos', '2023 Season', '2023 Promos', '2022 Season', '2022 Promos', '2021 Season', '2019 Season', '2018 Season', '2018 Promos', '2016 Season', '2013 Season', '2012 Season', '2008 Season', '1998 Season', '1998 Promos', 'Backyard Baseball', 'Mario Super Sluggers', 'Sams Choice'] = 'All'): ephemeral = False if interaction.channel.name in ['paper-dynasty-chat', 'pd-news-ticker']: ephemeral = True diff --git a/command_logic/logic_gameplay.py b/command_logic/logic_gameplay.py index ee3b593..d035e85 100644 --- a/command_logic/logic_gameplay.py +++ b/command_logic/logic_gameplay.py @@ -264,10 +264,12 @@ async def get_scorebug_embed(session: Session, this_game: Game, full_length: boo ) else: logger.info(f'There is no play in game {this_game.id}, posting lineups') + logger.info(f'Pulling away lineup') embed.add_field( name=f'{this_game.away_team.abbrev} Lineup', value=this_game.team_lineup(session, this_game.away_team) ) + logger.info(f'Pulling home lineup') embed.add_field( name=f'{this_game.home_team.abbrev} Lineup', value=this_game.team_lineup(session, this_game.home_team) @@ -311,10 +313,13 @@ async def new_game_checks(session: Session, interaction: discord.Interaction, aw return None if interaction.user.id not in [away_team.gmid, home_team.gmid]: - await interaction.edit_original_response( - content='You can only start a new game if you GM one of the teams.' - ) - return None + if interaction.user.id != 258104532423147520: + await interaction.edit_original_response( + content='You can only start a new game if you GM one of the teams.' + ) + return None + else: + await interaction.channel.send('Sigh. Cal is cheating again starting a game for someone else.') return { 'away_team': away_team, diff --git a/helpers.py b/helpers.py index e390e20..b1c919d 100644 --- a/helpers.py +++ b/helpers.py @@ -283,7 +283,7 @@ RARITY = { 'Replacement': 0 } SELECT_CARDSET_OPTIONS = [ - discord.SelectOption(label='1998 Live', value='20'), + discord.SelectOption(label='1998 Season', value='20'), discord.SelectOption(label='1998 Promos', value='21'), discord.SelectOption(label='2024 Season', value='17'), discord.SelectOption(label='2024 Promos', value='18'), @@ -760,7 +760,7 @@ class SelectOpenPack(discord.ui.Select): class SelectPaperdexCardset(discord.ui.Select): def __init__(self): options = [ - discord.SelectOption(label='1998 Live'), + discord.SelectOption(label='1998 Season'), discord.SelectOption(label='2024 Season'), discord.SelectOption(label='2023 Season'), discord.SelectOption(label='2022 Season'), @@ -805,7 +805,7 @@ class SelectPaperdexCardset(discord.ui.Select): cardset_id = 17 elif self.values[0] == '2024 Promos': cardset_id = 18 - elif self.values[0] == '1998 Live': + elif self.values[0] == '1998 Season': cardset_id = 20 c_query = await db_get('cardsets', object_id=cardset_id, none_okay=False) @@ -934,7 +934,7 @@ class SelectPaperdexTeam(discord.ui.Select): class SelectBuyPacksCardset(discord.ui.Select): def __init__(self, team: dict, quantity: int, pack_type_id: int, pack_embed: discord.Embed, cost: int): options = [ - discord.SelectOption(label='1998 Live'), + discord.SelectOption(label='1998 Season'), discord.SelectOption(label='Pokemon - Brilliant Stars'), discord.SelectOption(label='2024 Season'), discord.SelectOption(label='2023 Season'), @@ -977,7 +977,7 @@ class SelectBuyPacksCardset(discord.ui.Select): cardset_id = 13 elif self.values[0] == '2024 Season': cardset_id = 17 - elif self.values[0] == '1998 Live': + elif self.values[0] == '1998 Season': cardset_id = 20 elif self.values[0] == 'Pokemon - Brilliant Stars': cardset_id = 23 diff --git a/in_game/gameplay_models.py b/in_game/gameplay_models.py index 3728a48..cf334b8 100644 --- a/in_game/gameplay_models.py +++ b/in_game/gameplay_models.py @@ -232,8 +232,10 @@ class Game(SQLModel, table=True): def team_lineup(self, session: Session, team: Team, with_links: bool = True) -> str: all_lineups = session.exec(select(Lineup).where(Lineup.team == team, Lineup.game == self, Lineup.active).order_by(Lineup.batting_order)).all() + logger.info(f'all_lineups: {all_lineups}') lineup_val = '' for line in all_lineups: + logger.info(f'line in all_lineups: {line}') if with_links: name_string = {line.player.name_card_link("batting" if line.position != "P" else "pitching")} else: