Socket
Socket
Sign inDemoInstall

discord-api-types

Package Overview
Dependencies
Maintainers
3
Versions
949
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-api-types - npm Package Compare versions

Comparing version 0.37.100-next.3de4ca8.1725550009 to 0.37.100-next.93e649a.1725561811

2

package.json
{
"name": "discord-api-types",
"version": "0.37.100-next.3de4ca8.1725550009",
"version": "0.37.100-next.93e649a.1725561811",
"description": "Discord API typings that are kept up to date for use in bot library creation.",

@@ -5,0 +5,0 @@ "homepage": "https://discord-api-types.dev",

@@ -92,2 +92,9 @@ import type { Permissions, Snowflake } from '../../../globals';

version: Snowflake;
/**
* Determines whether the interaction is handled by the app's interactions handler or by Discord
*
* @remarks
* This is only available for {@link ApplicationCommandType.PrimaryEntryPoint} commands
*/
handler?: EntryPointCommandHandlerType;
}

@@ -98,5 +105,18 @@ /**

export declare enum ApplicationCommandType {
/**
* Slash commands; a text-based command that shows up when a user types `/`
*/
ChatInput = 1,
/**
* A UI-based command that shows up when you right click or tap on a user
*/
User = 2,
Message = 3
/**
* A UI-based command that shows up when you right click or tap on a message
*/
Message = 3,
/**
* A UI-based command that represents the primary way to invoke an app's Activity
*/
PrimaryEntryPoint = 4
}

@@ -134,2 +154,16 @@ /**

/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types
*/
export declare enum EntryPointCommandHandlerType {
/**
* The app handles the interaction using an interaction token
*/
AppHandler = 1,
/**
* Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with
* the app
*/
DiscordLaunchActivity = 2
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data

@@ -136,0 +170,0 @@ */

@@ -17,3 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.InteractionContextType = exports.ApplicationIntegrationType = exports.ApplicationCommandType = void 0;
exports.EntryPointCommandHandlerType = exports.InteractionContextType = exports.ApplicationIntegrationType = exports.ApplicationCommandType = void 0;
__exportStar(require("./_applicationCommands/chatInput"), exports);

@@ -27,5 +27,18 @@ __exportStar(require("./_applicationCommands/contextMenu"), exports);

(function (ApplicationCommandType) {
/**
* Slash commands; a text-based command that shows up when a user types `/`
*/
ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput";
/**
* A UI-based command that shows up when you right click or tap on a user
*/
ApplicationCommandType[ApplicationCommandType["User"] = 2] = "User";
/**
* A UI-based command that shows up when you right click or tap on a message
*/
ApplicationCommandType[ApplicationCommandType["Message"] = 3] = "Message";
/**
* A UI-based command that represents the primary way to invoke an app's Activity
*/
ApplicationCommandType[ApplicationCommandType["PrimaryEntryPoint"] = 4] = "PrimaryEntryPoint";
})(ApplicationCommandType || (exports.ApplicationCommandType = ApplicationCommandType = {}));

@@ -64,2 +77,17 @@ /**

})(InteractionContextType || (exports.InteractionContextType = InteractionContextType = {}));
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types
*/
var EntryPointCommandHandlerType;
(function (EntryPointCommandHandlerType) {
/**
* The app handles the interaction using an interaction token
*/
EntryPointCommandHandlerType[EntryPointCommandHandlerType["AppHandler"] = 1] = "AppHandler";
/**
* Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with
* the app
*/
EntryPointCommandHandlerType[EntryPointCommandHandlerType["DiscordLaunchActivity"] = 2] = "DiscordLaunchActivity";
})(EntryPointCommandHandlerType || (exports.EntryPointCommandHandlerType = EntryPointCommandHandlerType = {}));
//# sourceMappingURL=applicationCommands.js.map

@@ -85,3 +85,10 @@ import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v10';

*/
PremiumRequired = 10
PremiumRequired = 10,
/**
* Launch the Activity associated with the app.
*
* @remarks
* Only available for apps with Activities enabled
*/
LaunchActivity = 12
}

