Update economy.py
Check cardset availability for /buy
This commit is contained in:
parent
84fa202360
commit
f1f9b9676a
@ -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,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user