diff options
| author | 2020-08-06 13:12:06 +0200 | |
|---|---|---|
| committer | 2020-08-06 13:14:50 +0200 | |
| commit | b1c800c623f90f46c4ecaff8da2269efcd04ee05 (patch) | |
| tree | a79b6a18b7b105c755b543cc9ac273dba6a52112 | |
| parent | Verification: add stats collection (diff) | |
Verification: disable burst shared filter in verification
We will begin pinging users in the verification channel, prompting
them to join. This can cause a surge of activity that may trigger
the filter.
A better solution would involve allowing per-filter channel config,
but after internal discussion this is seen as unnecessary for now.
| -rw-r--r-- | bot/rules/burst_shared.py | 11 | 
1 files changed, 10 insertions, 1 deletions
diff --git a/bot/rules/burst_shared.py b/bot/rules/burst_shared.py index bbe9271b3..0e66df69c 100644 --- a/bot/rules/burst_shared.py +++ b/bot/rules/burst_shared.py @@ -2,11 +2,20 @@ from typing import Dict, Iterable, List, Optional, Tuple  from discord import Member, Message +from bot.constants import Channels +  async def apply(      last_message: Message, recent_messages: List[Message], config: Dict[str, int]  ) -> Optional[Tuple[str, Iterable[Member], Iterable[Message]]]: -    """Detects repeated messages sent by multiple users.""" +    """ +    Detects repeated messages sent by multiple users. + +    This filter never triggers in the verification channel. +    """ +    if last_message.channel.id == Channels.verification: +        return +      total_recent = len(recent_messages)      if total_recent > config['max']:  |