lunarflu HF staff commited on
Commit
319ee89
1 Parent(s): e32943a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -265,8 +265,10 @@ async def top_gradio_threads(ctx, channel_id):
265
  message_counts[message.author] = message_counts.get(message.author, 0) + 1
266
 
267
  async for thread in channel.archived_threads(limit=None):
268
- print(f"ARCHIVED Thread Name: {thread.name}, ARCHIVED Thread ID: {thread.id}, Parent ID: {thread.parent_id}")
269
- message_counts[message.author] = message_counts.get(message.author, 0) + 1
 
 
270
 
271
 
272
  sorted_users = sorted(message_counts.items(), key=lambda x: x[1], reverse=True)
 
265
  message_counts[message.author] = message_counts.get(message.author, 0) + 1
266
 
267
  async for thread in channel.archived_threads(limit=None):
268
+ print(f"ARCHIVED Thread Name: {thread.name}, ARCHIVED Thread ID: {thread.id}, Parent ID: {thread.parent_id}")
269
+ async for message in thread.history(limit=None):
270
+ message_counts[message.author] = message_counts.get(message.author, 0) + 1
271
+
272
 
273
 
274
  sorted_users = sorted(message_counts.items(), key=lambda x: x[1], reverse=True)