mirror of
https://github.com/discordjs/discord-api-types.git
synced 2026-05-22 19:30:09 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
679a5cfd77 | ||
|
|
fc4b7e2708 | ||
|
|
15c171c558 | ||
|
|
ebd5754242 | ||
|
|
ffcd95d597 |
@@ -188,7 +188,7 @@ export interface ApplicationCommandInteractionDataOptionSubCommand {
|
||||
|
||||
export interface ApplicationCommandInteractionDataOptionSubCommandGroup {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.SUB_COMMAND;
|
||||
type: ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
options: ApplicationCommandInteractionDataOptionSubCommand[];
|
||||
}
|
||||
|
||||
@@ -238,14 +238,19 @@ export type APIInteractionResponse =
|
||||
| APIInteractionResponseChannelMessageWithSource
|
||||
| APIInteractionResponseDeferredChannelMessageWithSource;
|
||||
|
||||
export type APIInteractionResponsePong = InteractionResponsePayload<InteractionResponseType.Pong>;
|
||||
export interface APIInteractionResponsePong {
|
||||
type: InteractionResponseType.Pong;
|
||||
}
|
||||
|
||||
export type APIInteractionResponseChannelMessageWithSource = InteractionResponsePayload<
|
||||
InteractionResponseType.ChannelMessageWithSource,
|
||||
true
|
||||
>;
|
||||
export interface APIInteractionResponseChannelMessageWithSource {
|
||||
type: InteractionResponseType.ChannelMessageWithSource;
|
||||
data: APIInteractionApplicationCommandCallbackData;
|
||||
}
|
||||
|
||||
export type APIInteractionResponseDeferredChannelMessageWithSource = InteractionResponsePayload<InteractionResponseType.DeferredChannelMessageWithSource>;
|
||||
export interface APIInteractionResponseDeferredChannelMessageWithSource {
|
||||
type: InteractionResponseType.DeferredChannelMessageWithSource;
|
||||
data?: Pick<APIInteractionApplicationCommandCallbackData, 'flags'>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/slash-commands#interaction-response-interactionresponsetype
|
||||
@@ -295,14 +300,6 @@ export interface APIMessageInteraction {
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
interface InteractionResponsePayload<T extends InteractionResponseType, D = false> {
|
||||
type: T;
|
||||
data: D extends true ? APIInteractionApplicationCommandCallbackData : never;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.13.0",
|
||||
"version": "0.13.3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"version": "0.13.0",
|
||||
"version": "0.13.3",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "^12.0.1",
|
||||
|
||||
11
package.json
11
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "discord-api-types",
|
||||
"version": "0.13.0",
|
||||
"version": "0.13.3",
|
||||
"description": "Discord API typings that are kept up to date for use in bot library creation.",
|
||||
"main": "./default/index.js",
|
||||
"types": "./default/index.d.ts",
|
||||
@@ -42,12 +42,9 @@
|
||||
"author": "Vlad Frangu <kingdgrizzle@gmail.com>",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"v*/*",
|
||||
"default/*",
|
||||
"common/*",
|
||||
"!**/*.ts",
|
||||
"**/*.d.ts",
|
||||
"!deno/*"
|
||||
"v*/**/*.{js,js.map,d.ts,d.ts.map,mjs}",
|
||||
"default/*.{js,js.map,d.ts,d.ts.map,mjs}",
|
||||
"common/*.{js,js.map,d.ts,d.ts.map,mjs}"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
|
||||
@@ -188,7 +188,7 @@ export interface ApplicationCommandInteractionDataOptionSubCommand {
|
||||
|
||||
export interface ApplicationCommandInteractionDataOptionSubCommandGroup {
|
||||
name: string;
|
||||
type: ApplicationCommandOptionType.SUB_COMMAND;
|
||||
type: ApplicationCommandOptionType.SUB_COMMAND_GROUP;
|
||||
options: ApplicationCommandInteractionDataOptionSubCommand[];
|
||||
}
|
||||
|
||||
@@ -238,14 +238,19 @@ export type APIInteractionResponse =
|
||||
| APIInteractionResponseChannelMessageWithSource
|
||||
| APIInteractionResponseDeferredChannelMessageWithSource;
|
||||
|
||||
export type APIInteractionResponsePong = InteractionResponsePayload<InteractionResponseType.Pong>;
|
||||
export interface APIInteractionResponsePong {
|
||||
type: InteractionResponseType.Pong;
|
||||
}
|
||||
|
||||
export type APIInteractionResponseChannelMessageWithSource = InteractionResponsePayload<
|
||||
InteractionResponseType.ChannelMessageWithSource,
|
||||
true
|
||||
>;
|
||||
export interface APIInteractionResponseChannelMessageWithSource {
|
||||
type: InteractionResponseType.ChannelMessageWithSource;
|
||||
data: APIInteractionApplicationCommandCallbackData;
|
||||
}
|
||||
|
||||
export type APIInteractionResponseDeferredChannelMessageWithSource = InteractionResponsePayload<InteractionResponseType.DeferredChannelMessageWithSource>;
|
||||
export interface APIInteractionResponseDeferredChannelMessageWithSource {
|
||||
type: InteractionResponseType.DeferredChannelMessageWithSource;
|
||||
data?: Pick<APIInteractionApplicationCommandCallbackData, 'flags'>;
|
||||
}
|
||||
|
||||
/**
|
||||
* https://discord.com/developers/docs/interactions/slash-commands#interaction-response-interactionresponsetype
|
||||
@@ -295,14 +300,6 @@ export interface APIMessageInteraction {
|
||||
user: APIUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
interface InteractionResponsePayload<T extends InteractionResponseType, D = false> {
|
||||
type: T;
|
||||
data: D extends true ? APIInteractionApplicationCommandCallbackData : never;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user