You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'You were banned from the Svelte discord server for spamming. If you believe this was a mistake you can appeal the ban at <https://github.com/pngwn/svelte-bot/issues/38>',
80
-
),
81
-
mod_log(
82
-
message.client,
83
-
`User ${userMention(message.author.id)} was suspected of spamming and was banned.`,
84
-
),
85
-
]);
86
-
}elseif(posts_in_honeypot){
87
-
// Kick
88
-
awaitPromise.allSettled([
89
-
kick(member,'Posting in honeypot'),
90
-
mod_log(
91
-
message.client,
92
-
`User ${userMention(message.author.id)} was kicked for posting in honeypot.`,
93
-
),
94
-
]);
95
-
}else{
96
-
// Timeout
97
-
awaitPromise.allSettled([
98
-
timeout(member,43_200_000,'Multi-channel spam'),
99
-
mod_log(
120
+
switch(spam_detected.action){
121
+
// TODO timeout case
122
+
caseSpamAction.BAN:
123
+
awaitPromise.allSettled([
124
+
ban(member,3),
125
+
member.send(
126
+
'You were banned from the Svelte discord server for spamming. If you believe this was a mistake you can appeal the ban at <https://github.com/pngwn/svelte-bot/issues/38>',
127
+
),
128
+
mod_log(
129
+
message.client,
130
+
`User ${userMention(message.author.id)} was suspected of spamming and was banned.`,
131
+
),
132
+
]);
133
+
break;
134
+
caseSpamAction.KICK:
135
+
awaitPromise.allSettled([
136
+
kick(member,log_reason),
137
+
mod_log(
138
+
message.client,
139
+
`User ${userMention(message.author.id)} was kicked${log_reason ? ` for ${log_reason}` : ''}.`,
140
+
),
141
+
]);
142
+
break;
143
+
caseSpamAction.TIMEOUT:
144
+
awaitPromise.allSettled([
145
+
timeout(member,{reason: log_reason}),
146
+
mod_log(
147
+
message.client,
148
+
`User ${userMention(message.author.id)} was timed out${log_reason ? ` for ${log_reason}` : ''}.`,
149
+
),
150
+
]);
151
+
break;
152
+
default:
153
+
awaitmod_log(
100
154
message.client,
101
-
`User ${userMention(message.author.id)} was suspected of spamming and was timed out.`,
102
-
),
103
-
]);
155
+
`Log note for user ${userMention(message.author.id)}: ${log_reason??'no reason provided'}.`,
0 commit comments