Update economy.py

Check cardset availability for /buy
This commit is contained in:
Cal Corum 2023-03-28 11:19:22 -05:00
parent 84fa202360
commit f1f9b9676a

View File

@ -675,6 +675,12 @@ class Economy(commands.Cog):
params=[('player_id', this_player['player_id']), ('team_id', owner_team["id"])]) params=[('player_id', this_player['player_id']), ('team_id', owner_team["id"])])
num_copies = c_query['count'] if c_query else 0 num_copies = c_query['count'] if c_query else 0
if not this_player['cardset']['for_purchase']:
await interaction.response.send_message(
content=f'Ope - looks like singles from the {this_player["cardset"]["name"]} cardset are not available '
f'for purchase.'
)
return
if this_player['cost'] > owner_team['wallet']: if this_player['cost'] > owner_team['wallet']:
await interaction.response.send_message( await interaction.response.send_message(
content=None, content=None,