From 53ba3b60169c26bf53da6cb0f4ab60329443789d 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 0dcfb80d9..1665395a5 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 58d20189a..a50415c8e 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'>;