Spaces:
Building
Building
Update database.py
Browse files- database.py +5 -7
database.py
CHANGED
@@ -6,10 +6,8 @@ from cash import user_cash, save_database
|
|
6 |
async def database(interaction: discord.Interaction):
|
7 |
save_database()
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
await interaction.response.send_message(
|
14 |
-
else:
|
15 |
-
await interaction.response.send_message("The database is empty.")
|
|
|
6 |
async def database(interaction: discord.Interaction):
|
7 |
save_database()
|
8 |
|
9 |
+
try:
|
10 |
+
file = discord.File("database.txt", filename="database.txt")
|
11 |
+
await interaction.response.send_message("database:", file=file)
|
12 |
+
except FileNotFoundError:
|
13 |
+
await interaction.response.send_message("data EMPTY.")
|
|
|
|