Spaces:
Building
Building
import discord | |
from discord import app_commands | |
from cash import user_cash, save_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.") |