botbotbotbot / database.py
coollsd's picture
Update database.py
87f59cd verified
raw
history blame
489 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()
with open("database.txt", "r") as f:
content = f.read()
if content:
await interaction.response.send_message(f"database :\n```\n{content}\n```")
else:
await interaction.response.send_message("The database is empty.")