aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/easter/egg_facts.py
diff options
context:
space:
mode:
authorGravatar ks129 <[email protected]>2020-09-24 18:54:39 +0300
committerGravatar ks129 <[email protected]>2020-09-24 18:54:39 +0300
commita3246bd40a3a496ad155d02653d3104392d9ff8e (patch)
treefffc704f2cc09c44f4727872d8ad80bad5a10ae9 /bot/exts/easter/egg_facts.py
parentTictactoe: Use __str__ instead custom display method for user/AI name display (diff)
parentMerge branch 'master' into tic-tac-toe (diff)
Merge remote-tracking branch 'origin/tic-tac-toe' into tic-tac-toe
Diffstat (limited to 'bot/exts/easter/egg_facts.py')
-rw-r--r--bot/exts/easter/egg_facts.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/exts/easter/egg_facts.py b/bot/exts/easter/egg_facts.py
index 83918fb0..0051aa50 100644
--- a/bot/exts/easter/egg_facts.py
+++ b/bot/exts/easter/egg_facts.py
@@ -6,6 +6,7 @@ from pathlib import Path
import discord
from discord.ext import commands
+from bot.bot import SeasonalBot
from bot.constants import Channels, Colours, Month
from bot.utils.decorators import seasonal_task
@@ -19,7 +20,7 @@ class EasterFacts(commands.Cog):
It also contains a background task which sends an easter egg fact in the event channel everyday.
"""
- def __init__(self, bot: commands.Bot):
+ def __init__(self, bot: SeasonalBot):
self.bot = bot
self.facts = self.load_json()
@@ -35,7 +36,7 @@ class EasterFacts(commands.Cog):
@seasonal_task(Month.APRIL)
async def send_egg_fact_daily(self) -> None:
"""A background task that sends an easter egg fact in the event channel everyday."""
- await self.bot.wait_until_ready()
+ await self.bot.wait_until_guild_available()
channel = self.bot.get_channel(Channels.seasonalbot_commands)
await channel.send(embed=self.make_embed())
@@ -55,6 +56,6 @@ class EasterFacts(commands.Cog):
)
-def setup(bot: commands.Bot) -> None:
+def setup(bot: SeasonalBot) -> None:
"""Easter Egg facts cog load."""
bot.add_cog(EasterFacts(bot))