Skip to content

Commit

Permalink
Stop event directly after last puzzle is posted
Browse files Browse the repository at this point in the history
  • Loading branch information
camcaswell committed Jul 8, 2022
1 parent 56015c4 commit f40ae59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bot/exts/summer_aoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ async def stop_event(self) -> bool:
async def post_puzzle(self) -> None:
"""Create a thread for the current day's puzzle."""
if self.current_day > LAST_DAY:
log.info(f"Attempted to post puzzle after last day, stopping event")
log.error(f"Attempted to post puzzle after last day, stopping event")
await self.stop_event()
return

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

self.current_day += 1
await self.save_event_state()
if self.current_day > LAST_DAY:
await self.stop_event()

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

0 comments on commit f40ae59

Please sign in to comment.