mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-06-02 08:50:09 +00:00
feat(APIMessage): add interaction (#93)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Vlad Frangu <kingdgrizzle@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user