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

24 lines
503 B
TypeScript

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