Run Automod on message edits

This commit is contained in:
Dragory 2020-05-22 20:52:23 +03:00
parent 238e66474a
commit 130afa61eb
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -348,6 +348,7 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
this.onMessageCreateFn = msg => this.onMessageCreate(msg);
this.savedMessages.events.on("create", this.onMessageCreateFn);
this.savedMessages.events.on("update", this.onMessageCreateFn);
}
protected getModActions(): ModActionsPlugin {
@ -365,6 +366,7 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema, ICustomOverride
protected onUnload() {
this.unloaded = true;
this.savedMessages.events.off("create", this.onMessageCreateFn);
this.savedMessages.events.off("update", this.onMessageCreateFn);
clearInterval(this.recentActionClearInterval);
clearInterval(this.recentSpamClearInterval);
clearInterval(this.recentNicknameChangesClearInterval);