diff options
author | 2021-05-18 14:47:38 +0530 | |
---|---|---|
committer | 2021-05-18 14:47:38 +0530 | |
commit | a7d1297ea5926284a18f0c4ef23a42be1646cbe4 (patch) | |
tree | 2f473facd6127dcaed3d354e5743e1b6033bbf68 | |
parent | Let on_message event handler delete bot voice pings. (diff) |
Update _ping_newcomer() func docstring.
-rw-r--r-- | bot/exts/moderation/voice_gate.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/exts/moderation/voice_gate.py b/bot/exts/moderation/voice_gate.py index 976ab2653..94b23a344 100644 --- a/bot/exts/moderation/voice_gate.py +++ b/bot/exts/moderation/voice_gate.py @@ -8,6 +8,7 @@ from async_rediscache import RedisCache from discord import Colour, Member, VoiceState from discord.ext.commands import Cog, Context, command + from bot.api import ResponseCodeError from bot.bot import Bot from bot.constants import Channels, Event, MODERATION_ROLES, Roles, VoiceGate as GateConf @@ -85,11 +86,12 @@ class VoiceGate(Cog): """ See if `member` should be sent a voice verification notification, and send it if so. - Returns False if the notification was not sent. This happens when: + Returns (False, None) if the notification was not sent. This happens when: * The `member` has already received the notification * The `member` is already voice-verified - Otherwise, the notification message ID is stored in `redis_cache` and True is returned. + Otherwise, the notification message ID is stored in `redis_cache` and return (True, channel). + channel is either [discord.TextChannel, discord.DMChannel]. """ if await self.redis_cache.contains(member.id): log.trace("User already in cache. Ignore.") |