-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathchatSpam.yaml
58 lines (58 loc) · 2.21 KB
/
chatSpam.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#polling:
# - newComm
#runs:
# - checks:
#### Uncomment the code above to use this as a FULL subreddit config
####
#### Otherwise copy-paste the code below to use as a CHECK
#
# Remove comments from users who spam discord and telegram links
# -- differs from just using automod:
# 1) removes comment if it is ONLY discord/telegram link
# 2) if not *only* link then checks user's history to see if link is spammed many times and only removes if it is
#
- name: ban chat only spammer
description: ban a user who spams only a chat link many times historically
kind: comment
condition: AND
rules:
- linkOnlySpam
- linkAnywhereHistoricalSpam
actions:
- kind: remove
- kind: ban
content: spamming discord links
- name: remove chat spam
description: >-
remove comments from users who only link to chat or mention chat
link many times historically
kind: comment
condition: OR
rules:
- name: linkOnlySpam
kind: regex
criteria:
- name: only link
# https://regexr.com/70j9m
# single quotes are required to escape special characters
regex: '/^\s*((?:discord\.gg|t\.me|telegram\.me|telegr\.im)\/[\w\d]+)\s*$/i'
- condition: AND
rules:
- name: linkAnywhereSpam
kind: regex
criteria:
- name: contains link anywhere
# single quotes are required to escape special characters
regex: '/((?:discord\.gg|t\.me|telegram\.me|telegr\.im)\/[\w\d]+)/i'
- name: linkAnywhereHistoricalSpam
kind: regex
criteria:
- name: contains links anywhere historically
# single quotes are required to escape special characters
regex: '/((?:discord\.gg|t\.me|telegram\.me|telegr\.im)\/[\w\d]+)/i'
totalMatchThreshold: '>= 3'
lookAt: comments
window: 100
actions:
- kind: remove
note: Chat spam link