automod: fix mutes not applying
This commit is contained in:
parent
bec583f96a
commit
73dc0d00fb
1 changed files with 6 additions and 6 deletions
|
@ -519,10 +519,6 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
|
||||
protected onMessageCreateFn;
|
||||
|
||||
protected modActions: ModActionsPlugin;
|
||||
protected mutes: MutesPlugin;
|
||||
protected logs: LogsPlugin;
|
||||
|
||||
protected savedMessages: GuildSavedMessages;
|
||||
protected archives: GuildArchives;
|
||||
protected guildLogs: GuildLogs;
|
||||
|
@ -600,6 +596,10 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
return this.getPlugin("logs");
|
||||
}
|
||||
|
||||
protected getMutes(): MutesPlugin {
|
||||
return this.getPlugin("mutes");
|
||||
}
|
||||
|
||||
protected onUnload() {
|
||||
this.unloaded = true;
|
||||
this.savedMessages.events.off("create", this.onMessageCreateFn);
|
||||
|
@ -1185,10 +1185,10 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
};
|
||||
|
||||
if (matchResult.type === "message" || matchResult.type === "embed" || matchResult.type === "textspam") {
|
||||
await this.mutes.muteUser(matchResult.userId, duration, reason, caseArgs);
|
||||
await this.getMutes().muteUser(matchResult.userId, duration, reason, caseArgs);
|
||||
} else if (matchResult.type === "raidspam") {
|
||||
for (const userId of matchResult.userIds) {
|
||||
await this.mutes.muteUser(userId, duration, reason, caseArgs);
|
||||
await this.getMutes().muteUser(userId, duration, reason, caseArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue