diff options
| -rw-r--r-- | bot/exts/christmas/advent_of_code/_cog.py | 2 | ||||
| -rw-r--r-- | bot/exts/christmas/advent_of_code/_helpers.py | 7 | 
2 files changed, 6 insertions, 3 deletions
| diff --git a/bot/exts/christmas/advent_of_code/_cog.py b/bot/exts/christmas/advent_of_code/_cog.py index 8c07cdb4..c3b87f96 100644 --- a/bot/exts/christmas/advent_of_code/_cog.py +++ b/bot/exts/christmas/advent_of_code/_cog.py @@ -39,7 +39,7 @@ class AdventOfCode(commands.Cog):          self.countdown_task = None          self.status_task = None -        notification_coro = _helpers.new_puzzle_announcement(self.bot) +        notification_coro = _helpers.new_puzzle_notification(self.bot)          self.notification_task = self.bot.loop.create_task(notification_coro)          self.notification_task.set_name("Daily AoC Notification")          self.notification_task.add_done_callback(_helpers.background_task_callback) diff --git a/bot/exts/christmas/advent_of_code/_helpers.py b/bot/exts/christmas/advent_of_code/_helpers.py index f8c0dc22..b7adc895 100644 --- a/bot/exts/christmas/advent_of_code/_helpers.py +++ b/bot/exts/christmas/advent_of_code/_helpers.py @@ -464,7 +464,10 @@ async def countdown_status(bot: Bot) -> None:      log.info("The Advent of Code has started or will start soon, starting countdown status.")      # Trying to change status too early in the bot's startup sequence will fail -    # the task. Waiting until this event seems to work well. +    # the task because the websocket instance has not yet been created. Waiting +    # for this event means that both the websocket instance has been initialized +    # and that the connection to Discord is mature enough to change the presence +    # of the bot.      await bot.wait_until_guild_available()      # Calculate when the task needs to stop running. To prevent the task from @@ -501,7 +504,7 @@ async def countdown_status(bot: Bot) -> None:          await asyncio.sleep(delay) -async def new_puzzle_announcement(bot: Bot) -> None: +async def new_puzzle_notification(bot: Bot) -> None:      """      Announce the release of a new Advent of Code puzzle. | 
