aboutsummaryrefslogtreecommitdiffstats
path: root/bot/cogs/reminders.py
diff options
context:
space:
mode:
authorGravatar sco1 <[email protected]>2019-09-18 14:00:57 -0700
committerGravatar sco1 <[email protected]>2019-09-18 14:10:06 -0700
commit2ac0c6df978f20a488b3eb026753c8a972cb2554 (patch)
tree43fc70b14b517139dea5324e762ba92a9e211e28 /bot/cogs/reminders.py
parentDocstring linting chunk 7 (diff)
parentMerge pull request #436 from python-discord/enhance-offtopicnames-search (diff)
Merge branch 'master' into flake8-plugins
Diffstat (limited to '')
-rw-r--r--bot/cogs/reminders.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/cogs/reminders.py b/bot/cogs/reminders.py
index d9f6f6536..ff0a6eb1a 100644
--- a/bot/cogs/reminders.py
+++ b/bot/cogs/reminders.py
@@ -7,7 +7,7 @@ from operator import itemgetter
from dateutil.relativedelta import relativedelta
from discord import Colour, Embed
-from discord.ext.commands import Bot, Context, group
+from discord.ext.commands import Bot, Cog, Context, group
from bot.constants import Channels, Icons, NEGATIVE_REPLIES, POSITIVE_REPLIES, STAFF_ROLES
from bot.converters import ExpirationDate
@@ -22,13 +22,14 @@ WHITELISTED_CHANNELS = (Channels.bot,)
MAXIMUM_REMINDERS = 5
-class Reminders(Scheduler):
+class Reminders(Scheduler, Cog):
"""Provide in-channel reminder functionality."""
def __init__(self, bot: Bot):
self.bot = bot
super().__init__()
+ @Cog.listener()
async def on_ready(self) -> None:
"""Reschedule all current reminders."""
response = await self.bot.api_client.get(