3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-18 15:45:03 +00:00

Run Automod on message edits

This commit is contained in:
Dragory 2020-05-22 20:52:23 +03:00
parent 32faa67136
commit 7c9cf05960

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);