fix: automod
This commit is contained in:
@@ -33,8 +33,7 @@ class AutoModerationRuleManager extends CachedManager {
|
||||
* Options used to set the trigger metadata of an auto moderation rule.
|
||||
* @typedef {Object} AutoModerationTriggerMetadataOptions
|
||||
* @property {string[]} [keywordFilter] The substrings that will be searched for in the content
|
||||
* @property {string[]} [regexPatterns] The regular expression patterns
|
||||
* which will be matched against the content
|
||||
* @property {string[]} [regexPatterns] The regular expression patterns which will be matched against the content
|
||||
* <info>Only Rust-flavored regular expressions are supported.</info>
|
||||
* @property {AutoModerationRuleKeywordPresetType[]} [presets]
|
||||
* The internally pre-defined wordsets which will be searched for in the content
|
||||
@@ -109,7 +108,7 @@ class AutoModerationRuleManager extends CachedManager {
|
||||
allow_list: triggerMetadata.allowList,
|
||||
mention_total_limit: triggerMetadata.mentionTotalLimit,
|
||||
},
|
||||
actions: actions?.map(action => ({
|
||||
actions: actions.map(action => ({
|
||||
type: typeof action.type === 'number' ? action.type : AutoModerationActionTypes[action.type],
|
||||
metadata: {
|
||||
duration_seconds: action.metadata?.durationSeconds,
|
||||
|
Reference in New Issue
Block a user