mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
feat: Adds mention limits in automod (#2414)
* Adds mention limits in automod * add mention limit to automod helper, transformer * helpers/automod: send mention_total_limit to discord
This commit is contained in:
@@ -26,6 +26,7 @@ export async function createAutomodRule(
|
||||
keyword_filter: options.triggerMetadata.keywordFilter,
|
||||
presets: options.triggerMetadata.presets,
|
||||
allow_list: options.triggerMetadata.allowList,
|
||||
mention_total_limit: options.triggerMetadata.mentionTotalLimit,
|
||||
},
|
||||
actions: options.actions.map((action) => ({
|
||||
type: action.type,
|
||||
@@ -61,6 +62,8 @@ export interface CreateAutoModerationRuleOptions {
|
||||
presets?: DiscordAutoModerationRuleTriggerMetadataPresets[];
|
||||
/** The substrings which will exempt from triggering the preset trigger type. Only present when TriggerType.KeywordPreset */
|
||||
allowList?: string[];
|
||||
/** Total number of mentions (role & user) allowed per message (Maximum of 50) */
|
||||
mentionTotalLimit: number;
|
||||
};
|
||||
/** The actions that will trigger for this rule */
|
||||
actions: {
|
||||
|
||||
@@ -25,6 +25,7 @@ export async function editAutomodRule(
|
||||
keyword_filter: options.triggerMetadata.keywordFilter,
|
||||
presets: options.triggerMetadata.presets,
|
||||
allow_list: options.triggerMetadata.allowList,
|
||||
mention_total_limit: options.triggerMetadata.mentionTotalLimit,
|
||||
}
|
||||
: undefined,
|
||||
actions: options.actions?.map((action) => ({
|
||||
@@ -58,6 +59,8 @@ export interface EditAutoModerationRuleOptions {
|
||||
presets?: DiscordAutoModerationRuleTriggerMetadataPresets[];
|
||||
/** The substrings which will exempt from triggering the preset trigger type. Only present when TriggerType.KeywordPreset */
|
||||
allowList?: string[];
|
||||
/** Total number of mentions (role & user) allowed per message (Maximum of 50) */
|
||||
mentionTotalLimit: number;
|
||||
};
|
||||
/** The actions that will trigger for this rule */
|
||||
actions: {
|
||||
|
||||
Reference in New Issue
Block a user