3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-20 16:25:03 +00:00
zeppelin/backend/src/plugins/Automod/triggers/ban.ts
2021-02-14 16:58:02 +02:00

24 lines
492 B
TypeScript

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