diff options
author | 2020-11-30 01:52:08 +0100 | |
---|---|---|
committer | 2020-11-30 01:52:08 +0100 | |
commit | c6b89c21dc7d73e4286cf67df421772c1e6df77d (patch) | |
tree | aa7a258f807221cd50462bb001824802ca8e43d3 | |
parent | Fix docstrings and add a few explanatory comments (diff) |
Add global leaderboard command back
I accidentally removed the global leaderboard command. I've added it
back!
-rw-r--r-- | bot/exts/christmas/advent_of_code/_cog.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/bot/exts/christmas/advent_of_code/_cog.py b/bot/exts/christmas/advent_of_code/_cog.py index 19baca93..3d1d268f 100644 --- a/bot/exts/christmas/advent_of_code/_cog.py +++ b/bot/exts/christmas/advent_of_code/_cog.py @@ -282,6 +282,22 @@ class AdventOfCode(commands.Cog): await ctx.send(content=f"{header}\n\n{table}", embed=info_embed) @adventofcode_group.command( + name="global", + aliases=("globalboard", "gb"), + brief="Get a link to the global leaderboard", + ) + @override_in_channel(AOC_WHITELIST) + async def aoc_global_leaderboard(self, ctx: commands.Context) -> None: + """Get a link to the global Advent of Code leaderboard.""" + url = self.global_leaderboard_url + global_leaderboard = discord.Embed( + title="Advent of Code — Global Leaderboard", + description=f"You can find the global leaderboard [here]({url})." + ) + global_leaderboard.set_thumbnail(url=_helpers.AOC_EMBED_THUMBNAIL) + await ctx.send(embed=global_leaderboard) + + @adventofcode_group.command( name="stats", aliases=("dailystats", "ds"), brief="Get daily statistics for the Python Discord leaderboard" |