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

Add pause_invites automod action (#423)

* feat(AutomodPlugin): toggle invite action

* feat: rename and change config shape

* refactor: rename disable_invites to pause_invites

* fix: make options an object, else setting an action to `false` ignores it
This commit is contained in:
Ben Richeson 2024-01-04 20:41:12 -05:00 committed by GitHub
parent 3912523c92
commit 094e94f0f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 0 deletions

View file

@ -0,0 +1,14 @@
import * as t from "io-ts";
import { automodAction } from "../helpers";
export const PauseInvitesAction = automodAction({
configType: t.type({
paused: t.boolean,
}),
defaultConfig: {},
async apply({ pluginData, actionConfig }) {
await pluginData.guild.disableInvites(actionConfig.paused);
},
});