From 123163f9dfdd8c05cae9cf74da45cbaaf2aa985e Mon Sep 17 00:00:00 2001 From: TTtie Date: Wed, 12 Jun 2024 19:19:12 +0000 Subject: [PATCH] feat(Constants): update automod-related constants Ref: https://github.com/discord/discord-api-docs/commit/60a711d8 --- index.d.ts | 17 ++++++++++------- lib/Constants.js | 13 ++++++++----- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/index.d.ts b/index.d.ts index 1f7da034..1820e281 100644 --- a/index.d.ts +++ b/index.d.ts @@ -315,9 +315,9 @@ declare namespace Dysnomia { } interface AutoModerationTriggerMetadata { - /** valid for KEYWORD */ + /** valid for KEYWORD, KEYWORD_PRESET, MEMBER_PROFILE */ allow_list: string[]; - /** valid for KEYWORD */ + /** valid for KEYWORD, MEMBER_PROFILE */ keyword_filter: string[]; /** valid for MENTION_SPAM */ mention_total_limit: number; @@ -325,7 +325,7 @@ declare namespace Dysnomia { mention_raid_protection_enabled: boolean; /** valid for KEYWORD_PRESET */ presets: AutoModerationKeywordPresetType[]; - /** valid for KEYWORD */ + /** valid for KEYWORD, MEMBER_PROFILE */ regex_patterns: string[]; } // Channel @@ -1980,12 +1980,14 @@ declare namespace Dysnomia { HOME_SETTINGS_UPDATE: 191; }; AutoModerationActionTypes: { - BLOCK_MESSAGE: 1; - SEND_ALERT_MESSAGE: 2; - TIMEOUT: 3; + BLOCK_MESSAGE: 1; + SEND_ALERT_MESSAGE: 2; + TIMEOUT: 3; + BLOCK_MEMBER_INTERACTION: 4; }; AutoModerationEventTypes: { - MESSAGE_SEND: 1; + MESSAGE_SEND: 1; + MEMBER_UPDATE: 2; }; AutoModerationKeywordPresetTypes: { PROFANITY: 1; @@ -1997,6 +1999,7 @@ declare namespace Dysnomia { SPAM: 3; KEYWORD_PRESET: 4; MENTION_SPAM: 5; + MEMBER_PROFILE: 6; }; ButtonStyles: { PRIMARY: 1; diff --git a/lib/Constants.js b/lib/Constants.js index 8ddef709..15b992db 100644 --- a/lib/Constants.js +++ b/lib/Constants.js @@ -156,13 +156,15 @@ module.exports.AuditLogActions = { }; module.exports.AutoModerationActionTypes = { - BLOCK_MESSAGE: 1, - SEND_ALERT_MESSAGE: 2, - TIMEOUT: 3 + BLOCK_MESSAGE: 1, + SEND_ALERT_MESSAGE: 2, + TIMEOUT: 3, + BLOCK_MEMBER_INTERACTION: 4 }; module.exports.AutoModerationEventTypes = { - MESSAGE_SEND: 1 + MESSAGE_SEND: 1, + MEMBER_UPDATE: 2 }; module.exports.AutoModerationKeywordPresetTypes = { @@ -175,7 +177,8 @@ module.exports.AutoModerationTriggerTypes = { KEYWORD: 1, SPAM: 3, KEYWORD_PRESET: 4, - MENTION_SPAM: 5 + MENTION_SPAM: 5, + MEMBER_PROFILE: 6 }; module.exports.ButtonStyles = {