10
10
11
11
12
12
class AdventOfCode (Cog ):
13
- """Cog for AOC 2021 for small features ."""
13
+ """Commands for Advent of Code ."""
14
14
15
15
def __init__ (self , bot : Friendo ):
16
16
self .bot = bot
@@ -29,8 +29,8 @@ def sort_stats(stat_d: dict) -> dict:
29
29
return stats
30
30
31
31
@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 " ,
34
34
usage = ".aoc [command]" )
35
35
async def aoc_group (self , ctx : Context ) -> None :
36
36
"""Group for advent of code commands."""
@@ -55,11 +55,11 @@ async def join_leaderboard(self, ctx: Context) -> None:
55
55
except errors .Forbidden :
56
56
await ctx .send (error_msg )
57
57
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 " ,
59
59
usage = ".aoc leaderboard" ,
60
60
aliases = ('lb' , 'board' ))
61
61
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 ."""
63
63
async with ctx .channel .typing ():
64
64
cookies = {'session' : AOC_SESSION_COOKIE }
65
65
async with self .bot .session .get (AOC_LEADERBOARD_LINK , cookies = cookies ) as stats :
@@ -70,13 +70,13 @@ async def leaderboard(self, ctx: Context) -> None:
70
70
71
71
for name_star , score in sorted_stats .items ():
72
72
msg .append (
73
- f"{ count } | { name_star [0 ] + ' ' * (16 - len (name_star [0 ]))} "
73
+ f"{ count } | { name_star [0 ] + ' ' * (16 - len (name_star [0 ]))} "
74
74
f"| { name_star [1 ]} ★ | { score } " )
75
75
count += 1
76
76
77
77
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 } ```" )
80
80
81
81
82
82
async def setup (bot : Friendo ) -> None :
0 commit comments