From 5624b6f17008425fabe06de434bf5dac999edaad Mon Sep 17 00:00:00 2001 From: almeidx Date: Wed, 9 Apr 2025 19:53:16 +0100 Subject: [PATCH] feat(BaseInteraction): add `attachmentSizeLimit` --- packages/discord.js/src/structures/BaseInteraction.js | 6 ++++++ packages/discord.js/typings/index.d.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/packages/discord.js/src/structures/BaseInteraction.js b/packages/discord.js/src/structures/BaseInteraction.js index 0dcfb80d950a..1665395a5e22 100644 --- a/packages/discord.js/src/structures/BaseInteraction.js +++ b/packages/discord.js/src/structures/BaseInteraction.js @@ -121,6 +121,12 @@ class BaseInteraction extends Base { * @type {?InteractionContextType} */ this.context = data.context ?? null; + + /** + * Attachment size limit in bytes + * @type {number} + */ + this.attachmentSizeLimit = data.attachment_size_limit; } /** diff --git a/packages/discord.js/typings/index.d.ts b/packages/discord.js/typings/index.d.ts index 58d20189acfc..a50415c8e272 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -1819,6 +1819,7 @@ export class BaseInteraction extends Base public locale: Locale; public guildLocale: CacheTypeReducer; public entitlements: Collection; + public attachmentSizeLimit: number; public inGuild(): this is BaseInteraction<'raw' | 'cached'>; public inCachedGuild(): this is BaseInteraction<'cached'>; public inRawGuild(): this is BaseInteraction<'raw'>;