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.4.1 to 2.5.0

25

dist/actions.d.ts

@@ -46,4 +46,4 @@ /// <reference types="node" />

EditPermissions: (channel_id: string, overwrite_id: string, params: {
allow: string;
deny: string;
allow?: string | null;
deny?: string | null;
type: helpers.PermissionsOverwriteTypes;

@@ -59,7 +59,2 @@ }, requestOptions?: RequestOptions | undefined) => Promise<null>;

GetWebhooks: (channel_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.Webhook[]>;
ListActiveThreads: (channel_id: string, requestOptions?: RequestOptions | undefined) => Promise<{
threads: types.Channel[];
members: types.ThreadMember[];
has_more: boolean;
}>;
ListPublicArchivedThreads: (channel_id: string, params?: {

@@ -97,6 +92,6 @@ before?: string | undefined;

embeds?: types.Embed[];
embed?: types.Embed;
allowed_mentions?: types.AllowedMentions;
message_reference?: types.MessageReference;
components?: types.ActionRow[];
flags?: helpers.MessageFlags;
}, requestOptions?: RequestOptions | undefined) => Promise<types.Message>;

@@ -108,3 +103,2 @@ Crosspost: (channel_id: string, message_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.Message>;

embeds?: types.Embed[];
embed?: types.Embed;
flags?: helpers.MessageFlags;

@@ -220,3 +214,2 @@ allowed_mentions?: types.AllowedMentions;

include_roles?: string | undefined;
reason?: string | undefined;
} | undefined, requestOptions?: RequestOptions | undefined) => Promise<{

@@ -285,3 +278,2 @@ pruned: number | null;

delete_message_days?: number | undefined;
reason?: string | undefined;
} | undefined, requestOptions?: RequestOptions | undefined) => Promise<null>;

@@ -312,5 +304,5 @@ Remove: (guild_id: string, user_id: string, requestOptions?: RequestOptions | undefined) => Promise<null>;

