botbotbotbot / cash.py
coollsd's picture
Update cash.py
419fd00 verified
raw
history blame
706 Bytes
import discord
from discord import app_commands
user_cash = {}
@app_commands.command(name="cash", description="check the current cash u got")
async def cash(interaction: discord.Interaction):
user_id = interaction.user.id
balance = user_cash.get(user_id, 0)
if balance == 0:
user_cash[user_id] = 100
balance = 100
message = "you are too poor so here is $100 free"
else:
message = f"Your current balance is ${balance:.2f}"
embed = discord.Embed(title="Cash Balance", description=message, color=0x787878)
embed.set_footer(text="Use /dice to bet your cash or use pet roll to get more cash!")
await interaction.response.send_message(embed=embed)