diff options
| author | 2019-01-03 11:00:07 -0500 | |
|---|---|---|
| committer | 2019-01-03 11:00:07 -0500 | |
| commit | c6d6ffd261d711bdc29674b5dace0f16116cf87d (patch) | |
| tree | a7cdca9d2da20c8bae5a430d046d4a854b441f3c | |
| parent | Add identification of invite via DM (diff) | |
Move user notification bools to config
Intentionally hardcode token notification, this is handled by the
token remover cog
Signed-off-by: sco1 <[email protected]>
| -rw-r--r-- | bot/cogs/filtering.py | 10 | ||||
| -rw-r--r-- | bot/constants.py | 6 | ||||
| -rw-r--r-- | config-default.yml | 7 |
3 files changed, 18 insertions, 5 deletions
diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py index 8adde6312..fe4009a32 100644 --- a/bot/cogs/filtering.py +++ b/bot/cogs/filtering.py @@ -44,14 +44,14 @@ class Filtering: "enabled": Filter.filter_zalgo, "function": self._has_zalgo, "type": "filter", - "user_notification": False, + "user_notification": Filter.notify_user_zalgo, "notification_msg": "" }, "filter_invites": { "enabled": Filter.filter_invites, "function": self._has_invites, "type": "filter", - "user_notification": True, + "user_notification": Filter.notify_user_invites, "notification_msg": ( "Per Rule 10, your invite link has been removed. " "If you believe this was a mistake, please the staff know!\n\n" @@ -62,21 +62,21 @@ class Filtering: "enabled": Filter.filter_domains, "function": self._has_urls, "type": "filter", - "user_notification": False, + "user_notification": Filter.notify_user_domains, "notification_msg": "" }, "watch_words": { "enabled": Filter.watch_words, "function": self._has_watchlist_words, "type": "watchlist", - "user_notification": False, + "user_notification": Filter.notify_user_words, "notification_msg": "" }, "watch_tokens": { "enabled": Filter.watch_tokens, "function": self._has_watchlist_tokens, "type": "watchlist", - "user_notification": False, + "user_notification": False, # Hardcode intentional, already in token remover cog "notification_msg": "" }, } diff --git a/bot/constants.py b/bot/constants.py index 99ef98da2..a3845f43a 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -204,6 +204,12 @@ class Filter(metaclass=YAMLGetter): watch_words: bool watch_tokens: bool + notify_user_zalgo: bool + notify_user_invites: bool + notify_user_domains: bool + notify_user_words: bool + # Token notification intentionally ignored, notification is handled by the token remover cog + ping_everyone: bool guild_invite_whitelist: List[int] domain_blacklist: List[str] diff --git a/config-default.yml b/config-default.yml index 3a1ad8052..f9f1a1d9e 100644 --- a/config-default.yml +++ b/config-default.yml @@ -139,6 +139,13 @@ filter: watch_words: true watch_tokens: true + # Notify user on filter? + notify_user_zalgo: false + notify_user_invites: true + notify_user_domains: false + notify_user_words: false + # Token notification intentionally ignored, notification is handled by the token remover cog + # Filter configuration ping_everyone: true # Ping @everyone when we send a mod-alert? |