botbotbotbot / database.py
coollsd's picture
Update database.py
668d7e6 verified
raw
history blame
475 Bytes
import discord
from discord import app_commands
from cash import user_cash, save_database
@app_commands.command(name="database", description="database")
async def database(interaction: discord.Interaction):
save_database()
try:
file = discord.File("database.txt", filename="database.txt")
await interaction.response.send_message("database:", file=file)
except FileNotFoundError:
await interaction.response.send_message("data EMPTY.")