Temporary attempt. Makes assumption that a user will submit a better score.

This commit is contained in:
alwayscompiling
2022-07-10 21:47:01 -04:00
parent 4a15c63e8c
commit 82f47ac136
+7 -1
View File
@@ -98,7 +98,13 @@ async def submit_score(
score_tuple = (user, int(score))
sort_index = 1
scores = highscores_data[boss_name]["categories"][category]
scores: "list[tuple]" = highscores_data[boss_name]["categories"][category]
# if user is in an existing tuple, delete it.
for tup in scores:
if user == tup[0]:
scores.remove(tup)
scores.append(score_tuple)
# sort scores.