We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb4251a commit 79aba9bCopy full SHA for 79aba9b
bot.py
@@ -215,9 +215,10 @@ async def leaderboard_global(interaction: discord.Interaction):
215
216
for guild_stats in data['stats'].values():
217
for user_id, stats in guild_stats.items():
218
- if user_id not in global_stats:
219
- global_stats[user_id] = 0
220
- global_stats[user_id] += stats['count_69']
+ if isinstance(stats, dict) and 'count_69' in stats:
+ if user_id not in global_stats:
+ global_stats[user_id] = 0
221
+ global_stats[user_id] += stats['count_69']
222
223
leaderboard = sorted(global_stats.items(), key=lambda x: x[1], reverse=True)
224
embed = discord.Embed(title="Classement global des utilisateurs avec le plus de 69", color=discord.Color.gold())
0 commit comments