3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-16 22:21:51 +00:00

Fix various automod actions not working for 'other' type matches

This commit is contained in:
Dragory 2020-01-27 21:59:13 +02:00
parent 84135b201b
commit 84ed1405f0
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -953,7 +953,7 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
}; };
let membersToWarn = []; let membersToWarn = [];
if (matchResult.type === "message" || matchResult.type === "embed") { if (matchResult.type === "message" || matchResult.type === "embed" || matchResult.type === "other") {
membersToWarn = [await this.getMember(matchResult.userId)]; membersToWarn = [await this.getMember(matchResult.userId)];
} else if (matchResult.type === "textspam" || matchResult.type === "otherspam") { } else if (matchResult.type === "textspam" || matchResult.type === "otherspam") {
for (const id of spamUserIdsToAction) { for (const id of spamUserIdsToAction) {
@ -979,7 +979,7 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
}; };
let userIdsToMute = []; let userIdsToMute = [];
if (matchResult.type === "message" || matchResult.type === "embed") { if (matchResult.type === "message" || matchResult.type === "embed" || matchResult.type === "other") {
userIdsToMute = [matchResult.userId]; userIdsToMute = [matchResult.userId];
} else if (matchResult.type === "textspam" || matchResult.type === "otherspam") { } else if (matchResult.type === "textspam" || matchResult.type === "otherspam") {
userIdsToMute.push(...spamUserIdsToAction); userIdsToMute.push(...spamUserIdsToAction);
@ -1002,7 +1002,7 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
}; };
let membersToKick = []; let membersToKick = [];
if (matchResult.type === "message" || matchResult.type === "embed") { if (matchResult.type === "message" || matchResult.type === "embed" || matchResult.type === "other") {
membersToKick = [await this.getMember(matchResult.userId)]; membersToKick = [await this.getMember(matchResult.userId)];
} else if (matchResult.type === "textspam" || matchResult.type === "otherspam") { } else if (matchResult.type === "textspam" || matchResult.type === "otherspam") {
for (const id of spamUserIdsToAction) { for (const id of spamUserIdsToAction) {
@ -1027,7 +1027,7 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
}; };
let userIdsToBan = []; let userIdsToBan = [];
if (matchResult.type === "message" || matchResult.type === "embed") { if (matchResult.type === "message" || matchResult.type === "embed" || matchResult.type === "other") {
userIdsToBan = [matchResult.userId]; userIdsToBan = [matchResult.userId];
} else if (matchResult.type === "textspam" || matchResult.type === "otherspam") { } else if (matchResult.type === "textspam" || matchResult.type === "otherspam") {
userIdsToBan.push(...spamUserIdsToAction); userIdsToBan.push(...spamUserIdsToAction);