3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00
zeppelin/backend/src/plugins/Automod/triggers/mute.ts

25 lines
495 B
TypeScript
Raw Normal View History

2021-02-14 16:58:02 +02:00
import * as t from "io-ts";
import { automodTrigger } from "../helpers";
// tslint:disable-next-line:no-empty-interface
interface MuteTriggerResultType {}
export const MuteTrigger = automodTrigger<MuteTriggerResultType>()({
configType: t.type({}),
defaultConfig: {},
async match({ context }) {
if (context.modAction?.type !== "mute") {
return;
}
return {
extra: {},
};
},
renderMatchInformation({ matchResult }) {
return `User was muted`;
},
});