mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
automod: add triggers for mod actions
This commit is contained in:
parent
5ffc3e7cc4
commit
93912541b4
34 changed files with 412 additions and 3 deletions
24
backend/src/plugins/Automod/triggers/unban.ts
Normal file
24
backend/src/plugins/Automod/triggers/unban.ts
Normal file
|
@ -0,0 +1,24 @@
|
|||
import * as t from "io-ts";
|
||||
import { automodTrigger } from "../helpers";
|
||||
|
||||
// tslint:disable-next-line:no-empty-interface
|
||||
interface UnbanTriggerResultType {}
|
||||
|
||||
export const UnbanTrigger = automodTrigger<UnbanTriggerResultType>()({
|
||||
configType: t.type({}),
|
||||
defaultConfig: {},
|
||||
|
||||
async match({ context }) {
|
||||
if (context.modAction?.type !== "unban") {
|
||||
return;
|
||||
}
|
||||
|
||||
return {
|
||||
extra: {},
|
||||
};
|
||||
},
|
||||
|
||||
renderMatchInformation({ matchResult }) {
|
||||
return `User was unbanned`;
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue