lunarflu HF staff commited on
Commit
4753c81
·
1 Parent(s): 7c420c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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: