File size: 1,232 Bytes
18658fd
 
 
bc9d5bd
18658fd
bc9d5bd
18658fd
 
 
 
 
 
bc9d5bd
 
18658fd
 
 
efac8b2
 
bc9d5bd
18658fd
 
 
3589528
18658fd
bc9d5bd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import discord
from discord import app_commands
import asyncio
from cash import user_cash

@app_commands.command(name="shop", description="Buy items from the shop")
@app_commands.describe(item="The item you want to buy")
async def shop(interaction: discord.Interaction, item: str = None):
    user_id = interaction.user.id
    balance = user_cash.get(user_id, 0)

    if item is None:
        embed = discord.Embed(title="Shop", description="items-", color=0x787878)
        embed.add_field(name="@everyone / ping", value="Price: $300,000,000", inline=False)
        embed.set_footer(text="Use /shop @everyone to purchase")
        await interaction.response.send_message(embed=embed)
    elif item.lower() == "@everyone":
        if balance >= 300000000:
            user_cash[user_id] -= 300000000
            await interaction.response.send_message("Item bought @everyone ping will be sent in 2 seconds.")
            await asyncio.sleep(2)
            await interaction.channel.send("@everyone")
        else:
            await interaction.response.send_message("You don't have enough money to purchase this poor ass.")
    else:
        await interaction.response.send_message("Invalid item. Use /shop to see available items.")