aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-11-10 18:33:31 +0100
committerGravatar kwzrd <[email protected]>2020-11-10 21:15:44 +0100
commitb32174b4bcf55eef15dd4bd44d1a9676f86934b9 (patch)
treeee203d3a94c79e6e0749f4c6034687d9ebf7a293
parentVoice Gate: ensure atomicity when notifying users (diff)
Voice Gate: explain the purpose of `NO_MSG`
-rw-r--r--bot/exts/moderation/voice_gate.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/bot/exts/moderation/voice_gate.py b/bot/exts/moderation/voice_gate.py
index 0c0e93d42..4d48d2c1b 100644
--- a/bot/exts/moderation/voice_gate.py
+++ b/bot/exts/moderation/voice_gate.py
@@ -18,6 +18,10 @@ from bot.utils.checks import InWhitelistCheckFailure
log = logging.getLogger(__name__)
+# Flag written to the cog's RedisCache as a value when the Member's (key) notification
+# was already removed ~ this signals both that no further notifications should be sent,
+# and that the notification does not need to be removed. The implementation relies on
+# this being falsey!
NO_MSG = 0
FAILED_MESSAGE = (