api-docs: Fix some stuff in interactions (#4457)

* api-docs: Fix some stuff in interactions

* Apply and fix code review suggestions

---------

Co-authored-by: Awesome Stickz <awesome@stickz.dev>
This commit is contained in:
Fleny
2025-09-17 00:56:50 +05:30
committed by GitHub
co-authored by Awesome Stickz
parent 0d4f17472f
commit 35133a1575
2 changed files with 56 additions and 5 deletions
+34 -2
View File
@@ -75,7 +75,23 @@ export interface InteractionResolvedDataUser<TProps extends TransformersDesiredP
export type InteractionResolvedDataChannel<TProps extends TransformersDesiredProperties, TBehavior extends DesiredPropertiesBehavior> = Pick<
SetupDesiredProps<Channel, TProps, TBehavior>,
Extract<keyof SetupDesiredProps<Channel, TProps, TBehavior>, 'id' | 'name' | 'type' | 'permissions' | 'threadMetadata' | 'parentId'>
Extract<
keyof SetupDesiredProps<Channel, TProps, TBehavior>,
| 'id'
| 'name'
| 'type'
| 'permissions'
| 'lastMessageId'
| 'lastPinTimestamp'
| 'nsfw'
| 'parentId'
| 'guildId'
| 'flags'
| 'rateLimitPerUser'
| 'topic'
| 'position'
| 'threadMetadata'
>
>
export type InteractionResolvedDataMember<TProps extends TransformersDesiredProperties, TBehavior extends DesiredPropertiesBehavior> = Omit<
@@ -90,7 +106,23 @@ export interface InteractionResolvedUser {
}
/** @deprecated Use {@link InteractionResolvedDataChannel} */
export type InteractionResolvedChannel = Pick<Channel, 'id' | 'name' | 'type' | 'permissions' | 'threadMetadata' | 'parentId'>
export type InteractionResolvedChannel = Pick<
Channel,
| 'id'
| 'name'
| 'type'
| 'permissions'
| 'lastMessageId'
| 'lastPinTimestamp'
| 'nsfw'
| 'parentId'
| 'guildId'
| 'flags'
| 'rateLimitPerUser'
| 'topic'
| 'position'
| 'threadMetadata'
>
/** @deprecated Use {@link InteractionResolvedDataMember} */
export type InteractionResolvedMember = Omit<Member, 'user' | 'deaf' | 'mute'>
+22 -3
View File
@@ -148,7 +148,26 @@ export interface DiscordInteractionDataResolved {
* @remarks
* Only threads include `thread_metadata` and `parent_id` properties.
*/
channels?: Record<string, Pick<DiscordChannel, 'id' | 'name' | 'type' | 'permissions' | 'thread_metadata' | 'parent_id'>>
channels?: Record<
string,
Pick<
DiscordChannel,
| 'id'
| 'name'
| 'type'
| 'permissions'
| 'last_message_id'
| 'last_pin_timestamp'
| 'nsfw'
| 'parent_id'
| 'guild_id'
| 'flags'
| 'rate_limit_per_user'
| 'topic'
| 'position'
| 'thread_metadata'
>
>
/** The Ids and Message objects */
messages?: Record<string, Partial<DiscordMessage>>
/** The ids and attachment objects */
@@ -232,9 +251,9 @@ export interface DiscordInteractionCallback {
activity_instance_id?: string
/** ID of the message that was created by the interaction */
response_message_id?: string
/** Whether or not the message is in a loading state */
/** Whether the message is in a loading state */
response_message_loading?: boolean
/** Whether or not the response message was ephemeral */
/** Whether the response message is ephemeral */
response_message_ephemeral?: boolean
}