Update gauntlets.py

Add team_id to team choice packs
This commit is contained in:
Cal Corum 2024-03-09 20:37:15 -06:00
parent 32b3f586eb
commit b8f626c261

View File

@ -1288,13 +1288,16 @@ async def post_result(run_id: int, is_win: bool, this_team, bot, channel):
elif x['reward']['pack_type'] and this_event['id'] in [3, 4]: elif x['reward']['pack_type'] and this_event['id'] in [3, 4]:
if this_event['id'] == 3: if this_event['id'] == 3:
cardset_id = 13 cardset_id = 13
team_id = 58
else: else:
cardset_id = 16 cardset_id = 16
team_id = 79
await db_post( await db_post(
'packs', payload={'packs': [{ 'packs', payload={'packs': [{
'team_id': main_team['id'], 'team_id': main_team['id'],
'pack_type_id': x['reward']['pack_type']['id'], 'pack_type_id': x['reward']['pack_type']['id'],
'pack_cardset_id': cardset_id 'pack_cardset_id': cardset_id,
'pack_team_id': team_id if x['reward']['pack_type']['id'] == 8 else None
}]} }]}
) )
reward_string += f'- 1x {x["reward"]["pack_type"]["name"]} Pack' reward_string += f'- 1x {x["reward"]["pack_type"]["name"]} Pack'