mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 23:09:59 +00:00
25 lines
496 B
TypeScript
25 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`;
|
||
|
},
|
||
|
});
|