Skip to content

Commit f5634d6

Browse files
update completionist count
1 parent 64638ab commit f5634d6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bot/exts/advent_of_code/_cog.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ async def cog_load(self) -> None:
8282
@tasks.loop(minutes=10.0)
8383
async def completionist_task(self) -> None:
8484
"""
85-
Give members who have completed all 50 AoC stars the completionist role.
85+
Give members who have completed all AoC stars for this year the completionist role.
8686
8787
Runs on a schedule, as defined in the task.loop decorator.
8888
"""
@@ -107,8 +107,8 @@ async def completionist_task(self) -> None:
107107
placement_leaderboard = json.loads(leaderboard["placement_leaderboard"])
108108

109109
for member_aoc_info in placement_leaderboard.values():
110-
if member_aoc_info["stars"] != 50:
111-
# Only give the role to people who have completed all 50 stars
110+
if member_aoc_info["stars"] <= _helpers.STARS_THIS_YEAR:
111+
# Only give the role to people who have completed all stars for this year
112112
continue
113113

114114
aoc_name = member_aoc_info["name"] or f"Anonymous #{member_aoc_info['id']}"

bot/exts/advent_of_code/_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def days_in_year(year:int | None = None) -> int:
6565
return 25 if year < 2025 else 12
6666

6767
DAYS_THIS_YEAR = days_in_year()
68-
68+
STARS_THIS_YEAR = DAYS_THIS_YEAR
6969

7070
class UnexpectedRedirect(aiohttp.ClientError):
7171
"""Raised when an unexpected redirect was detected."""

0 commit comments

Comments
 (0)