Spaces:
Building
Building
Update shop.py
Browse files
shop.py
CHANGED
@@ -4,24 +4,24 @@ import asyncio
|
|
4 |
|
5 |
user_cash = {}
|
6 |
|
7 |
-
@app_commands.command(name="shop", description="Buy
|
8 |
@app_commands.describe(item="The item you want to buy")
|
9 |
async def shop(interaction: discord.Interaction, item: str = None):
|
10 |
user_id = interaction.user.id
|
11 |
balance = user_cash.get(user_id, 0)
|
12 |
|
13 |
if item is None:
|
14 |
-
embed = discord.Embed(title="Shop", description="
|
15 |
embed.add_field(name="@everyone ping", value="Price: $300,000,000", inline=False)
|
16 |
embed.set_footer(text="Use /shop @everyone to purchase")
|
17 |
await interaction.response.send_message(embed=embed)
|
18 |
elif item.lower() == "@everyone":
|
19 |
if balance >= 300000000:
|
20 |
user_cash[user_id] -= 300000000
|
21 |
-
await interaction.response.send_message("
|
22 |
await asyncio.sleep(2)
|
23 |
await interaction.channel.send("@everyone")
|
24 |
else:
|
25 |
-
await interaction.response.send_message("You don't have enough money to purchase this
|
26 |
else:
|
27 |
-
await interaction.response.send_message("Invalid item. Use /shop to see
|
|
|
4 |
|
5 |
user_cash = {}
|
6 |
|
7 |
+
@app_commands.command(name="shop", description="Buy stuff from shop")
|
8 |
@app_commands.describe(item="The item you want to buy")
|
9 |
async def shop(interaction: discord.Interaction, item: str = None):
|
10 |
user_id = interaction.user.id
|
11 |
balance = user_cash.get(user_id, 0)
|
12 |
|
13 |
if item is None:
|
14 |
+
embed = discord.Embed(title="Shop", description="stuff-", color=0x787878)
|
15 |
embed.add_field(name="@everyone ping", value="Price: $300,000,000", inline=False)
|
16 |
embed.set_footer(text="Use /shop @everyone to purchase")
|
17 |
await interaction.response.send_message(embed=embed)
|
18 |
elif item.lower() == "@everyone":
|
19 |
if balance >= 300000000:
|
20 |
user_cash[user_id] -= 300000000
|
21 |
+
await interaction.response.send_message("purchased @everyone ping will be sent in 2 seconds.")
|
22 |
await asyncio.sleep(2)
|
23 |
await interaction.channel.send("@everyone")
|
24 |
else:
|
25 |
+
await interaction.response.send_message("You don't have enough money to purchase this poor ass.")
|
26 |
else:
|
27 |
+
await interaction.response.send_message("Invalid item. Use /shop to see items.")
|