3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-14 13:55:03 +00:00

automod: add triggers for mod actions

This commit is contained in:
Dragory 2021-02-14 16:58:02 +02:00
parent 5ffc3e7cc4
commit 93912541b4
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
34 changed files with 412 additions and 3 deletions

View file

@ -0,0 +1,24 @@
import * as t from "io-ts";
import { automodTrigger } from "../helpers";
// tslint:disable-next-line:no-empty-interface
interface UnmuteTriggerResultType {}
export const UnmuteTrigger = automodTrigger<UnmuteTriggerResultType>()({
configType: t.type({}),
defaultConfig: {},
async match({ context }) {
if (context.modAction?.type !== "unmute") {
return;
}
return {
extra: {},
};
},
renderMatchInformation({ matchResult }) {
return `User was unmuted`;
},
});