Spaces:
Building
Building
import discord | |
from discord import app_commands | |
from cash import user_cash | |
async def admincash(interaction: discord.Interaction, user: discord.User, amount: int): | |
if interaction.user.id != 696434794174611477: | |
await interaction.response.send_message("no.", ephemeral=True) | |
return | |
user_cash[user.id] = user_cash.get(user.id, 0) + amount | |
new_balance = user_cash[user.id] | |
embed = discord.Embed(title="Admin Cash Added", description=f"Added ${amount:.2f} to {user.name}'s balance", color=0x787878) | |
embed.add_field(name="New Balance", value=f"${new_balance:.2f}", inline=False) | |
await interaction.response.send_message(embed=embed) |