export declare const Widget: {
GetSettings: (guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.GuildWidget>;
Modify: (guild_id: string, params: types.GuildWidget, requestOptions?: RequestOptions | undefined) => Promise<types.GuildWidget>;
Get: (guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<object>;
GetSettings: (guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.GuildWidgetSettings>;
Modify: (guild_id: string, params: types.GuildWidgetSettings, requestOptions?: RequestOptions | undefined) => Promise<types.GuildWidgetSettings>;
Get: (guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.GuildWidget>;
GetImage: (guild_id: string, params?: {

@@ -415,2 +407,3 @@ style?: helpers.WidgetStyleOptions | undefined;

components?: types.ActionRow[];
flags?: helpers.MessageFlags;
}, params2?: {

@@ -504,3 +497,3 @@ wait?: boolean | undefined;

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

@@ -611,2 +604,3 @@ }, requestOptions?: RequestOptions | undefined) => Promise<types.Message | null>;

entity_type: helpers.ScheduledEventEntityTypes;
image?: string;
}, requestOptions?: RequestOptions | undefined) => Promise<types.ScheduledEvent>;

@@ -626,2 +620,3 @@ Get: (guild_id: string, event_id: string, params?: {

status?: helpers.ScheduledEventStatuses;
image?: string;
}, requestOptions?: RequestOptions | undefined) => Promise<types.ScheduledEvent>;

@@ -628,0 +623,0 @@ Delete: (guild_id: string, event_id: string, requestOptions?: RequestOptions | undefined) => Promise<null>;

1

dist/actions.js

@@ -19,3 +19,2 @@ import { URLSearchParams } from 'url';

GetWebhooks: (channel_id, requestOptions) => Request("GET", Path("channels", channel_id, "webhooks"), requestOptions),
ListActiveThreads: (channel_id, requestOptions) => Request("GET", Path("channels", channel_id, "threads", "active"), requestOptions),
ListPublicArchivedThreads: (channel_id, params, requestOptions) => Request("GET", Path("channels", channel_id, "threads", "archived", "public") + Query(params), requestOptions),

@@ -22,0 +21,0 @@ ListPrivateArchivedThreads: (channel_id, params, requestOptions) => Request("GET", Path("channels", channel_id, "threads", "archived", "private") + Query(params), requestOptions),

@@ -39,3 +39,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_WEBHOOKS: bigint;
readonly MANAGE_EMOJIS: bigint;
readonly MANAGE_EMOJIS_AND_STICKERS: bigint;
readonly USE_APPLICATION_COMMANDS: bigint;

@@ -173,3 +173,4 @@ readonly REQUEST_TO_SPEAK: bigint;

EPHEMERAL = 64,
LOADING = 128
LOADING = 128,
FAILED_TO_MENTION_SOME_ROLES_IN_THREAD = 256
}

@@ -274,3 +275,3 @@ export declare enum MessageStickerFormatTypes {

export declare enum UserFlags {
NONE = 0,
NO_FLAGS = 0,
STAFF = 1,

@@ -327,3 +328,4 @@ PARTNER = 2,

MENTIONABLE = 9,
NUMBER = 10
NUMBER = 10,
ATTACHMENT = 11
}

@@ -338,3 +340,4 @@ export declare enum ApplicationCommandPermissionTypes {

MESSAGE_COMPONENT = 3,
APPLICATION_COMMAND_AUTOCOMPLETE = 4
APPLICATION_COMMAND_AUTOCOMPLETE = 4,
MODAL_SUBMIT = 5
}

@@ -347,7 +350,5 @@ export declare enum InteractionCallbackTypes {

UPDATE_MESSAGE = 7,
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8
APPLICATION_COMMAND_AUTOCOMPLETE_RESULT = 8,
MODAL = 9
}
export declare enum InteractionCallbackDataFlags {
EPHEMERAL = 64
}
export declare enum OAuth2Scopes {

@@ -405,3 +406,4 @@ ACTIVITIES_READ = "activities.read",

BUTTON = 2,
SELECT_MENU = 3
SELECT_MENU = 3,
TEXT_INPUT = 4
}

@@ -416,3 +418,2 @@ export declare enum ButtonStyles {

export declare enum PrivacyLevels {
PUBLIC = 1,
GUILD_ONLY = 2

@@ -479,1 +480,5 @@ }

}
export declare enum TextInputStyles {
SHORT = 1,
PARAGRAPH = 2
}

@@ -40,3 +40,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_WEBHOOKS: 1n << 29n,
MANAGE_EMOJIS: 1n << 30n,
MANAGE_EMOJIS_AND_STICKERS: 1n << 30n,
USE_APPLICATION_COMMANDS: 1n << 31n,

@@ -180,2 +180,3 @@ REQUEST_TO_SPEAK: 1n << 32n,

MessageFlags[MessageFlags["LOADING"] = 128] = "LOADING";
MessageFlags[MessageFlags["FAILED_TO_MENTION_SOME_ROLES_IN_THREAD"] = 256] = "FAILED_TO_MENTION_SOME_ROLES_IN_THREAD";
})(MessageFlags || (MessageFlags = {}));

@@ -295,3 +296,3 @@ export var MessageStickerFormatTypes;

(function (UserFlags) {
UserFlags[UserFlags["NONE"] = 0] = "NONE";
UserFlags[UserFlags["NO_FLAGS"] = 0] = "NO_FLAGS";
UserFlags[UserFlags["STAFF"] = 1] = "STAFF";

@@ -354,2 +355,3 @@ UserFlags[UserFlags["PARTNER"] = 2] = "PARTNER";

ApplicationCommandOptionTypes[ApplicationCommandOptionTypes["NUMBER"] = 10] = "NUMBER";
ApplicationCommandOptionTypes[ApplicationCommandOptionTypes["ATTACHMENT"] = 11] = "ATTACHMENT";
})(ApplicationCommandOptionTypes || (ApplicationCommandOptionTypes = {}));

@@ -367,2 +369,3 @@ export var ApplicationCommandPermissionTypes;

InteractionTypes[InteractionTypes["APPLICATION_COMMAND_AUTOCOMPLETE"] = 4] = "APPLICATION_COMMAND_AUTOCOMPLETE";
InteractionTypes[InteractionTypes["MODAL_SUBMIT"] = 5] = "MODAL_SUBMIT";
})(InteractionTypes || (InteractionTypes = {}));

@@ -377,7 +380,4 @@ export var InteractionCallbackTypes;

InteractionCallbackTypes[InteractionCallbackTypes["APPLICATION_COMMAND_AUTOCOMPLETE_RESULT"] = 8] = "APPLICATION_COMMAND_AUTOCOMPLETE_RESULT";
InteractionCallbackTypes[InteractionCallbackTypes["MODAL"] = 9] = "MODAL";
})(InteractionCallbackTypes || (InteractionCallbackTypes = {}));
export var InteractionCallbackDataFlags;
(function (InteractionCallbackDataFlags) {
InteractionCallbackDataFlags[InteractionCallbackDataFlags["EPHEMERAL"] = 64] = "EPHEMERAL";
})(InteractionCallbackDataFlags || (InteractionCallbackDataFlags = {}));
export var OAuth2Scopes;

@@ -443,2 +443,3 @@ (function (OAuth2Scopes) {

ComponentTypes[ComponentTypes["SELECT_MENU"] = 3] = "SELECT_MENU";
ComponentTypes[ComponentTypes["TEXT_INPUT"] = 4] = "TEXT_INPUT";
})(ComponentTypes || (ComponentTypes = {}));

@@ -455,3 +456,2 @@ export var ButtonStyles;

(function (PrivacyLevels) {
PrivacyLevels[PrivacyLevels["PUBLIC"] = 1] = "PUBLIC";
PrivacyLevels[PrivacyLevels["GUILD_ONLY"] = 2] = "GUILD_ONLY";

@@ -528,1 +528,6 @@ })(PrivacyLevels || (PrivacyLevels = {}));

})(ScheduledEventStatuses || (ScheduledEventStatuses = {}));
export var TextInputStyles;
(function (TextInputStyles) {
TextInputStyles[TextInputStyles["SHORT"] = 1] = "SHORT";
TextInputStyles[TextInputStyles["PARAGRAPH"] = 2] = "PARAGRAPH";
})(TextInputStyles || (TextInputStyles = {}));

