pls no fuck go back moment thank you
@@ -215,34 +215,28 @@ class Econ(commands.Cog):
except ValueError:
amount = 1
+ if amount > 10000:
+ await ctx.send(embed=discord.embed(color=discord.Color.green(), description="You can't buy more than 10000 of an item at once!"))
+ return
+
their_bal = await self.db.get_balance(ctx.author.id)
pickaxes = {"stone pickaxe": [32, "stone"],
"iron pickaxe": [128, "iron"],
"gold pickaxe": [512, "gold"],
- "diamond pickaxe": [2048, "diamond"]}
+ "diamond pickaxe": [2048, "diamond"],
+ "netherite pickaxe": [8192, "netherite"]}
# Items which aren't in shop_items.json
+ if pickaxes.get(item) is not None:
+ if await self.db.get_pickaxe(ctx.author.id) != item.replace(" pickaxe", ""):
+ if their_bal >= pickaxes[item][0]:
if item == "netherite pickaxe":
- if their_bal >= 8192:
if (await self.db.get_item(ctx.author.id, "Netherite Scrap"))[1] >= 4:
- if await self.db.get_pickaxe(ctx.author.id) != "netherite":
- await self.db.set_balance(ctx.author.id, their_bal - 8192)
await self.db.remove_item(ctx.author.id, "Netherite Scrap", 4)
- await self.db.set_pickaxe(ctx.author.id, "netherite")
- await ctx.send(embed=discord.Embed(color=discord.Color.green(), description="You have purchased a netherite pickaxe!"))
- else:
- await ctx.send(embed=discord.Embed(color=discord.Color.green(), description="You can't purchase a pickaxe you already have!"))
- else:
- await ctx.send(embed=discord.Embed(color=discord.Color.green(), description="You don't have enough netherite scrap for this item!"))
else:
- await ctx.send(embed=discord.Embed(color=discord.Color.green(), description="You don't have enough emeralds for this item!"))
-
- else:
- for pickaxe in list(pickaxes):
- if item == pickaxe:
- if await self.db.get_pickaxe(ctx.author.id) != item.replace(" pickaxe", ""):
- if their_bal >= pickaxes[item][0]:
+ await ctx.send(embed=discord.Embed(color=discord.Color.green(), description="You don't have enough Netherite Scrap! (It can be bought in the Villager Shop)"))
+ return
await self.db.set_balance(ctx.author.id, their_bal - pickaxes[item][0])
await self.db.set_pickaxe(ctx.author.id, pickaxes[item][1])
a = "a"
