diff options
| author | 2020-11-08 23:49:06 +0100 | |
|---|---|---|
| committer | 2020-11-08 23:49:38 +0100 | |
| commit | 59b34c77b60d6f97e5d915bd0ad5cfb7d419143a (patch) | |
| tree | c8c8db657db1207071f10d7612cf4f07f3743398 | |
| parent | Voice Gate: one-line func signature (diff) | |
Voice Gate: fix cache membership check
Since the cache offers a 'contains' coro, let's use it.
If the member ID is already present in the cache, they were either
already verified, or were already pung about not being verified.
| -rw-r--r-- | bot/exts/moderation/voice_gate.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/bot/exts/moderation/voice_gate.py b/bot/exts/moderation/voice_gate.py index 0aefa5d53..2e8305227 100644 --- a/bot/exts/moderation/voice_gate.py +++ b/bot/exts/moderation/voice_gate.py @@ -199,8 +199,7 @@ class VoiceGate(Cog): log.trace("User not in a voice channel. Ignore.") return - in_cache = await self.redis_cache.get(member.id, NO_MSG) - if in_cache: + if await self.redis_cache.contains(member.id): log.trace("User already in cache. Ignore.") return |