@@ -107,3 +107,7 @@ import * as helpers from './helpers.js';

}, size?: number | undefined, ext?: "png" | "jpg" | "webp" | undefined) => string | null;
GuildScheduledEventCover: (event: types.ScheduledEvent | {
id: string;
image: string | null;
}, size?: number | undefined, ext?: "png" | "jpg" | "webp" | undefined) => string | null;
};
export {};

@@ -83,2 +83,4 @@ import * as helpers from './helpers.js';

`${helpers.CDN}/role-icons/${role.id}/${role.icon}${SizeExtOpt(size, ext)}` : null,
GuildScheduledEventCover: (event, size, ext) => event.image ?
`${helpers.CDN}/guild-events/${event.id}/${event.image}${SizeExtOpt(size, ext)}` : null,
};

@@ -67,2 +67,3 @@ import type * as helpers from './helpers';

unicode_emoji: string;
type: string;
};

@@ -154,6 +155,13 @@ export declare type AuditLogChangeKeyChannel = {

entity_type: helpers.ScheduledEventEntityTypes;
id: string;
location: string;
privacy_level: helpers.ScheduledEventPrivacyLevels;
status: helpers.ScheduledEventStatuses;
type: string;
};
export declare type AuditLogChangeKeyThread = {
id: string;
invitable: boolean;
type: string;
};
export declare type Channel = {

@@ -220,3 +228,2 @@ id: string;

sticker_items?: StickerItem[];
stickers?: Sticker[];
};

@@ -254,2 +261,3 @@ export declare type MessageActivity = {

invitable?: boolean;
create_timestamp?: string | null;
};

@@ -417,6 +425,15 @@ export declare type ThreadMember = {

description: string | null;
stickers: Sticker[];
};
export declare type GuildWidgetSettings = {
id: string;
channel_id: string | null;
};
export declare type GuildWidget = {
enabled: boolean;
channel_id: string | null;
name: string;
instant_invite: string | null;
channels: Channel[];
members: User[];
presence_count: number;
};

@@ -651,2 +668,4 @@ export declare type Member = {

message?: Message;
locale?: string;
guild_locale?: string;
};

@@ -663,2 +682,3 @@ export declare type InteractionData = {

target_id?: string;
components?: Component[];
};

@@ -681,2 +701,5 @@ export declare type InteractionDataResolved = {

};
attachments?: {
[id: string]: Attachment;
};
};

@@ -695,2 +718,3 @@ export declare type InteractionDataOption = {

user: User;
member?: Member;
};

@@ -705,2 +729,5 @@ export declare type InteractionResponse = {

data: InteractionAutocompleteCallbackData;
} | {
type: helpers.InteractionCallbackTypes.MODAL;
data: InteractionModalCallbackData;
};

@@ -712,3 +739,3 @@ export declare type InteractionCallbackData = {

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

@@ -720,2 +747,7 @@ attachments?: Attachment[];

};
export declare type InteractionModalCallbackData = {
custom_id: string;
title: string;
components: Component[];
};
export declare type Presence = {

@@ -807,5 +839,6 @@ user: {

};
export declare type Component = (ActionRow | Button | SelectMenu | TextInput);
export declare type ActionRow = {
type: helpers.ComponentTypes.ACTION_ROW;
components: (Button | SelectMenu)[];
components: (Button | SelectMenu | TextInput)[];
};

@@ -837,2 +870,13 @@ export declare type Button = {

};
export declare type TextInput = {
type: helpers.ComponentTypes.TEXT_INPUT;
custom_id: string;
style: helpers.TextInputStyles;
label: string;
min_length?: number;
max_length?: number;
required?: boolean;
value?: string;
placeholder?: string;
};
export declare type StageInstance = {

@@ -844,3 +888,2 @@ id: string;

privacy_level: helpers.PrivacyLevels;
discoverable_disabled: boolean;
};

@@ -890,2 +933,3 @@ export declare type Sticker = {

user_count?: number;
image: string | null;
};

@@ -892,0 +936,0 @@ export declare type ScheduledEventEntityMetadata = {

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

@@ -26,4 +26,4 @@ "author": "Hanabishi",

"dependencies": {
"ws": "8.4.*"
"ws": "8.5.*"
}
}

@@ -52,3 +52,3 @@ # Discord Slim

// By design every action can use its own options.
// But for convinience you сan set default options globally for all actions.
// But for convinience you can set default options globally for all actions.
// Default options can be overridden by passing `requestOptions` argument.

@@ -167,3 +167,3 @@

// "EPHEMERAL" flag means that the response will be visible only by the caller.
flags: Helpers.InteractionCallbackDataFlags.EPHEMERAL,
flags: Helpers.MessageFlags.EPHEMERAL,

@@ -170,0 +170,0 @@ },

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