Cardset support
This commit is contained in:
parent
d87ae98272
commit
baab989507
@ -209,7 +209,8 @@ class Admins(commands.Cog):
|
|||||||
'Starter': 3,
|
'Starter': 3,
|
||||||
'Reserve': 4,
|
'Reserve': 4,
|
||||||
'Replacement': 5,
|
'Replacement': 5,
|
||||||
'Hall of Fame': 99
|
'Hall of Fame': 99,
|
||||||
|
'HoF': 99
|
||||||
}
|
}
|
||||||
|
|
||||||
def new_cost(player, new_rarity, old_rarity):
|
def new_cost(player, new_rarity, old_rarity):
|
||||||
@ -304,10 +305,11 @@ class Admins(commands.Cog):
|
|||||||
this_player = p_query['players'][0]
|
this_player = p_query['players'][0]
|
||||||
updates = []
|
updates = []
|
||||||
|
|
||||||
if '0501' in this_player['image']:
|
if '0515' in this_player['image']:
|
||||||
updates.append(('image', this_player['image'].replace('2023-0501', '2023-0515')))
|
updates.append(('image', this_player['image'].replace('2023-0515', '2023-0610')))
|
||||||
|
|
||||||
if this_player['rarity']['name'] != row[9]:
|
if this_player['rarity']['name'] != row[9] and not \
|
||||||
|
(this_player['rarity']['name'] == 'Hall of Fame' and row[9] == 'HoF'):
|
||||||
new_r = rarities[row[9]]
|
new_r = rarities[row[9]]
|
||||||
updates.append(
|
updates.append(
|
||||||
('cost', new_cost(this_player, new_r, rarities[this_player['rarity']['name']]))
|
('cost', new_cost(this_player, new_r, rarities[this_player['rarity']['name']]))
|
||||||
@ -391,6 +393,7 @@ class Admins(commands.Cog):
|
|||||||
|
|
||||||
if len(errors) > 0:
|
if len(errors) > 0:
|
||||||
e_string = "\n- ".join(errors)
|
e_string = "\n- ".join(errors)
|
||||||
|
logging.error(f'update errors:\n{e_string}')
|
||||||
await ctx.send(f'I encountered the following errors:\n\n{e_string}')
|
await ctx.send(f'I encountered the following errors:\n\n{e_string}')
|
||||||
|
|
||||||
@commands.command(name='tc', help='Mod: Test command')
|
@commands.command(name='tc', help='Mod: Test command')
|
||||||
|
|||||||
@ -368,8 +368,8 @@ class Players(commands.Cog):
|
|||||||
async def player_slash_command(
|
async def player_slash_command(
|
||||||
self, interaction: discord.Interaction, player_name: str,
|
self, interaction: discord.Interaction, player_name: str,
|
||||||
cardset: Literal['All', '2008 Season', '2012 Season', '2013 Season', '2016 Season', '2019 Season',
|
cardset: Literal['All', '2008 Season', '2012 Season', '2013 Season', '2016 Season', '2019 Season',
|
||||||
'2021 Season', '2022 Season', '2022 Promos', '2023 Live', 'Mario Super Sluggers',
|
'2021 Season', '2022 Season', '2022 Promos', '2023 Live', '2023 Promos',
|
||||||
'Sams Choice'] = 'All'):
|
'Mario Super Sluggers', 'Sams Choice'] = 'All'):
|
||||||
# min_rarity: Literal['Replacement', 'Reserve', 'Starter', 'All-Star', 'MVP'] = None):
|
# min_rarity: Literal['Replacement', 'Reserve', 'Starter', 'All-Star', 'MVP'] = None):
|
||||||
ephemeral = False
|
ephemeral = False
|
||||||
if interaction.channel.name in ['paper-dynasty-chat', 'pd-news-ticker']:
|
if interaction.channel.name in ['paper-dynasty-chat', 'pd-news-ticker']:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user