mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 08:47:22 +00:00
feat(types,bot): Add the attachmentSizeLimit prop to interactions (#4163)
* Add the attachmentSizeLimit prop to interactions * Fix type error
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user