diff options
| author | 2019-10-19 12:05:01 +0200 | |
|---|---|---|
| committer | 2019-10-19 12:05:01 +0200 | |
| commit | c6fe0050ba798932165fc74161e3739dcc453427 (patch) | |
| tree | 6357417b042b9f33de977a9e5cb6aa71e9fb1c5d /bot/cogs/reminders.py | |
| parent | Delete “confirmation echo” (diff) | |
| parent | Fix rule alias. (#537) (diff) | |
Merge branch 'master' of https://github.com/python-discord/bot into reminder-up
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/reminders.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/cogs/reminders.py b/bot/cogs/reminders.py index d06dbcc7f..b8dafcd05 100644 --- a/bot/cogs/reminders.py +++ b/bot/cogs/reminders.py @@ -30,9 +30,11 @@ class Reminders(Scheduler, Cog): self.bot = bot super().__init__() - @Cog.listener() - async def on_ready(self) -> None: + self.bot.loop.create_task(self.reschedule_reminders()) + + async def reschedule_reminders(self) -> None: """Get all current reminders from the API and reschedule them.""" + await self.bot.wait_until_ready() response = await self.bot.api_client.get( 'bot/reminders', params={'active': 'true'} |