Skip to content

Commit f40ae59

Browse files
committed
Stop event directly after last puzzle is posted
1 parent 56015c4 commit f40ae59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bot/exts/summer_aoc.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ async def stop_event(self) -> bool:
257257
async def post_puzzle(self) -> None:
258258
"""Create a thread for the current day's puzzle."""
259259
if self.current_day > LAST_DAY:
260-
log.info(f"Attempted to post puzzle after last day, stopping event")
260+
log.error(f"Attempted to post puzzle after last day, stopping event")
261261
await self.stop_event()
262262
return
263263

@@ -271,6 +271,8 @@ async def post_puzzle(self) -> None:
271271

272272
self.current_day += 1
273273
await self.save_event_state()
274+
if self.current_day > LAST_DAY:
275+
await self.stop_event()
274276

275277
def get_info_embed(self) -> discord.Embed:
276278
"""Generate an embed with info about the event state."""

0 commit comments

Comments
 (0)