aboutsummaryrefslogtreecommitdiffstats
path: root/bot/cogs/reminders.py
diff options
context:
space:
mode:
authorGravatar Akarys42 <[email protected]>2019-10-19 12:05:01 +0200
committerGravatar Akarys42 <[email protected]>2019-10-19 12:05:01 +0200
commitc6fe0050ba798932165fc74161e3739dcc453427 (patch)
tree6357417b042b9f33de977a9e5cb6aa71e9fb1c5d /bot/cogs/reminders.py
parentDelete “confirmation echo” (diff)
parentFix 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.py6
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'}