Update to Python 3.12
Update new_game_campaign role check
This commit is contained in:
parent
235cd75572
commit
5d76a49583
34
.dockerignore
Normal file
34
.dockerignore
Normal file
@ -0,0 +1,34 @@
|
||||
**/__pycache__
|
||||
**/.venv
|
||||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
|
||||
**/.idea*
|
||||
**/.pytest_cache
|
||||
**/migrations
|
||||
**/venv
|
||||
**/tests
|
||||
**/storage
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@ -131,3 +131,5 @@ dmypy.json
|
||||
# Project specifics
|
||||
.idea/
|
||||
storage*
|
||||
docker-compose.yml
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
FROM python:3.8-slim
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
|
||||
@ -1102,7 +1102,7 @@ class Gameplay(commands.Cog):
|
||||
@group_new_game.command(name='mlb-campaign', description='Start a new MLB Campaign game against an AI')
|
||||
@app_commands.describe(
|
||||
sp_card_id='Light gray number to the left of the pitcher\'s name on your depth chart')
|
||||
@commands.has_any_role(PD_PLAYERS_ROLE_NAME)
|
||||
@app_commands.has_any_role(PD_PLAYERS_ROLE_NAME)
|
||||
async def new_game_campaign_command(
|
||||
self, interaction: discord.Interaction,
|
||||
league: Literal['Minor League', 'Flashback', 'Major League', 'Hall of Fame'],
|
||||
@ -3125,7 +3125,7 @@ class Gameplay(commands.Cog):
|
||||
await response.edit(content=None, embed=await self.initialize_play_plus_embed(this_game, full_length=include_lineups))
|
||||
|
||||
async def checks_log_interaction(self, interaction: discord.Interaction, block_rollback: Optional[bool] = False) \
|
||||
-> (Optional[StratGame], Optional[dict], Optional[StratPlay]):
|
||||
-> tuple[Optional[StratGame], Optional[dict], Optional[StratPlay]]:
|
||||
await interaction.response.defer()
|
||||
|
||||
this_game = get_one_game(channel_id=interaction.channel.id, active=True)
|
||||
|
||||
@ -1150,7 +1150,7 @@ class SelectUpdatePlayerTeam(discord.ui.Select):
|
||||
|
||||
|
||||
class SelectView(discord.ui.View):
|
||||
def __init__(self, select_objects: [discord.ui.Select], timeout: float = 300.0):
|
||||
def __init__(self, select_objects: list[discord.ui.Select], timeout: float = 300.0):
|
||||
super().__init__(timeout=timeout)
|
||||
|
||||
for x in select_objects:
|
||||
@ -1192,7 +1192,7 @@ class Dropdown(discord.ui.Select):
|
||||
|
||||
|
||||
class DropdownView(discord.ui.View):
|
||||
def __init__(self, dropdown_objects: [Dropdown], timeout: float = 300.0):
|
||||
def __init__(self, dropdown_objects: list[Dropdown], timeout: float = 300.0):
|
||||
super().__init__(timeout=timeout)
|
||||
|
||||
# self.add_item(Dropdown())
|
||||
@ -2668,7 +2668,7 @@ def get_ratings_guide(sheets):
|
||||
}
|
||||
|
||||
|
||||
async def paperdex_cardset_embed(team: dict, this_cardset: dict) -> [discord.Embed]:
|
||||
async def paperdex_cardset_embed(team: dict, this_cardset: dict) -> list[discord.Embed]:
|
||||
all_dex = await db_get(
|
||||
'paperdex',
|
||||
params=[('team_id', team['id']), ('cardset_id', this_cardset['id']), ('flat', True)]
|
||||
@ -2781,7 +2781,7 @@ async def paperdex_cardset_embed(team: dict, this_cardset: dict) -> [discord.Emb
|
||||
return display_embeds
|
||||
|
||||
|
||||
async def paperdex_team_embed(team: dict, mlb_team: dict) -> [discord.Embed]:
|
||||
async def paperdex_team_embed(team: dict, mlb_team: dict) -> list[discord.Embed]:
|
||||
all_dex = await db_get(
|
||||
'paperdex',
|
||||
params=[('team_id', team['id']), ('franchise', mlb_team['lname']), ('flat', True)]
|
||||
|
||||
Loading…
Reference in New Issue
Block a user