Global Leaderboard
Relevant Issues
Closes #627
Description
This implements the global leaderboard command, it is basically a leaderboard for all the games together, if you win the coinflip, you get some points, the points you get in the trivia quiz gets added here, etc.
This feature makes use of Redis Caches (two per game) to store the game leaderboards, one being the overall leaderboard (total) and the second being the per day leaderboard which gets cleared every day at midnight UTC through a discord task loop. The overall/total leaderboard would have an additional suffix -total at the end of its cache so that it doesn't clash with the per-day leaderboard. The leaderboards are currently based on the cog qualified name, I will be adding support for getting it with the command name. The leaderboards can be initialised for a cog with the help of the Bot method ensure_leaderboard which takes in the Cog object you want to make the leaderboard for.
Currently, I have only added a helper function increment_points, if there is a need for a util function to decrement points, it can be done.
To interact with the leaderboard as a user, I have added a leaderboard cog that allows you to view per day leaderboards (overall and for a specific game) and the overall leaderboard (overall and for a specific game). It also adds an additional administrator command which can be used to clear the leaderboard if needed.
I have currently taken the coin thumbnail image as a discord image link, it would be updated once @Sn4u 's design gets finalised and merged into the branding repository.
Clear

Leaderboard (old - my preference)

Leaderboard (new - 1c9c495 - others in dev-contrib)

ToDo
- [ ] Add leaderboard support to all game/fun cogs. This would be done at a later stage once the core functionality gets reviewed. I have added an example (coinflip command) so the reviewers can test the code easily and know how it works.
Did you:
- [X] Join the Python Discord Community?
- [X] Read all the comments in this template?
- [X] Ensure there is an issue open, or link relevant discord discussions?
- [X] Read and agree to the contributing guidelines?
@Bluenix2 Would you perhaps like to take over this PR?
I'll be closing this PR due to staleness.
If anyone would like to pick up this PR, feel free to ping me so I can assign, along with the PR getting re-opened.