@@ -88,0 +95,0 @@ /**

@@ -54,3 +54,10 @@ "use strict";

InteractionResponseType[InteractionResponseType["PremiumRequired"] = 10] = "PremiumRequired";
/**
* Launch the Activity associated with the app.
*
* @remarks
* Only available for apps with Activities enabled
*/
InteractionResponseType[InteractionResponseType["LaunchActivity"] = 12] = "LaunchActivity";
})(InteractionResponseType || (exports.InteractionResponseType = InteractionResponseType = {}));
//# sourceMappingURL=responses.js.map

@@ -728,3 +728,5 @@ /**

GuildIncidentReportRaid = 38,
GuildIncidentReportFalseAlarm = 39
GuildIncidentReportFalseAlarm = 39,
PurchaseNotification = 44,
PollResult = 46
}

@@ -1186,3 +1188,7 @@ /**

*/
AutoModerationMessage = "auto_moderation_message"
AutoModerationMessage = "auto_moderation_message",
/**
* Poll result embed
*/
PollResult = "poll_result"
}

@@ -1189,0 +1195,0 @@ /**

@@ -190,2 +190,4 @@ "use strict";

MessageType[MessageType["GuildIncidentReportFalseAlarm"] = 39] = "GuildIncidentReportFalseAlarm";
MessageType[MessageType["PurchaseNotification"] = 44] = "PurchaseNotification";
MessageType[MessageType["PollResult"] = 46] = "PollResult";
})(MessageType || (exports.MessageType = MessageType = {}));

@@ -338,2 +340,6 @@ /**

EmbedType["AutoModerationMessage"] = "auto_moderation_message";
/**
* Poll result embed
*/
EmbedType["PollResult"] = "poll_result";
})(EmbedType || (exports.EmbedType = EmbedType = {}));

@@ -340,0 +346,0 @@ /**

@@ -92,2 +92,9 @@ import type { Permissions, Snowflake } from '../../../globals';

version: Snowflake;
/**
* Determines whether the interaction is handled by the app's interactions handler or by Discord
*
* @remarks
* This is only available for {@link ApplicationCommandType.PrimaryEntryPoint} commands
*/
handler?: EntryPointCommandHandlerType;
}

@@ -98,5 +105,18 @@ /**

export declare enum ApplicationCommandType {
/**
* Slash commands; a text-based command that shows up when a user types `/`
*/
ChatInput = 1,
/**
* A UI-based command that shows up when you right click or tap on a user
*/
User = 2,
Message = 3
/**
* A UI-based command that shows up when you right click or tap on a message
*/
Message = 3,
/**
* A UI-based command that represents the primary way to invoke an app's Activity
*/
PrimaryEntryPoint = 4
}

@@ -134,2 +154,16 @@ /**

/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types
*/
export declare enum EntryPointCommandHandlerType {
/**
* The app handles the interaction using an interaction token
*/
AppHandler = 1,
/**
* Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with
* the app
*/
DiscordLaunchActivity = 2
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-interaction-data

@@ -136,0 +170,0 @@ */

@@ -17,3 +17,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.InteractionContextType = exports.ApplicationIntegrationType = exports.ApplicationCommandType = void 0;
exports.EntryPointCommandHandlerType = exports.InteractionContextType = exports.ApplicationIntegrationType = exports.ApplicationCommandType = void 0;
__exportStar(require("./_applicationCommands/chatInput"), exports);

@@ -27,5 +27,18 @@ __exportStar(require("./_applicationCommands/contextMenu"), exports);

(function (ApplicationCommandType) {
/**
* Slash commands; a text-based command that shows up when a user types `/`
*/
ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput";
/**
* A UI-based command that shows up when you right click or tap on a user
*/
ApplicationCommandType[ApplicationCommandType["User"] = 2] = "User";
/**
* A UI-based command that shows up when you right click or tap on a message
*/
ApplicationCommandType[ApplicationCommandType["Message"] = 3] = "Message";
/**
* A UI-based command that represents the primary way to invoke an app's Activity
*/
ApplicationCommandType[ApplicationCommandType["PrimaryEntryPoint"] = 4] = "PrimaryEntryPoint";
})(ApplicationCommandType || (exports.ApplicationCommandType = ApplicationCommandType = {}));

@@ -64,2 +77,17 @@ /**

})(InteractionContextType || (exports.InteractionContextType = InteractionContextType = {}));
/**
* https://discord.com/developers/docs/interactions/application-commands#application-command-object-entry-point-command-handler-types
*/
var EntryPointCommandHandlerType;
(function (EntryPointCommandHandlerType) {
/**
* The app handles the interaction using an interaction token
*/
EntryPointCommandHandlerType[EntryPointCommandHandlerType["AppHandler"] = 1] = "AppHandler";
/**
* Discord handles the interaction by launching an Activity and sending a follow-up message without coordinating with
* the app
*/
EntryPointCommandHandlerType[EntryPointCommandHandlerType["DiscordLaunchActivity"] = 2] = "DiscordLaunchActivity";
})(EntryPointCommandHandlerType || (exports.EntryPointCommandHandlerType = EntryPointCommandHandlerType = {}));
//# sourceMappingURL=applicationCommands.js.map

@@ -85,3 +85,10 @@ import type { RESTPostAPIWebhookWithTokenJSONBody } from '../../../v9';

*/
PremiumRequired = 10
PremiumRequired = 10,
/**
* Launch the Activity associated with the app.
*
* @remarks
* Only available for apps with Activities enabled
*/
LaunchActivity = 12
}

@@ -88,0 +95,0 @@ /**

@@ -54,3 +54,10 @@ "use strict";

InteractionResponseType[InteractionResponseType["PremiumRequired"] = 10] = "PremiumRequired";
/**
* Launch the Activity associated with the app.
*
* @remarks
* Only available for apps with Activities enabled
*/
InteractionResponseType[InteractionResponseType["LaunchActivity"] = 12] = "LaunchActivity";
})(InteractionResponseType || (exports.InteractionResponseType = InteractionResponseType = {}));
//# sourceMappingURL=responses.js.map

@@ -714,3 +714,5 @@ /**

GuildIncidentReportRaid = 38,
GuildIncidentReportFalseAlarm = 39
GuildIncidentReportFalseAlarm = 39,
PurchaseNotification = 44,
PollResult = 46
}

@@ -1155,3 +1157,7 @@ /**

*/
AutoModerationMessage = "auto_moderation_message"
AutoModerationMessage = "auto_moderation_message",
/**
* Poll result embed
*/
PollResult = "poll_result"
}

@@ -1158,0 +1164,0 @@ /**

@@ -190,2 +190,4 @@ "use strict";

MessageType[MessageType["GuildIncidentReportFalseAlarm"] = 39] = "GuildIncidentReportFalseAlarm";
MessageType[MessageType["PurchaseNotification"] = 44] = "PurchaseNotification";
MessageType[MessageType["PollResult"] = 46] = "PollResult";
})(MessageType || (exports.MessageType = MessageType = {}));

@@ -338,2 +340,6 @@ /**

EmbedType["AutoModerationMessage"] = "auto_moderation_message";
/**
* Poll result embed
*/
EmbedType["PollResult"] = "poll_result";
})(EmbedType || (exports.EmbedType = EmbedType = {}));

