This PR removes most comments that are redundant to the end user.
It also adds a filter to the leaderboard, allowing users to change how the top users are sorted by.
It also improves the UX by changing the formatting style.
There are several filters available for use.
Note
If you wish to set a limit to the number of users displayed on the leaderboard, for example the top 10 users, then insert the following line of code when looping through the sql-fetched query results:
for member in data:
if index > 10:
break
Do note however, that adding this change will result in a decline in performance.
Additional Context
In the past, users would only get to see a leaderboard that displayed the users with the most currency. It considered all the mediums in which it came from, but there were no other stats to filter out the top users by. This PR aims to change that.
Summary
Note
If you wish to set a limit to the number of users displayed on the leaderboard, for example the top 10 users, then insert the following line of code when looping through the sql-fetched query results:
Do note however, that adding this change will result in a decline in performance.
Additional Context
In the past, users would only get to see a leaderboard that displayed the users with the most currency. It considered all the mediums in which it came from, but there were no other stats to filter out the top users by. This PR aims to change that.