diff options
author | 2019-10-04 09:37:42 -0700 | |
---|---|---|
committer | 2019-10-04 09:39:19 -0700 | |
commit | 700ecc02670bf4756def7468b0c7b210ab46723a (patch) | |
tree | 260da72c21a0691181d49d2cfa6fb35a55bb517c | |
parent | Fix rescheduling of infractions when cog is reloaded (diff) |
Wait until the bot is ready before reschedule infractions
-rw-r--r-- | bot/cogs/moderation/infractions.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bot/cogs/moderation/infractions.py b/bot/cogs/moderation/infractions.py index 66f72b1e0..ecb202ab2 100644 --- a/bot/cogs/moderation/infractions.py +++ b/bot/cogs/moderation/infractions.py @@ -45,6 +45,8 @@ class Infractions(Scheduler, commands.Cog): async def reschedule_infractions(self) -> None: """Schedule expiration for previous infractions.""" + await self.bot.wait_until_ready() + infractions = await self.bot.api_client.get( 'bot/infractions', params={'active': 'true'} |