Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
@@ -80,8 +80,8 @@ async def count_messages(ctx, channel_name: str):
|
|
80 |
|
81 |
message_counts = {}
|
82 |
async for message in channel.history(limit=None):
|
83 |
-
if not message.author.bot:
|
84 |
-
|
85 |
|
86 |
sorted_users = sorted(message_counts.items(), key=lambda x: x[1], reverse=True)
|
87 |
top_list = "\n".join([f"{member.name}: {count}" for member, count in sorted_users])
|
|
|
80 |
|
81 |
message_counts = {}
|
82 |
async for message in channel.history(limit=None):
|
83 |
+
#if not message.author.bot:
|
84 |
+
message_counts[message.author] = message_counts.get(message.author, 0) + 1
|
85 |
|
86 |
sorted_users = sorted(message_counts.items(), key=lambda x: x[1], reverse=True)
|
87 |
top_list = "\n".join([f"{member.name}: {count}" for member, count in sorted_users])
|