Socket
Socket
Sign inDemoInstall

discord-slim

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-slim - npm Package Compare versions

Comparing version 2.2.0 to 2.2.1

24

dist/actions.d.ts

@@ -425,2 +425,3 @@ /// <reference types="node" />

default_permission?: boolean;
type?: helpers.ApplicationCommandTypes;
}, requestOptions?: RequestOptions | undefined) => Promise<types.ApplicationCommand>;

@@ -436,2 +437,3 @@ GetGlobalCommand: (application_id: string, command_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.ApplicationCommand>;

GetGuildCommands: (application_id: string, guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.ApplicationCommand[]>;
BulkOverwriteGlobalCommands: (application_id: string, params: types.ApplicationCommand[], requestOptions?: RequestOptions | undefined) => Promise<types.ApplicationCommand[]>;
CreateGuildCommand: (application_id: string, guild_id: string, params: {

@@ -442,2 +444,3 @@ name: string;

default_permission?: boolean;
type?: helpers.ApplicationCommandTypes;
}, requestOptions?: RequestOptions | undefined) => Promise<types.ApplicationCommand>;

@@ -452,2 +455,12 @@ GetGuildCommand: (application_id: string, guild_id: string, command_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.ApplicationCommand>;

DeleteGuildCommand: (application_id: string, guild_id: string, command_id: string, requestOptions?: RequestOptions | undefined) => Promise<null>;
BulkOverwriteGuildCommands: (application_id: string, guild_id: string, params: types.ApplicationCommand[], requestOptions?: RequestOptions | undefined) => Promise<types.ApplicationCommand[]>;
GetGuildCommandPermissions: (application_id: string, guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.GuildApplicationCommandPermissions[]>;
GetCommandPermissions: (application_id: string, guild_id: string, command_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.GuildApplicationCommandPermissions>;
EditCommandPermissions: (application_id: string, guild_id: string, command_id: string, params: {
permissions: types.ApplicationCommandPermissions[];
}, requestOptions?: RequestOptions | undefined) => Promise<null>;
BatchEditCommandPermissions: (application_id: string, guild_id: string, params: {
id: string;
permissions: types.ApplicationCommandPermissions[];
}[], requestOptions?: RequestOptions | undefined) => Promise<types.GuildApplicationCommandPermissions[]>;
CreateInteractionResponse: (interaction_id: string, interaction_token: string, params: types.InteractionResponse, requestOptions?: RequestOptions | undefined) => Promise<null>;

@@ -469,3 +482,3 @@ GetOriginalInteractionResponse: (application_id: string, interaction_token: string, requestOptions?: RequestOptions | undefined) => Promise<types.Message>;

allowed_mentions?: types.AllowedMentions;
flags?: helpers.InteractionResponseFlags;
flags?: helpers.InteractionCallbackDataFlags;
components?: types.ActionRow[];

@@ -481,11 +494,2 @@ }, requestOptions?: RequestOptions | undefined) => Promise<types.Message | null>;

DeleteFollowupMessage: (application_id: string, interaction_token: string, message_id: string, requestOptions?: RequestOptions | undefined) => Promise<null>;
GetGuildCommandPermissions: (application_id: string, guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.GuildApplicationCommandPermissions[]>;
GetCommandPermissions: (application_id: string, guild_id: string, command_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.GuildApplicationCommandPermissions>;
EditCommandPermissions: (application_id: string, guild_id: string, command_id: string, params: {
permissions: types.ApplicationCommandPermissions[];
}, requestOptions?: RequestOptions | undefined) => Promise<null>;
BatchEditCommandPermissions: (application_id: string, guild_id: string, params: {
id: string;
permissions: types.ApplicationCommandPermissions[];
}[], requestOptions?: RequestOptions | undefined) => Promise<types.GuildApplicationCommandPermissions[]>;
};

@@ -492,0 +496,0 @@ export declare const OAuth2: {

@@ -156,2 +156,3 @@ import { Request } from './request.js';

GetGuildCommands: (application_id, guild_id, requestOptions) => Request("GET", Path("applications", application_id, "guilds", guild_id, "commands"), requestOptions),
BulkOverwriteGlobalCommands: (application_id, params, requestOptions) => Request("PUT", Path("applications", application_id, "commands"), requestOptions, params),
CreateGuildCommand: (application_id, guild_id, params, requestOptions) => Request("POST", Path("applications", application_id, "guilds", guild_id, "commands"), requestOptions, params),

@@ -161,2 +162,7 @@ GetGuildCommand: (application_id, guild_id, command_id, requestOptions) => Request("GET", Path("applications", application_id, "guilds", guild_id, "commands", command_id), requestOptions),

DeleteGuildCommand: (application_id, guild_id, command_id, requestOptions) => Request("DELETE", Path("applications", application_id, "guilds", guild_id, "commands", command_id), requestOptions),
BulkOverwriteGuildCommands: (application_id, guild_id, params, requestOptions) => Request("PUT", Path("applications", application_id, "guilds", guild_id, "commands"), requestOptions, params),
GetGuildCommandPermissions: (application_id, guild_id, requestOptions) => Request("GET", Path("applications", application_id, "guilds", guild_id, "commands", "permissions"), requestOptions),
GetCommandPermissions: (application_id, guild_id, command_id, requestOptions) => Request("GET", Path("applications", application_id, "guilds", guild_id, "commands", command_id, "permissions"), requestOptions),
EditCommandPermissions: (application_id, guild_id, command_id, params, requestOptions) => Request("PUT", Path("applications", application_id, "guilds", guild_id, "commands", command_id, "permissions"), requestOptions, params),
BatchEditCommandPermissions: (application_id, guild_id, params, requestOptions) => Request("PUT", Path("applications", application_id, "guilds", guild_id, "commands", "permissions"), requestOptions, params),
CreateInteractionResponse: (interaction_id, interaction_token, params, requestOptions) => Request("POST", Path("interactions", interaction_id, interaction_token, "callback"), requestOptions, params),

@@ -170,6 +176,2 @@ GetOriginalInteractionResponse: (application_id, interaction_token, requestOptions) => Request("GET", Path("webhooks", application_id, interaction_token, "messages", "@original"), requestOptions),

DeleteFollowupMessage: (application_id, interaction_token, message_id, requestOptions) => Request("DELETE", Path("webhooks", application_id, interaction_token, "messages", message_id), requestOptions),
GetGuildCommandPermissions: (application_id, guild_id, requestOptions) => Request("GET", Path("applications", application_id, "guilds", guild_id, "commands", "permissions"), requestOptions),
GetCommandPermissions: (application_id, guild_id, command_id, requestOptions) => Request("GET", Path("applications", application_id, "guilds", guild_id, "commands", command_id, "permissions"), requestOptions),
EditCommandPermissions: (application_id, guild_id, command_id, params, requestOptions) => Request("PUT", Path("applications", application_id, "guilds", guild_id, "commands", command_id, "permissions"), requestOptions, params),
BatchEditCommandPermissions: (application_id, guild_id, params, requestOptions) => Request("PUT", Path("applications", application_id, "guilds", guild_id, "commands", "permissions"), requestOptions, params),
};

@@ -176,0 +178,0 @@ export const OAuth2 = {

@@ -40,3 +40,3 @@ export declare const HOST = "https://discord.com", API: "https://discord.com/api", API_VERSION = 9, API_PATH: "https://discord.com/api/v9", CDN = "https://cdn.discordapp.com";

readonly MANAGE_EMOJIS: 1073741824n;
readonly USE_SLASH_COMMANDS: 2147483648n;
readonly USE_APPLICATION_COMMANDS: 2147483648n;
readonly REQUEST_TO_SPEAK: 4294967296n;

@@ -175,5 +175,5 @@ readonly MANAGE_THREADS: 17179869184n;

export declare enum AllowedMentionTypes {
ROLE_MENTIONS = "roles",
USER_MENTIONS = "users",
EVERYONE_MENTIONS = "everyone"
ROLES = "roles",
USERS = "users",
EVERYONE = "everyone"
}

@@ -321,3 +321,3 @@ export declare enum DefaultMessageNotificationLevel {

}
export declare enum InteractionResponseTypes {
export declare enum InteractionCallbackTypes {
PONG = 1,

@@ -329,3 +329,3 @@ CHANNEL_MESSAGE_WITH_SOURCE = 4,

}
export declare enum InteractionResponseFlags {
export declare enum InteractionCallbackDataFlags {
EPHEMERAL = 64

@@ -431,1 +431,6 @@ }

}
export declare enum ApplicationCommandTypes {
CHAT_INPUT = 1,
USER = 2,
MESSAGE = 3
}

@@ -41,3 +41,3 @@ export const HOST = 'https://discord.com', API = `${HOST}/api`, API_VERSION = 9, API_PATH = `${API}/v${API_VERSION}`, CDN = 'https://cdn.discordapp.com';

MANAGE_EMOJIS: 0x0040000000n,
USE_SLASH_COMMANDS: 0x0080000000n,
USE_APPLICATION_COMMANDS: 0x0080000000n,
REQUEST_TO_SPEAK: 0x0100000000n,

@@ -185,5 +185,5 @@ MANAGE_THREADS: 0x0400000000n,

(function (AllowedMentionTypes) {
AllowedMentionTypes["ROLE_MENTIONS"] = "roles";
AllowedMentionTypes["USER_MENTIONS"] = "users";
AllowedMentionTypes["EVERYONE_MENTIONS"] = "everyone";
AllowedMentionTypes["ROLES"] = "roles";
AllowedMentionTypes["USERS"] = "users";
AllowedMentionTypes["EVERYONE"] = "everyone";
})(AllowedMentionTypes || (AllowedMentionTypes = {}));

@@ -350,14 +350,14 @@ export var DefaultMessageNotificationLevel;

})(InteractionTypes || (InteractionTypes = {}));
export var InteractionResponseTypes;
(function (InteractionResponseTypes) {
InteractionResponseTypes[InteractionResponseTypes["PONG"] = 1] = "PONG";
InteractionResponseTypes[InteractionResponseTypes["CHANNEL_MESSAGE_WITH_SOURCE"] = 4] = "CHANNEL_MESSAGE_WITH_SOURCE";
InteractionResponseTypes[InteractionResponseTypes["DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE"] = 5] = "DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE";
InteractionResponseTypes[InteractionResponseTypes["DEFERRED_UPDATE_MESSAGE"] = 6] = "DEFERRED_UPDATE_MESSAGE";
InteractionResponseTypes[InteractionResponseTypes["UPDATE_MESSAGE"] = 7] = "UPDATE_MESSAGE";
})(InteractionResponseTypes || (InteractionResponseTypes = {}));
export var InteractionResponseFlags;
(function (InteractionResponseFlags) {
InteractionResponseFlags[InteractionResponseFlags["EPHEMERAL"] = 64] = "EPHEMERAL";
})(InteractionResponseFlags || (InteractionResponseFlags = {}));
export var InteractionCallbackTypes;
(function (InteractionCallbackTypes) {
InteractionCallbackTypes[InteractionCallbackTypes["PONG"] = 1] = "PONG";
InteractionCallbackTypes[InteractionCallbackTypes["CHANNEL_MESSAGE_WITH_SOURCE"] = 4] = "CHANNEL_MESSAGE_WITH_SOURCE";
InteractionCallbackTypes[InteractionCallbackTypes["DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE"] = 5] = "DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE";
InteractionCallbackTypes[InteractionCallbackTypes["DEFERRED_UPDATE_MESSAGE"] = 6] = "DEFERRED_UPDATE_MESSAGE";
InteractionCallbackTypes[InteractionCallbackTypes["UPDATE_MESSAGE"] = 7] = "UPDATE_MESSAGE";
})(InteractionCallbackTypes || (InteractionCallbackTypes = {}));
export var InteractionCallbackDataFlags;
(function (InteractionCallbackDataFlags) {
InteractionCallbackDataFlags[InteractionCallbackDataFlags["EPHEMERAL"] = 64] = "EPHEMERAL";
})(InteractionCallbackDataFlags || (InteractionCallbackDataFlags = {}));
export var OAuth2Scopes;

@@ -475,1 +475,7 @@ (function (OAuth2Scopes) {

})(ThreadArchiveDuration || (ThreadArchiveDuration = {}));
export var ApplicationCommandTypes;
(function (ApplicationCommandTypes) {
ApplicationCommandTypes[ApplicationCommandTypes["CHAT_INPUT"] = 1] = "CHAT_INPUT";
ApplicationCommandTypes[ApplicationCommandTypes["USER"] = 2] = "USER";
ApplicationCommandTypes[ApplicationCommandTypes["MESSAGE"] = 3] = "MESSAGE";
})(ApplicationCommandTypes || (ApplicationCommandTypes = {}));

@@ -587,3 +587,5 @@ import type * as helpers from './helpers';

id: string;
type?: helpers.ApplicationCommandTypes;
application_id: string;
guild_id?: string;
name: string;

@@ -604,3 +606,3 @@ description: string;

name: string;
value: string | number;
value: string | number | boolean;
};

@@ -622,3 +624,3 @@ export declare type GuildApplicationCommandPermissions = {

type: helpers.InteractionTypes;
data?: ApplicationCommandInteractionData;
data?: InteractionData;
guild_id?: string;

@@ -632,11 +634,14 @@ channel_id?: string;

};
export declare type ApplicationCommandInteractionData = {
export declare type InteractionData = {
id: string;
name: string;
resolved?: ApplicationCommandInteractionDataResolved;
options?: ApplicationCommandInteractionDataOption[];
type?: helpers.ApplicationCommandTypes;
resolved?: InteractionDataResolved;
options?: InteractionDataOption[];
custom_id?: string;
component_type?: helpers.ComponentTypes;
values?: SelectOption[];
target_id?: string;
};
export declare type ApplicationCommandInteractionDataResolved = {
export declare type InteractionDataResolved = {
users?: {

@@ -654,11 +659,20 @@ [id: string]: User;

};
messages?: {
[id: string]: Message;
};
};
export declare type ApplicationCommandInteractionDataOption = {
export declare type InteractionDataOption = {
name: string;
type: helpers.ApplicationCommandOptionTypes;
value?: string | number | boolean;
options?: ApplicationCommandInteractionDataOption[];
options?: InteractionDataOption[];
};
export declare type MessageInteraction = {
id: string;
type: helpers.InteractionTypes;
name: string;
user: User;
};
export declare type InteractionResponse = {
type: helpers.InteractionResponseTypes;
type: helpers.InteractionCallbackTypes;
data?: InteractionApplicationCommandCallbackData;

@@ -671,11 +685,5 @@ };

allowed_mentions?: AllowedMentions;
flags?: helpers.InteractionResponseFlags;
flags?: helpers.InteractionCallbackDataFlags;
components?: ActionRow[];
};
export declare type MessageInteraction = {
id: string;
type: helpers.InteractionTypes;
name: string;
user: User;
};
export declare type Presence = {

@@ -682,0 +690,0 @@ user: {

{
"name": "discord-slim",
"version": "2.2.0",
"version": "2.2.1",
"description": "Lightweight Discord API library for Node.js.",

@@ -5,0 +5,0 @@ "author": "Hanabishi",

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