diff options
| author | 2022-08-23 21:50:40 +0100 | |
|---|---|---|
| committer | 2022-09-21 23:02:57 +0100 | |
| commit | 8fc2ff954fbdfead73825f13d95a876fea5588a3 (patch) | |
| tree | 7915b736a4b44a8389002e862bb94d4899c36bda /bot/exts/holidays | |
| parent | Add dependabot config (diff) | |
Move init tasks to async cog_load functions
Diffstat (limited to 'bot/exts/holidays')
| -rw-r--r-- | bot/exts/holidays/halloween/spookynamerate.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bot/exts/holidays/halloween/spookynamerate.py b/bot/exts/holidays/halloween/spookynamerate.py index 8c801a2f..5d41ce6d 100644 --- a/bot/exts/holidays/halloween/spookynamerate.py +++ b/bot/exts/holidays/halloween/spookynamerate.py @@ -95,8 +95,6 @@ class SpookyNameRate(Cog): self.bot = bot self.name = None - self.bot.loop.create_task(self.load_vars()) - self.first_time = None self.poll = False self.announce_name.start() @@ -104,7 +102,7 @@ class SpookyNameRate(Cog): # Define an asyncio.Lock() to make sure the dictionary isn't changed # when checking the messages for duplicate emojis' - async def load_vars(self) -> None: + async def cog_load(self) -> None: """Loads the variables that couldn't be loaded in __init__.""" self.first_time = await self.data.get("first_time", True) self.name = await self.data.get("name") |