Skip to content

Commit

Permalink
Update economy.py
Browse files Browse the repository at this point in the history
removed role colours from the shop
  • Loading branch information
DanielOrourke02 committed Apr 20, 2024
1 parent 9e7a57b commit 8ae61c9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/economy.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,6 @@ async def buy(self, ctx, item_name: str=None, amount: int=1):
add_item_to_inventory(user.id, item_name) # add the item to their inventory
log_purchase(user.id, 1, user.name, shop_items[item_name]['name'], item_cost) # log the purchase

# Check if the item has (role) in its name and assign the role
# Role values and colours are in 'eco_support.py'
if "(role)" in shop_items[item_name]['name'].lower(): # if the item name has (role) inside the str we know its a role you can buy
role_name = shop_items[item_name]['name'].split(" (")[0] # Extract role name
await assign_role_to_user(ctx, role_name) # give role to the author/user

embed = discord.Embed(
title="Purchase Successful",
description=f"{ctx.author.mention}, 💵 You have successfully bought **{shop_items[item_name]['name']} for {item_cost} zesty coins**.",
Expand Down

0 comments on commit 8ae61c9

Please sign in to comment.