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