Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,16 @@ async def save_forum(ctx, channel_id: int):
|
|
62 |
}
|
63 |
messages_data.append(message_data)
|
64 |
|
|
|
|
|
|
|
|
|
65 |
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
|
68 |
|
|
|
62 |
}
|
63 |
messages_data.append(message_data)
|
64 |
|
65 |
+
|
66 |
+
print(messages_data)
|
67 |
+
with open("gradio-questions.json", 'w', encoding='utf-8') as file:
|
68 |
+
file.write(f"{messages_data}\n")
|
69 |
|
70 |
+
await ctx.send(f"Messages from {channel.name} saved to gradio-questions.json")
|
71 |
+
|
72 |
+
with open("gradio-questions.json", 'rb') as file:
|
73 |
+
discord_file = discord.File(file)
|
74 |
+
await ctx.send(file=discord_file)
|
75 |
|
76 |
|
77 |
|