3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

Automod: add deleteMessageDays option to ban action

This commit is contained in:
Dragory 2020-04-11 16:27:58 +03:00
parent 2971d1361e
commit e67816ec7b
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
2 changed files with 7 additions and 1 deletions

View file

@ -1126,6 +1126,7 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
extraNotes: [caseExtraNote],
};
const contactMethods = this.readContactMethodsFromAction(rule.actions.ban);
const deleteMessageDays = rule.actions.ban.deleteMessageDays;
let userIdsToBan = [];
if (
@ -1143,7 +1144,11 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
if (userIdsToBan.length) {
for (const userId of userIdsToBan) {
await this.getModActions().banUserId(userId, reason, { contactMethods, caseArgs });
await this.getModActions().banUserId(userId, reason, {
contactMethods,
caseArgs,
deleteMessageDays,
});
}
actionsTaken.push("ban");