Socket
Socket
Sign inDemoInstall

discord-slim

Package Overview
Dependencies
4
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.0-dev.6 to 2.0.0-dev.7

dist/events.d.ts

15

dist/actions.d.ts

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

}>;
GetVoiceRegions: (guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.VoiceRegion[]>;
GetInvites: (guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<(types.Invite & types.InviteMetadata)[]>;

@@ -306,4 +305,14 @@ GetIntegrations: (guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.Integration[]>;

};
export declare const VoiceRegions: {
List: (requestOptions?: RequestOptions | undefined) => Promise<types.VoiceRegion[]>;
export declare const Voice: {
GetRegions: (guild_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.VoiceRegion[]>;
ListRegions: (requestOptions?: RequestOptions | undefined) => Promise<types.VoiceRegion[]>;
UpdateSelfState: (guild_id: string, params: {
channel_id: string;
suppress?: boolean;
request_to_speak_timestamp?: string | null;
}, requestOptions?: RequestOptions | undefined) => Promise<null>;
UpdateOthersState: (guild_id: string, user_id: string, params: {
channel_id: string;
suppress?: boolean;
}, requestOptions?: RequestOptions | undefined) => Promise<null>;
};

@@ -310,0 +319,0 @@ export declare const Webhook: {

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.Application = exports.Webhook = exports.VoiceRegions = exports.User = exports.Template = exports.Invite = exports.Widget = exports.Integration = exports.Role = exports.Ban = exports.Member = exports.Emoji = exports.Guild = exports.GroupDM = exports.PinnedMessage = exports.Reaction = exports.Message = exports.Channel = void 0;
exports.Application = exports.Webhook = exports.Voice = exports.User = exports.Template = exports.Invite = exports.Widget = exports.Integration = exports.Role = exports.Ban = exports.Member = exports.Emoji = exports.Guild = exports.GroupDM = exports.PinnedMessage = exports.Reaction = exports.Message = exports.Channel = void 0;
const request_1 = require("./request");

@@ -63,3 +63,2 @@ const querystring_1 = __importDefault(require("querystring"));

Prune: (guild_id, params, requestOptions) => request_1.Request("POST", "/guilds/" + guild_id + "/prune", requestOptions, params),
GetVoiceRegions: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/regions", requestOptions),
GetInvites: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/invites", requestOptions),

@@ -130,4 +129,7 @@ GetIntegrations: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/integrations", requestOptions),

};
exports.VoiceRegions = {
List: (requestOptions) => request_1.Request("GET", "/voice" + "/regions", requestOptions),
exports.Voice = {
GetRegions: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/regions", requestOptions),
ListRegions: (requestOptions) => request_1.Request("GET", "/voice" + "/regions", requestOptions),
UpdateSelfState: (guild_id, params, requestOptions) => request_1.Request("PATCH", "/guilds/" + guild_id + "/voice-states" + "/@me", requestOptions, params),
UpdateOthersState: (guild_id, user_id, params, requestOptions) => request_1.Request("PATCH", "/guilds/" + guild_id + "/voice-states/" + user_id, requestOptions, params),
};

@@ -134,0 +136,0 @@ exports.Webhook = {

10

dist/client.d.ts

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

import { Authorization } from './request';
import { EventHandler, GenericEvents } from './eventhandler';
import { EventHandler, EventTypes } from './events';
import type { User, Activity } from './types';

@@ -18,2 +18,3 @@ export declare class Client extends EventEmitter {

private _user?;
private _shard?;
constructor();

@@ -29,3 +30,6 @@ private _wsConnect;

private _onError;
Connect: (authorization: Authorization, intents?: helpers.Intents | undefined) => void;
Connect: (authorization: Authorization, intents?: helpers.Intents | undefined, shard?: {
id: number;
total: number;
} | undefined) => void;
Disconnect: (code?: number | undefined) => void;

@@ -54,3 +58,3 @@ RequestGuildMembers: (params: {

}) => void;
get events(): EventHandler<GenericEvents>;
get events(): EventHandler<EventTypes>;
get user(): User | undefined;

@@ -57,0 +61,0 @@ }

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

const request_1 = require("./request");
const eventhandler_1 = require("./eventhandler");
const events_2 = require("./events");
class Client extends events_1.EventEmitter {

@@ -38,3 +38,3 @@ constructor() {

this._lastHeartbeatAck = false;
this._eventHandler = new eventhandler_1.EventHandler();
this._eventHandler = new events_2.EventHandler();
this._wsConnect = async (resume) => {

@@ -123,2 +123,3 @@ this._wsDisconnect();

intents: (_c = this._intents) !== null && _c !== void 0 ? _c : helpers.Intents.SYSTEM_ONLY,
shard: this._shard,
});

@@ -154,5 +155,6 @@ };

this._onError = (error) => this.emit('error', error);
this.Connect = (authorization, intents) => {
this.Connect = (authorization, intents, shard) => {
this._auth = { authorization };
this._intents = intents;
this._shard = shard ? [shard.id, shard.total] : undefined;
this._wsConnect(true);

@@ -159,0 +161,0 @@ };

@@ -51,3 +51,4 @@ export declare const HOST: "https://discord.com", API: "https://discord.com/api", API_VERSION = 8, API_PATH: "https://discord.com/api/v8", CDN = "https://cdn.discordapp.com";

MANAGE_WEBHOOKS = 536870912,
MANAGE_EMOJIS = 1073741824
MANAGE_EMOJIS = 1073741824,
REQUEST_TO_SPEAK = 4294967296
}

@@ -116,3 +117,4 @@ export declare enum Intents {

GUILD_NEWS = 5,
GUILD_STORE = 6
GUILD_STORE = 6,
GUILD_STAGE_VOICE = 13
}

@@ -286,4 +288,2 @@ export declare enum MessageTypes {

PONG = 1,
ACKNOWLEDGE = 2,
CHANNEL_MESSAGE = 3,
CHANNEL_MESSAGE_WITH_SOURCE = 4,

@@ -290,0 +290,0 @@ DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE = 5

@@ -58,2 +58,3 @@ "use strict";

Permissions[Permissions["MANAGE_EMOJIS"] = 1073741824] = "MANAGE_EMOJIS";
Permissions[Permissions["REQUEST_TO_SPEAK"] = 4294967296] = "REQUEST_TO_SPEAK";
})(Permissions = exports.Permissions || (exports.Permissions = {}));

@@ -126,2 +127,3 @@ var Intents;

ChannelTypes[ChannelTypes["GUILD_STORE"] = 6] = "GUILD_STORE";
ChannelTypes[ChannelTypes["GUILD_STAGE_VOICE"] = 13] = "GUILD_STAGE_VOICE";
})(ChannelTypes = exports.ChannelTypes || (exports.ChannelTypes = {}));

@@ -320,4 +322,2 @@ var MessageTypes;

InteractionResponseTypes[InteractionResponseTypes["PONG"] = 1] = "PONG";
InteractionResponseTypes[InteractionResponseTypes["ACKNOWLEDGE"] = 2] = "ACKNOWLEDGE";
InteractionResponseTypes[InteractionResponseTypes["CHANNEL_MESSAGE"] = 3] = "CHANNEL_MESSAGE";
InteractionResponseTypes[InteractionResponseTypes["CHANNEL_MESSAGE_WITH_SOURCE"] = 4] = "CHANNEL_MESSAGE_WITH_SOURCE";

@@ -324,0 +324,0 @@ InteractionResponseTypes[InteractionResponseTypes["DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE"] = 5] = "DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE";

export { Client } from './client';
export { Authorization } from './request';
export { Events } from './eventhandler';
export { Events } from './events';
export * as Actions from './actions';

@@ -5,0 +5,0 @@ export * as Helpers from './helpers';

@@ -27,5 +27,5 @@ "use strict";

Object.defineProperty(exports, "Authorization", { enumerable: true, get: function () { return request_1.Authorization; } });
var eventhandler_1 = require("./eventhandler");
Object.defineProperty(exports, "Events", { enumerable: true, get: function () { return eventhandler_1.Events; } });
var events_1 = require("./events");
Object.defineProperty(exports, "Events", { enumerable: true, get: function () { return events_1.Events; } });
exports.Actions = __importStar(require("./actions"));
exports.Helpers = __importStar(require("./helpers"));

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

suppress: boolean;
request_to_speak_timestamp: string | null;
};

@@ -517,2 +518,3 @@ export declare type VoiceRegion = {

id: string;
application_id: string;
type: helpers.InteractionTypes;

@@ -519,0 +521,0 @@ data?: ApplicationCommandInteractionData;

{
"name": "discord-slim",
"version": "2.0.0-dev.6",
"description": "Lightweight Discord client for Node.js.",
"version": "2.0.0-dev.7",
"description": "Lightweight Discord bot API for Node.js.",
"author": "Hanabishi",
"repository": {
"type": "git",
"url": "https://github.com/HanabishiRecca/Discord-Slim"
"url": "https://github.com/HanabishiRecca/Discord-Slim/dev"
},
"discord": "https://discord.gg/drsXkP8R4h",
"homepage": "https://discord.gg/drsXkP8R4h",
"keywords": [
"discord",
"bot",
"api",
"client",
"library"
],
"main": "./dist/index.js",

@@ -27,2 +34,2 @@ "types": "./dist/index.d.ts",

}
}
}

@@ -12,2 +12,3 @@ # Discord Slim

- Uses new Discord API version (v8) with slash commands support
- Sharding support

@@ -14,0 +15,0 @@ ### Support & suggestions server

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc