aboutsummaryrefslogtreecommitdiffstats
path: root/bot/cogs/reminders.py
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-10-12 00:03:00 +0200
committerGravatar Johannes Christ <[email protected]>2019-10-12 00:03:00 +0200
commit25a7f542d40b00f14f74cbfbf8a967ee683b4ce4 (patch)
tree3329ffe2fc8ed7e5c92fb5282b58818560756f08 /bot/cogs/reminders.py
parentAdd typehints. (diff)
parentMerge pull request #506 from python-discord/token-regex-tweak (diff)
Merge branch 'master' into bot-utils-time-tests
Diffstat (limited to '')
-rw-r--r--bot/cogs/reminders.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/cogs/reminders.py b/bot/cogs/reminders.py
index 6e91d2c06..b54622306 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'}