aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-08-04 20:19:00 +0200
committerGravatar kwzrd <[email protected]>2020-08-04 21:53:19 +0200
commitb1d761cecf5612d49de47c50994e12ab45b20e5e (patch)
tree3a920af17a4792b8ea7405b3e95ae63578d406fe
parentVerification: comment message uses (diff)
Verification: add reminder cache
-rw-r--r--bot/cogs/verification.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/bot/cogs/verification.py b/bot/cogs/verification.py
index 3502fe5b5..e32224554 100644
--- a/bot/cogs/verification.py
+++ b/bot/cogs/verification.py
@@ -13,6 +13,7 @@ from bot.bot import Bot
from bot.cogs.moderation import ModLog
from bot.decorators import in_whitelist, without_role
from bot.utils.checks import InWhitelistCheckFailure, without_role_check
+from bot.utils.redis_cache import RedisCache
log = logging.getLogger(__name__)
@@ -71,6 +72,10 @@ REMINDER_FREQUENCY = 28 # Hours to wait between sending `REMINDER_MESSAGE`
class Verification(Cog):
"""User verification and role self-management."""
+ # Cache last sent `REMINDER_MESSAGE` id
+ # RedisCache[str, discord.Message.id]
+ reminder_cache = RedisCache()
+
def __init__(self, bot: Bot) -> None:
"""Start `update_unverified_members` task."""
self.bot = bot