Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
debugging missing levels
Browse files
app.py
CHANGED
@@ -246,9 +246,13 @@ async def update_leaderboard(ctx, num_results: int = 10):
|
|
246 |
|
247 |
# for 3 lists
|
248 |
combined_list = [list(sublist) for sublist in zip(names_list, levels_list, exp_list)]
|
|
|
249 |
combined_list = sorted(combined_list, key=lambda x: x[1], reverse=True)
|
|
|
250 |
combined_list = [[name, int(level), int(exp)] for name, level, exp in combined_list]
|
|
|
251 |
top_results = combined_list[:num_results]
|
|
|
252 |
|
253 |
"""
|
254 |
# get position, then find that value in updated_names_list
|
@@ -260,6 +264,7 @@ async def update_leaderboard(ctx, num_results: int = 10):
|
|
260 |
|
261 |
|
262 |
# remove huggingfolks
|
|
|
263 |
guild = ctx.guild
|
264 |
role = discord.utils.get(guild.roles, id=897376942817419265)
|
265 |
if role is None:
|
@@ -269,7 +274,10 @@ async def update_leaderboard(ctx, num_results: int = 10):
|
|
269 |
top_results = [r for r in top_results if r[0] not in members_with_role]
|
270 |
|
271 |
for name, level, xp in top_results:
|
272 |
-
print(f"Name: {name}, Level: {level}, Exp: {xp}")
|
|
|
|
|
|
|
273 |
|
274 |
|
275 |
def xp_required_to_next_level(current_level, current_xp):
|
|
|
246 |
|
247 |
# for 3 lists
|
248 |
combined_list = [list(sublist) for sublist in zip(names_list, levels_list, exp_list)]
|
249 |
+
print(combined_list)
|
250 |
combined_list = sorted(combined_list, key=lambda x: x[1], reverse=True)
|
251 |
+
print(combined_list)
|
252 |
combined_list = [[name, int(level), int(exp)] for name, level, exp in combined_list]
|
253 |
+
print(combined_list)
|
254 |
top_results = combined_list[:num_results]
|
255 |
+
print(top_results)
|
256 |
|
257 |
"""
|
258 |
# get position, then find that value in updated_names_list
|
|
|
264 |
|
265 |
|
266 |
# remove huggingfolks
|
267 |
+
"""
|
268 |
guild = ctx.guild
|
269 |
role = discord.utils.get(guild.roles, id=897376942817419265)
|
270 |
if role is None:
|
|
|
274 |
top_results = [r for r in top_results if r[0] not in members_with_role]
|
275 |
|
276 |
for name, level, xp in top_results:
|
277 |
+
print(f"Name: {name}, Level: {level}, Exp: {xp}")
|
278 |
+
|
279 |
+
"""
|
280 |
+
|
281 |
|
282 |
|
283 |
def xp_required_to_next_level(current_level, current_xp):
|