Automod work vol 2
This commit is contained in:
parent
f657b169df
commit
0e9f65e0d5
12 changed files with 420 additions and 59 deletions
|
@ -5,7 +5,12 @@ import { automodTrigger } from "../helpers";
|
|||
import { disableInlineCode, verboseChannelMention } from "../../../utils";
|
||||
import { MatchableTextType, matchMultipleTextTypesOnMessage } from "../functions/matchMultipleTextTypesOnMessage";
|
||||
|
||||
export const MatchWordsTrigger = automodTrigger({
|
||||
interface MatchResultType {
|
||||
word: string;
|
||||
type: MatchableTextType;
|
||||
}
|
||||
|
||||
export const MatchWordsTrigger = automodTrigger<MatchResultType>()({
|
||||
configType: t.type({
|
||||
words: t.array(t.string),
|
||||
case_sensitive: t.boolean,
|
||||
|
@ -35,11 +40,6 @@ export const MatchWordsTrigger = automodTrigger({
|
|||
match_custom_status: false,
|
||||
},
|
||||
|
||||
matchResultType: t.type({
|
||||
word: t.string,
|
||||
type: MatchableTextType,
|
||||
}),
|
||||
|
||||
async match({ pluginData, context, triggerConfig: trigger }) {
|
||||
if (!context.message) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue