UQComputingSociety / uqcsbot-discord

:mortar_board: UQCSbot: Our friendly little Discord bot
https://discord.uqcs.org
MIT License
20 stars 20 forks source link

Fixed the bug crashing leaderboards from anonymous users #185

Closed 49Indium closed 12 months ago

49Indium commented 12 months ago

The name provided by the AOC JSON is null if the user is anonymous. This is not corrected (and pyright doesn't pick up this error, as JSON is typed as Dict[str, Any]), so causes an error when displaying leaderboards of an anonymous user. this just make people have the name "Anon" if they don't have an AOC name.