Spaces:
Building
Building
File size: 735 Bytes
d88da53 e55d505 d88da53 e55d505 d88da53 e55d505 d88da53 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import discord
from discord import app_commands
from cash import user_cash
@app_commands.command(name="admincash", description="admin 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) |