@@ -340,0 +346,0 @@ /**

@@ -103,2 +103,4 @@ /**

ConnectionHasBeenRevoked = 40012,
OnlyConsumableSKUsCanBeConsumed = 40018,
YouCanOnlyDeleteSandboxEntitlements = 40019,
TargetUserIsNotConnectedToVoice = 40032,

@@ -115,2 +117,3 @@ ThisMessageWasAlreadyCrossposted = 40033,

AnEntitlementHasAlreadyBeenGrantedForThisResource = 40074,
ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages = 40094,
CloudflareIsBlockingYourRequest = 40333,

@@ -117,0 +120,0 @@ MissingAccess = 50001,

@@ -107,2 +107,4 @@ "use strict";

RESTJSONErrorCodes[RESTJSONErrorCodes["ConnectionHasBeenRevoked"] = 40012] = "ConnectionHasBeenRevoked";
RESTJSONErrorCodes[RESTJSONErrorCodes["OnlyConsumableSKUsCanBeConsumed"] = 40018] = "OnlyConsumableSKUsCanBeConsumed";
RESTJSONErrorCodes[RESTJSONErrorCodes["YouCanOnlyDeleteSandboxEntitlements"] = 40019] = "YouCanOnlyDeleteSandboxEntitlements";
RESTJSONErrorCodes[RESTJSONErrorCodes["TargetUserIsNotConnectedToVoice"] = 40032] = "TargetUserIsNotConnectedToVoice";

@@ -119,2 +121,3 @@ RESTJSONErrorCodes[RESTJSONErrorCodes["ThisMessageWasAlreadyCrossposted"] = 40033] = "ThisMessageWasAlreadyCrossposted";

RESTJSONErrorCodes[RESTJSONErrorCodes["AnEntitlementHasAlreadyBeenGrantedForThisResource"] = 40074] = "AnEntitlementHasAlreadyBeenGrantedForThisResource";
RESTJSONErrorCodes[RESTJSONErrorCodes["ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages"] = 40094] = "ThisInteractionHasHitTheMaximumNumberOfFollowUpMessages";
RESTJSONErrorCodes[RESTJSONErrorCodes["CloudflareIsBlockingYourRequest"] = 40333] = "CloudflareIsBlockingYourRequest";

@@ -121,0 +124,0 @@ RESTJSONErrorCodes[RESTJSONErrorCodes["MissingAccess"] = 50001] = "MissingAccess";

@@ -1,2 +0,3 @@

import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType } from '../../payloads/v10/index';
import type { Snowflake } from '../../globals';
import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType, InteractionResponseType, APIMessage, InteractionType } from '../../payloads/v10/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, NonNullableFields, StrictPartial } from '../../utils/internals';

@@ -105,2 +106,11 @@ import type { RESTDeleteAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenMessageFormDataBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPostAPIWebhookWithTokenWaitResult } from './webhook';

*/
export interface RESTPostAPIInteractionCallbackQuery {
/**
* Whether to include a interaction callback response as the response instead of a 204
*/
with_response?: boolean;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
*/
export type RESTPostAPIInteractionCallbackFormDataBody = (Record<`files[${bigint}]`, unknown> & {

@@ -113,2 +123,81 @@ /**

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
*/
export type RESTPostAPIInteractionCallbackResult = never;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object
*/
export interface RESTPostAPIInteractionCallbackWithResponseResult {
/**
* The interaction object associated with the interaction
*/
interaction: RESTAPIInteractionCallbackObject;
/**
* The resource that was created by the interaction response
*/
resource?: RESTAPIInteractionCallbackResourceObject;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-object
*/
export interface RESTAPIInteractionCallbackObject {
/**
* ID of the interaction
*/
id: Snowflake;
/**
* Interaction type
*/
type: InteractionType;
/**
* Instance ID of the Activity if one was launched or joined
*/
activity_instance_id?: string;
/**
* ID of the message that was created by the interaction
*/
response_message_id?: Snowflake;
/**
* Whether or not the message is in a loading state
*/
response_message_loading?: boolean;
/**
* Whether or not the response message was ephemeral
*/
response_message_ephemeral?: boolean;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object
*/
export interface RESTAPIInteractionCallbackResourceObject {
/**
* Interaction callback type
*/
type: InteractionResponseType;
/**
* Represents the Activity launched by this interaction
*
* @remarks
* Only present if `type` is {@link InteractionResponseType.LaunchActivity}
*/
activity_instance?: RESTAPIInteractionCallbackActivityInstanceResource;
/**
* Message created by the interaction
*
* @remarks
* Only present if `type` is {@link InteractionResponseType.ChannelMessageWithSource}
* or {@link InteractionResponseType.UpdateMessage}
*/
message?: APIMessage;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource
*/
export interface RESTAPIInteractionCallbackActivityInstanceResource {
/**
* Instance ID of the Activity if one was launched or joined.
*/
id: string;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response

@@ -115,0 +204,0 @@ */

@@ -233,2 +233,9 @@ import type { Snowflake } from '../../globals';

attachments?: RESTAPIAttachment[] | undefined;
/**
* A poll!
*
* @remarks
* Polls can only be added when editing a deferred interaction response.
*/
poll?: RESTAPIPoll | undefined;
};

@@ -235,0 +242,0 @@ /**

@@ -1,2 +0,3 @@

import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType } from '../../payloads/v9/index';
import type { Snowflake } from '../../globals';
import type { APIApplicationCommand, APIApplicationCommandPermission, APIGuildApplicationCommandPermissions, APIInteractionResponse, APIInteractionResponseCallbackData, ApplicationCommandType, InteractionResponseType, APIMessage, InteractionType } from '../../payloads/v9/index';
import type { AddUndefinedToPossiblyUndefinedPropertiesOfInterface, NonNullableFields, StrictPartial } from '../../utils/internals';

@@ -105,2 +106,11 @@ import type { RESTDeleteAPIWebhookWithTokenMessageResult, RESTGetAPIWebhookWithTokenMessageResult, RESTPatchAPIWebhookWithTokenMessageFormDataBody, RESTPatchAPIWebhookWithTokenMessageJSONBody, RESTPatchAPIWebhookWithTokenMessageResult, RESTPostAPIWebhookWithTokenWaitResult } from './webhook';

*/
export interface RESTPostAPIInteractionCallbackQuery {
/**
* Whether to include a interaction callback response as the response instead of a 204
*/
with_response?: boolean;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
*/
export type RESTPostAPIInteractionCallbackFormDataBody = (Record<`files[${bigint}]`, unknown> & {

@@ -113,2 +123,81 @@ /**

/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response
*/
export type RESTPostAPIInteractionCallbackResult = never;
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-response-object
*/
export interface RESTPostAPIInteractionCallbackWithResponseResult {
/**
* The interaction object associated with the interaction
*/
interaction: RESTAPIInteractionCallbackObject;
/**
* The resource that was created by the interaction response
*/
resource?: RESTAPIInteractionCallbackResourceObject;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-object
*/
export interface RESTAPIInteractionCallbackObject {
/**
* ID of the interaction
*/
id: Snowflake;
/**
* Interaction type
*/
type: InteractionType;
/**
* Instance ID of the Activity if one was launched or joined
*/
activity_instance_id?: string;
/**
* ID of the message that was created by the interaction
*/
response_message_id?: Snowflake;
/**
* Whether or not the message is in a loading state
*/
response_message_loading?: boolean;
/**
* Whether or not the response message was ephemeral
*/
response_message_ephemeral?: boolean;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-resource-object
*/
export interface RESTAPIInteractionCallbackResourceObject {
/**
* Interaction callback type
*/
type: InteractionResponseType;
/**
* Represents the Activity launched by this interaction
*
* @remarks
* Only present if `type` is {@link InteractionResponseType.LaunchActivity}
*/
activity_instance?: RESTAPIInteractionCallbackActivityInstanceResource;
/**
* Message created by the interaction
*
* @remarks
* Only present if `type` is {@link InteractionResponseType.ChannelMessageWithSource}
* or {@link InteractionResponseType.UpdateMessage}
*/
message?: APIMessage;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-callback-interaction-callback-activity-instance-resource
*/
export interface RESTAPIInteractionCallbackActivityInstanceResource {
/**
* Instance ID of the Activity if one was launched or joined.
*/
id: string;
}
/**
* https://discord.com/developers/docs/interactions/receiving-and-responding#get-original-interaction-response

@@ -115,0 +204,0 @@ */

@@ -233,2 +233,9 @@ import type { Snowflake } from '../../globals';

attachments?: RESTAPIAttachment[] | undefined;
/**
* A poll!
*
* @remarks
* Polls can only be added when editing a deferred interaction response.
*/
poll?: RESTAPIPoll | undefined;
};

@@ -235,0 +242,0 @@ /**

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc