fix(Interactions): add missing fields to types

Add `messages` to `APIInteractionDataResolved` and `id` to
`APIMessageComponentBaseInteractionData` per Discord API docs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
almeidx
2026-03-18 23:09:18 +00:00
parent a4aa724eb8
commit 83df57b45a
8 changed files with 20 additions and 0 deletions

View File

@@ -264,6 +264,7 @@ export interface APIInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
messages?: Record<Snowflake, APIMessage>;
attachments?: Record<Snowflake, APIAttachment>;
}

View File

@@ -52,6 +52,10 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
* The type of the component
*/
component_type: CType;
/**
* The unique identifier for the component, as defined when the component was sent
*/
id: number;
}
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;

View File

@@ -267,6 +267,7 @@ export interface APIInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
messages?: Record<Snowflake, APIMessage>;
attachments?: Record<Snowflake, APIAttachment>;
}

View File

@@ -52,6 +52,10 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
* The type of the component
*/
component_type: CType;
/**
* The unique identifier for the component, as defined when the component was sent
*/
id: number;
}
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;

View File

@@ -264,6 +264,7 @@ export interface APIInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
messages?: Record<Snowflake, APIMessage>;
attachments?: Record<Snowflake, APIAttachment>;
}

View File

@@ -52,6 +52,10 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
* The type of the component
*/
component_type: CType;
/**
* The unique identifier for the component, as defined when the component was sent
*/
id: number;
}
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;

View File

@@ -267,6 +267,7 @@ export interface APIInteractionDataResolved {
roles?: Record<Snowflake, APIRole>;
members?: Record<Snowflake, APIInteractionDataResolvedGuildMember>;
channels?: Record<Snowflake, APIInteractionDataResolvedChannel>;
messages?: Record<Snowflake, APIMessage>;
attachments?: Record<Snowflake, APIAttachment>;
}

View File

@@ -52,6 +52,10 @@ export interface APIMessageComponentBaseInteractionData<CType extends ComponentT
* The type of the component
*/
component_type: CType;
/**
* The unique identifier for the component, as defined when the component was sent
*/
id: number;
}
export type APIMessageButtonInteractionData = APIMessageComponentBaseInteractionData<ComponentType.Button>;