3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-18 23:09:59 +00:00
zeppelin/backend/src/plugins/Automod/triggers/warn.ts
2021-02-14 16:58:02 +02:00

24 lines
496 B
TypeScript

import * as t from "io-ts";
import { automodTrigger } from "../helpers";
// tslint:disable-next-line:no-empty-interface
interface WarnTriggerResultType {}
export const WarnTrigger = automodTrigger<WarnTriggerResultType>()({
configType: t.type({}),
defaultConfig: {},
async match({ context }) {
if (context.modAction?.type !== "warn") {
return;
}
return {
extra: {},
};
},
renderMatchInformation({ matchResult }) {
return `User was warned`;
},
});