Skip to content

Commit 248f503

Browse files
committed
minor tweaks and changes, fixes for 2022
This is not fully ready for 2022 AoC, still need to make sure our leaderboard stays up to date
1 parent 412efe8 commit 248f503

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

bot/cogs/advent_of_code.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class AdventOfCode(Cog):
13-
"""Cog for AOC 2021 for small features."""
13+
"""Commands for Advent of Code."""
1414

1515
def __init__(self, bot: Friendo):
1616
self.bot = bot
@@ -29,8 +29,8 @@ def sort_stats(stat_d: dict) -> dict:
2929
return stats
3030

3131
@group(name="AdventofCode",
32-
aliases=('aoc', 'aoc2021'),
33-
brief="Small commands for AoC 2021",
32+
aliases=("aoc", "advent"),
33+
brief="Commands for our AoC leaderboard",
3434
usage=".aoc [command]")
3535
async def aoc_group(self, ctx: Context) -> None:
3636
"""Group for advent of code commands."""
@@ -55,11 +55,11 @@ async def join_leaderboard(self, ctx: Context) -> None:
5555
except errors.Forbidden:
5656
await ctx.send(error_msg)
5757

58-
@aoc_group.command(brief="Get the leaderboard of AoC 2021 for the Code Collective server",
58+
@aoc_group.command(brief="Get the Friendo leaderboard for the most recent Advent of Code",
5959
usage=".aoc leaderboard",
6060
aliases=('lb', 'board'))
6161
async def leaderboard(self, ctx: Context) -> None:
62-
"""Shows the leaderboard of code collective server for AoC 2021."""
62+
"""Shows Friendo's Advent of Code leaderboard."""
6363
async with ctx.channel.typing():
6464
cookies = {'session': AOC_SESSION_COOKIE}
6565
async with self.bot.session.get(AOC_LEADERBOARD_LINK, cookies=cookies) as stats:
@@ -70,13 +70,13 @@ async def leaderboard(self, ctx: Context) -> None:
7070

7171
for name_star, score in sorted_stats.items():
7272
msg.append(
73-
f"{count} | {name_star[0] + ' '*(16-len(name_star[0]))} "
73+
f"{count} | {name_star[0] + ' ' * (16-len(name_star[0]))} "
7474
f"| {name_star[1]} ★ | {score}")
7575
count += 1
7676

7777
msg = '\n'.join(msg)
78-
await ctx.send("🎄 Advent of Code 2021 leaderboard for Code Collective 🎄")
79-
await ctx.send(f"``` | Name {' '*(16-4)}| Stars | Score\n{msg}```")
78+
await ctx.send("🎄 Advent of Code 2022 leaderboard for Friendo 🎄")
79+
await ctx.send(f"``` | Name {' ' * 12}| Stars | Score\n{msg}```")
8080

8181

8282
async def setup(bot: Friendo) -> None:

0 commit comments

Comments
 (0)