Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update rule trigger types #9708

Merged
merged 4 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions packages/discord.js/src/managers/AutoModerationRuleManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ class AutoModerationRuleManager extends CachedManager {
* @property {AutoModerationRuleKeywordPresetType[]} [presets]
* The internally pre-defined wordsets which will be searched for in the content
* @property {string[]} [allowList] The substrings that will be exempt from triggering
* {@link AutoModerationRuleTriggerType.Keyword} and {@link AutoModerationRuleTriggerType.KeywordPreset}
* {@link AutoModerationRuleTriggerType.Keyword},
* {@link AutoModerationRuleTriggerType.KeywordPreset},
* and {@link AutoModerationRuleTriggerType.MemberProfile}
Jiralite marked this conversation as resolved.
Show resolved Hide resolved
* @property {?number} [mentionTotalLimit] The total number of role & user mentions allowed per message
* @property {boolean} [mentionRaidProtectionEnabled] Whether to automatically detect mention raids
*/
Expand Down Expand Up @@ -87,8 +89,10 @@ class AutoModerationRuleManager extends CachedManager {
* @property {AutoModerationRuleTriggerType} triggerType The trigger type of the auto moderation rule
* @property {AutoModerationTriggerMetadataOptions} [triggerMetadata] The trigger metadata of the auto moderation rule
* <info>This property is required if using a `triggerType` of
* {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset},
* or {@link AutoModerationRuleTriggerType.MentionSpam}.</info>
* {@link AutoModerationRuleTriggerType.Keyword},
* {@link AutoModerationRuleTriggerType.KeywordPreset},
* {@link AutoModerationRuleTriggerType.MentionSpam},
* or {@link AutoModerationRuleTriggerType.MemberProfile}.</info>
* @property {AutoModerationActionOptions[]} actions
* The actions that will execute when the auto moderation rule is triggered
* @property {boolean} [enabled] Whether the auto moderation rule should be enabled
Expand Down
8 changes: 6 additions & 2 deletions packages/discord.js/src/structures/AutoModerationRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ class AutoModerationRule extends Base {
* @property {AutoModerationRuleKeywordPresetType[]} presets
* The internally pre-defined wordsets which will be searched for in the content
* @property {string[]} allowList The substrings that will be exempt from triggering
* {@link AutoModerationRuleTriggerType.Keyword} and {@link AutoModerationRuleTriggerType.KeywordPreset}
* {@link AutoModerationRuleTriggerType.Keyword},
* {@link AutoModerationRuleTriggerType.KeywordPreset},
* and {@link AutoModerationRuleTriggerType.MemberProfile}
* @property {?number} mentionTotalLimit The total number of role & user mentions allowed per message
* @property {boolean} mentionRaidProtectionEnabled Whether mention raid protection is enabled
*/
Expand Down Expand Up @@ -209,7 +211,9 @@ class AutoModerationRule extends Base {
/**
* Sets the allow list for this auto moderation rule.
* @param {string[]} allowList The substrings that will be exempt from triggering
* {@link AutoModerationRuleTriggerType.Keyword} and {@link AutoModerationRuleTriggerType.KeywordPreset}
* {@link AutoModerationRuleTriggerType.Keyword},
* {@link AutoModerationRuleTriggerType.KeywordPreset},
* and {@link AutoModerationRuleTriggerType.MemberProfile}
* @param {string} [reason] The reason for changing the allow list of this auto moderation rule
* @returns {Promise<AutoModerationRule>}
*/
Expand Down
Loading