feat(types,bot): Add the attachmentSizeLimit prop to interactions (#4163)

* Add the attachmentSizeLimit prop to interactions

* Fix type error
This commit is contained in:
Fleny
2025-04-23 19:48:40 +05:30
committed by GitHub
parent 806380a25d
commit 77fc516a64
4 changed files with 7 additions and 0 deletions
+1
View File
@@ -378,6 +378,7 @@ export function createDesiredPropertiesObject<T extends RecursivePartial<Transfo
appPermissions: defaultValue,
authorizingIntegrationOwners: defaultValue,
context: defaultValue,
attachmentSizeLimit: defaultValue,
...desiredProperties.interaction,
},
interactionCallback: {
@@ -158,6 +158,8 @@ export function transformInteraction(
)
}
if (props.context && payload.interaction.context) interaction.context = payload.interaction.context
if (props.attachmentSizeLimit && payload.interaction.attachment_size_limit)
interaction.attachmentSizeLimit = payload.interaction.attachment_size_limit
if (props.data && payload.interaction.data) {
interaction.data = {
type: payload.interaction.data.type,
+2
View File
@@ -879,6 +879,8 @@ export interface Interaction {
authorizingIntegrationOwners: Partial<Record<DiscordApplicationIntegrationType, bigint>>
/** Context where the interaction was triggered from */
context?: DiscordInteractionContextType
/** Attachment size limit in bytes */
attachmentSizeLimit: number
/**
* Sends a response to an interaction.
*
@@ -59,6 +59,8 @@ export interface DiscordInteraction {
authorizing_integration_owners: DiscordAuthorizingIntegrationOwners
/** Context where the interaction was triggered from */
context?: DiscordInteractionContextType
/** Attachment size limit in bytes */
attachment_size_limit: number
}
/** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-type */