From 7e21a9474e532c5b22c6e0600c446fca47352617 Mon Sep 17 00:00:00 2001 From: Almeida Date: Thu, 10 Apr 2025 21:41:52 +0100 Subject: [PATCH] feat(BaseInteraction): add `attachmentSizeLimit` (#10830) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> --- 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 28d1e4b35..4e7ad59e4 100644 --- a/packages/discord.js/src/structures/BaseInteraction.js +++ b/packages/discord.js/src/structures/BaseInteraction.js @@ -122,6 +122,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 f13705859..659b73ad2 100644 --- a/packages/discord.js/typings/index.d.ts +++ b/packages/discord.js/typings/index.d.ts @@ -2102,6 +2102,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'>;