lunarflu HF staff commited on
Commit
fa46345
1 Parent(s): 6b5ae25

top_users debugging

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -24,8 +24,6 @@ async def on_ready():
24
  print(f'Logged in as {bot.user.name}')
25
  print(f"XP_PER_MESSAGE: {XP_PER_MESSAGE}")
26
  print(f"xp_data: {xp_data}")
27
- for author in xp_data:
28
- print(f"XP people: {author}")
29
 
30
 
31
  try:
@@ -78,8 +76,7 @@ async def top_users(ctx, limit: int = 10):
78
  channel = discord.utils.get(ctx.guild.text_channels, name="general") # Replace with your channel name
79
 
80
  async for message in channel.history(limit=None):
81
- if not message.author.bot:
82
- message_counts[message.author] = message_counts.get(message.author, 0) + 1
83
 
84
  sorted_users = sorted(message_counts.items(), key=lambda x: x[1], reverse=True)
85
  top_list = "\n".join([f"{member.name}: {count}" for member, count in sorted_users[:limit]])
 
24
  print(f'Logged in as {bot.user.name}')
25
  print(f"XP_PER_MESSAGE: {XP_PER_MESSAGE}")
26
  print(f"xp_data: {xp_data}")
 
 
27
 
28
 
29
  try:
 
76
  channel = discord.utils.get(ctx.guild.text_channels, name="general") # Replace with your channel name
77
 
78
  async for message in channel.history(limit=None):
79
+ message_counts[message.author] = message_counts.get(message.author, 0) + 1
 
80
 
81
  sorted_users = sorted(message_counts.items(), key=lambda x: x[1], reverse=True)
82
  top_list = "\n".join([f"{member.name}: {count}" for member, count in sorted_users[:limit]])