Automod work
This commit is contained in:
parent
140ba84544
commit
f657b169df
32 changed files with 1099 additions and 5 deletions
27
backend/src/plugins/Automod/triggers/exampleTrigger.ts
Normal file
27
backend/src/plugins/Automod/triggers/exampleTrigger.ts
Normal file
|
@ -0,0 +1,27 @@
|
|||
import * as t from "io-ts";
|
||||
import { automodTrigger } from "../helpers";
|
||||
|
||||
export const ExampleTrigger = automodTrigger({
|
||||
configType: t.type({
|
||||
some: t.number,
|
||||
value: t.string,
|
||||
}),
|
||||
|
||||
defaultConfig: {},
|
||||
|
||||
matchResultType: t.type({
|
||||
thing: t.string,
|
||||
}),
|
||||
|
||||
async match() {
|
||||
return {
|
||||
extra: {
|
||||
thing: "hi",
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
renderMatchInformation() {
|
||||
return "";
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue