diff --git a/deno/v8/payloads/channel.ts b/deno/v8/payloads/channel.ts index b92fda41..10f141d3 100644 --- a/deno/v8/payloads/channel.ts +++ b/deno/v8/payloads/channel.ts @@ -5,6 +5,7 @@ import type { Permissions, Snowflake } from '../../common/mod.ts'; import type { APIPartialEmoji } from './emoji.ts'; import type { APIGuildMember } from './guild.ts'; +import type { APIMessageInteraction } from './interactions.ts'; import type { APIRole } from './permissions.ts'; import type { APIUser } from './user.ts'; @@ -307,6 +308,10 @@ export interface APIMessage { * See https://discord.com/developers/docs/resources/channel#message-object */ referenced_message?: APIMessage | null; + /** + * Sent if the message is a response to an Interaction + */ + interaction?: APIMessageInteraction; } /** diff --git a/deno/v8/payloads/interactions.ts b/deno/v8/payloads/interactions.ts index addb8486..822c44a9 100644 --- a/deno/v8/payloads/interactions.ts +++ b/deno/v8/payloads/interactions.ts @@ -245,6 +245,28 @@ export type APIInteractionApplicationCommandCallbackData = Omit< 'username' | 'avatar_url' > & { flags?: MessageFlags }; +/** + * https://discord.com/developers/docs/interactions/slash-commands#messageinteraction + */ +export interface APIMessageInteraction { + /** + * ID of the interaction + */ + id: Snowflake; + /** + * The type of interaction + */ + type: InteractionType; + /** + * The name of the ApplicationCommand + */ + name: string; + /** + * The user who invoked the interaction + */ + user: APIUser; +} + /** * @internal */ diff --git a/v8/payloads/channel.ts b/v8/payloads/channel.ts index 7ede6d2c..3caef012 100644 --- a/v8/payloads/channel.ts +++ b/v8/payloads/channel.ts @@ -5,6 +5,7 @@ import type { Permissions, Snowflake } from '../../common/index'; import type { APIPartialEmoji } from './emoji'; import type { APIGuildMember } from './guild'; +import type { APIMessageInteraction } from './interactions'; import type { APIRole } from './permissions'; import type { APIUser } from './user'; @@ -307,6 +308,10 @@ export interface APIMessage { * See https://discord.com/developers/docs/resources/channel#message-object */ referenced_message?: APIMessage | null; + /** + * Sent if the message is a response to an Interaction + */ + interaction?: APIMessageInteraction; } /** diff --git a/v8/payloads/interactions.ts b/v8/payloads/interactions.ts index 1df78792..7ba79fd6 100644 --- a/v8/payloads/interactions.ts +++ b/v8/payloads/interactions.ts @@ -245,6 +245,28 @@ export type APIInteractionApplicationCommandCallbackData = Omit< 'username' | 'avatar_url' > & { flags?: MessageFlags }; +/** + * https://discord.com/developers/docs/interactions/slash-commands#messageinteraction + */ +export interface APIMessageInteraction { + /** + * ID of the interaction + */ + id: Snowflake; + /** + * The type of interaction + */ + type: InteractionType; + /** + * The name of the ApplicationCommand + */ + name: string; + /** + * The user who invoked the interaction + */ + user: APIUser; +} + /** * @internal */