From 509746003a5544fc1b1a28a5a58a3cfe27e200ca Mon Sep 17 00:00:00 2001 From: Jaw0r3k Date: Mon, 3 Jun 2024 13:09:02 +0200 Subject: [PATCH] feat(AutoModeration): add blocking words in member profile (#740) Co-authored-by: almeidx Co-authored-by: Vlad Frangu --- deno/payloads/v10/autoModeration.ts | 18 +++++++++++++++--- deno/payloads/v9/autoModeration.ts | 18 +++++++++++++++--- payloads/v10/autoModeration.ts | 18 +++++++++++++++--- payloads/v9/autoModeration.ts | 18 +++++++++++++++--- 4 files changed, 60 insertions(+), 12 deletions(-) diff --git a/deno/payloads/v10/autoModeration.ts b/deno/payloads/v10/autoModeration.ts index 91246b41f..a20872b70 100644 --- a/deno/payloads/v10/autoModeration.ts +++ b/deno/payloads/v10/autoModeration.ts @@ -74,6 +74,10 @@ export enum AutoModerationRuleTriggerType { * Check if content contains more mentions than allowed (Maximum of 1 per guild) */ MentionSpam, + /** + * Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild) + */ + MemberProfile, } /** @@ -86,7 +90,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ keyword_filter?: string[]; /** @@ -101,7 +105,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile} */ allow_list?: string[]; /** @@ -109,7 +113,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * * Only Rust flavored regex is currently supported (Maximum of 260 characters) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ regex_patterns?: string[]; /** @@ -152,6 +156,10 @@ export enum AutoModerationRuleEventType { * When a member sends or edits a message in the guild */ MessageSend = 1, + /** + * When a member edits their profile + */ + MemberUpdate, } /** @@ -187,6 +195,10 @@ export enum AutoModerationActionType { * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission */ Timeout, + /** + * Prevents a member from using text, voice, or other interactions + */ + BlockMemberInteraction, } /** diff --git a/deno/payloads/v9/autoModeration.ts b/deno/payloads/v9/autoModeration.ts index 91246b41f..a20872b70 100644 --- a/deno/payloads/v9/autoModeration.ts +++ b/deno/payloads/v9/autoModeration.ts @@ -74,6 +74,10 @@ export enum AutoModerationRuleTriggerType { * Check if content contains more mentions than allowed (Maximum of 1 per guild) */ MentionSpam, + /** + * Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild) + */ + MemberProfile, } /** @@ -86,7 +90,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ keyword_filter?: string[]; /** @@ -101,7 +105,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile} */ allow_list?: string[]; /** @@ -109,7 +113,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * * Only Rust flavored regex is currently supported (Maximum of 260 characters) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ regex_patterns?: string[]; /** @@ -152,6 +156,10 @@ export enum AutoModerationRuleEventType { * When a member sends or edits a message in the guild */ MessageSend = 1, + /** + * When a member edits their profile + */ + MemberUpdate, } /** @@ -187,6 +195,10 @@ export enum AutoModerationActionType { * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission */ Timeout, + /** + * Prevents a member from using text, voice, or other interactions + */ + BlockMemberInteraction, } /** diff --git a/payloads/v10/autoModeration.ts b/payloads/v10/autoModeration.ts index e2b1c414a..5377ad313 100644 --- a/payloads/v10/autoModeration.ts +++ b/payloads/v10/autoModeration.ts @@ -74,6 +74,10 @@ export enum AutoModerationRuleTriggerType { * Check if content contains more mentions than allowed (Maximum of 1 per guild) */ MentionSpam, + /** + * Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild) + */ + MemberProfile, } /** @@ -86,7 +90,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ keyword_filter?: string[]; /** @@ -101,7 +105,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile} */ allow_list?: string[]; /** @@ -109,7 +113,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * * Only Rust flavored regex is currently supported (Maximum of 260 characters) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ regex_patterns?: string[]; /** @@ -152,6 +156,10 @@ export enum AutoModerationRuleEventType { * When a member sends or edits a message in the guild */ MessageSend = 1, + /** + * When a member edits their profile + */ + MemberUpdate, } /** @@ -187,6 +195,10 @@ export enum AutoModerationActionType { * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission */ Timeout, + /** + * Prevents a member from using text, voice, or other interactions + */ + BlockMemberInteraction, } /** diff --git a/payloads/v9/autoModeration.ts b/payloads/v9/autoModeration.ts index e2b1c414a..5377ad313 100644 --- a/payloads/v9/autoModeration.ts +++ b/payloads/v9/autoModeration.ts @@ -74,6 +74,10 @@ export enum AutoModerationRuleTriggerType { * Check if content contains more mentions than allowed (Maximum of 1 per guild) */ MentionSpam, + /** + * Check if member profile contains words from a user defined list of keywords (Maximum of 1 per guild) + */ + MemberProfile, } /** @@ -86,7 +90,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * A keyword can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ keyword_filter?: string[]; /** @@ -101,7 +105,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * A allowed-word can be a phrase which contains multiple words. Wildcard symbols can be used to customize how each string will be matched. Each keyword must be 60 characters or less * See [keyword matching strategies](https://discord.com/developers/docs/resources/auto-moderation#auto-moderation-rule-object-keyword-matching-strategies) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.KeywordPreset} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.KeywordPreset}, {@link AutoModerationRuleTriggerType.MemberProfile} */ allow_list?: string[]; /** @@ -109,7 +113,7 @@ export interface APIAutoModerationRuleTriggerMetadata { * * Only Rust flavored regex is currently supported (Maximum of 260 characters) * - * Associated trigger type: {@link AutoModerationRuleTriggerType.Keyword} + * Associated trigger types: {@link AutoModerationRuleTriggerType.Keyword}, {@link AutoModerationRuleTriggerType.MemberProfile} */ regex_patterns?: string[]; /** @@ -152,6 +156,10 @@ export enum AutoModerationRuleEventType { * When a member sends or edits a message in the guild */ MessageSend = 1, + /** + * When a member edits their profile + */ + MemberUpdate, } /** @@ -187,6 +195,10 @@ export enum AutoModerationActionType { * Timeout user for specified duration, this action type can be set if the bot has `MODERATE_MEMBERS` permission */ Timeout, + /** + * Prevents a member from using text, voice, or other interactions + */ + BlockMemberInteraction, } /**