feat: add thread_create_spam automod trigger (#273)

This commit is contained in:
Almeida 2021-10-31 17:23:26 +00:00 committed by GitHub
parent f9c0e661af
commit 6709115166
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 63 additions and 0 deletions

View file

@ -1,4 +1,5 @@
import { typedGuildEventListener } from "knub";
import { RecentActionType } from "../constants";
import { runAutomod } from "../functions/runAutomod";
import { AutomodContext, AutomodPluginType } from "../types";
@ -19,6 +20,13 @@ export const RunAutomodOnThreadCreate = typedGuildEventListener<AutomodPluginTyp
};
pluginData.state.queue.add(() => {
pluginData.state.recentActions.push({
type: RecentActionType.ThreadCreate,
context,
count: 1,
identifier: null,
});
runAutomod(pluginData, context);
});
},