Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -52,9 +52,11 @@ async def save_forum(ctx, channel_id: int):
|
|
52 |
threads = channel.threads
|
53 |
messages = []
|
54 |
for thread in threads:
|
|
|
55 |
async for message in thread.history(limit=None):
|
56 |
messages.append(message)
|
57 |
-
|
|
|
58 |
print(messages) # debug
|
59 |
|
60 |
with open("gradio-questions.json", 'w', encoding='utf-8') as file:
|
|
|
52 |
threads = channel.threads
|
53 |
messages = []
|
54 |
for thread in threads:
|
55 |
+
messages.append(thread.name)
|
56 |
async for message in thread.history(limit=None):
|
57 |
messages.append(message)
|
58 |
+
|
59 |
+
messages = messages.reversed()
|
60 |
print(messages) # debug
|
61 |
|
62 |
with open("gradio-questions.json", 'w', encoding='utf-8') as file:
|