Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

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.1.7 to 2.1.8

8

dist/actions.d.ts

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

video_quality_mode?: helpers.VideoQualityModes;
default_auto_archive_duration?: number | null;
default_auto_archive_duration?: helpers.ThreadArchiveDuration | null;
}, requestOptions?: RequestOptions | undefined) => Promise<types.Channel>;

@@ -518,3 +518,3 @@ Delete: (channel_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.Channel>;

archived?: boolean;
auto_archive_duration?: types.ThreadArchiveDuration;
auto_archive_duration?: helpers.ThreadArchiveDuration;
locked?: boolean;

@@ -526,7 +526,7 @@ rate_limit_per_user?: number | null;

name: string;
auto_archive_duration: types.ThreadArchiveDuration;
auto_archive_duration: helpers.ThreadArchiveDuration;
}, requestOptions?: RequestOptions | undefined) => Promise<types.Channel>;
Start: (channel_id: string, params: {
name: string;
auto_archive_duration: types.ThreadArchiveDuration;
auto_archive_duration: helpers.ThreadArchiveDuration;
type?: helpers.ChannelTypes.GUILD_PRIVATE_THREAD | helpers.ChannelTypes.GUILD_PUBLIC_THREAD | helpers.ChannelTypes.GUILD_NEWS_THREAD;

@@ -533,0 +533,0 @@ }, requestOptions?: RequestOptions | undefined) => Promise<types.Channel>;

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.StageInstance = exports.Thread = exports.OAuth2 = exports.Application = exports.Webhook = exports.Voice = exports.User = exports.Template = exports.Invite = exports.WelcomeScreen = exports.Widget = exports.Role = exports.Ban = exports.Member = exports.Emoji = exports.Guild = exports.GroupDM = exports.Reaction = exports.Message = exports.Channel = exports.setDefaultRequestOptions = void 0;
const request_1 = require("./request");
const querystring_1 = __importDefault(require("querystring"));
const url_1 = require("url");
const QueryString = (params) => params ? '?' + String(new url_1.URLSearchParams(params)) : '';
let defaultRequestOptions;

@@ -27,5 +25,5 @@ const setDefaultRequestOptions = (requestOptions) => defaultRequestOptions = requestOptions;

ListActiveThreads: (channel_id, requestOptions) => request_1.Request("GET", "/channels/" + channel_id + "/threads" + "/active", requestOptions ?? defaultRequestOptions),
ListPublicArchivedThreads: (channel_id, params, requestOptions) => request_1.Request("GET", "/channels/" + channel_id + "/threads" + "/archived" + "/public?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
ListPrivateArchivedThreads: (channel_id, params, requestOptions) => request_1.Request("GET", "/channels/" + channel_id + "/threads" + "/archived" + "/private?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
ListJoinedPrivateArchivedThreads: (channel_id, params, requestOptions) => request_1.Request("GET", "/channels/" + channel_id + "/users" + "/@me" + "/threads" + "/archived" + "/private?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
ListPublicArchivedThreads: (channel_id, params, requestOptions) => request_1.Request("GET", "/channels/" + channel_id + "/threads" + "/archived" + "/public" + QueryString(params), requestOptions ?? defaultRequestOptions),
ListPrivateArchivedThreads: (channel_id, params, requestOptions) => request_1.Request("GET", "/channels/" + channel_id + "/threads" + "/archived" + "/private" + QueryString(params), requestOptions ?? defaultRequestOptions),
ListJoinedPrivateArchivedThreads: (channel_id, params, requestOptions) => request_1.Request("GET", "/channels/" + channel_id + "/users" + "/@me" + "/threads" + "/archived" + "/private" + QueryString(params), requestOptions ?? defaultRequestOptions),
};

@@ -40,3 +38,3 @@ exports.Message = {

Unpin: (channel_id, message_id, requestOptions) => request_1.Request("DELETE", "/channels/" + channel_id + "/pins/" + message_id, requestOptions ?? defaultRequestOptions),
GetReactions: (channel_id, message_id, emoji, params, requestOptions) => request_1.Request("GET", "/channels/" + channel_id + "/messages/" + message_id + "/reactions/" + encodeURIComponent(emoji) + '?' + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
GetReactions: (channel_id, message_id, emoji, params, requestOptions) => request_1.Request("GET", "/channels/" + channel_id + "/messages/" + message_id + "/reactions/" + encodeURIComponent(emoji) + QueryString(params), requestOptions ?? defaultRequestOptions),
DeleteAllReactions: (channel_id, message_id, requestOptions) => request_1.Request("DELETE", "/channels/" + channel_id + "/messages/" + message_id + "/reactions", requestOptions ?? defaultRequestOptions),

@@ -56,6 +54,6 @@ DeleteAllReactionsForEmoji: (channel_id, message_id, emoji, requestOptions) => request_1.Request("DELETE", "/channels/" + channel_id + "/messages/" + message_id + "/reactions/" + encodeURIComponent(emoji), requestOptions ?? defaultRequestOptions),

exports.Guild = {
GetAuditLog: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/audit-logs?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
GetAuditLog: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/audit-logs" + QueryString(params), requestOptions ?? defaultRequestOptions),
ListEmojis: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/emojis", requestOptions ?? defaultRequestOptions),
Create: (params, requestOptions) => request_1.Request("POST", "/guilds", requestOptions ?? defaultRequestOptions, params),
Get: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + '?' + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
Get: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + QueryString(params), requestOptions ?? defaultRequestOptions),
GetPreview: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/preview", requestOptions ?? defaultRequestOptions),

@@ -67,8 +65,8 @@ Modify: (guild_id, params, requestOptions) => request_1.Request("PATCH", "/guilds/" + guild_id, requestOptions ?? defaultRequestOptions, params),

ListActiveThreads: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/threads" + "/active", requestOptions ?? defaultRequestOptions),
ListMembers: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/members?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
SearchMembers: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/members" + "/search?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
ListMembers: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/members" + QueryString(params), requestOptions ?? defaultRequestOptions),
SearchMembers: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/members" + "/search" + QueryString(params), requestOptions ?? defaultRequestOptions),
GetBans: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/bans", requestOptions ?? defaultRequestOptions),
GetRoles: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/roles", requestOptions ?? defaultRequestOptions),
ModifyRolePositions: (guild_id, params, requestOptions) => request_1.Request("PATCH", "/guilds/" + guild_id + "/roles", requestOptions ?? defaultRequestOptions, params),
GetPruneCount: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/prune?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
GetPruneCount: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/prune" + QueryString(params), requestOptions ?? defaultRequestOptions),
Prune: (guild_id, params, requestOptions) => request_1.Request("POST", "/guilds/" + guild_id + "/prune", requestOptions ?? defaultRequestOptions, params),

@@ -113,3 +111,3 @@ GetVoiceRegions: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/regions", requestOptions ?? defaultRequestOptions),

Get: (guild_id, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/widget.json", requestOptions ?? defaultRequestOptions),
GetImage: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/widget.png?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
GetImage: (guild_id, params, requestOptions) => request_1.Request("GET", "/guilds/" + guild_id + "/widget.png" + QueryString(params), requestOptions ?? defaultRequestOptions),
};

@@ -122,3 +120,3 @@ exports.WelcomeScreen = {

Create: (channel_id, params, requestOptions) => request_1.Request("POST", "/channels/" + channel_id + "/invites", requestOptions ?? defaultRequestOptions, params),
Get: (invite_code, params, requestOptions) => request_1.Request("GET", "/invites/" + invite_code + '?' + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
Get: (invite_code, params, requestOptions) => request_1.Request("GET", "/invites/" + invite_code + QueryString(params), requestOptions ?? defaultRequestOptions),
Delete: (invite_code, requestOptions) => request_1.Request("DELETE", "/invites/" + invite_code, requestOptions ?? defaultRequestOptions),

@@ -137,3 +135,3 @@ };

ModifyCurrent: (params, requestOptions) => request_1.Request("PATCH", "/users/" + "/@me", requestOptions ?? defaultRequestOptions, params),
GetCurrentGuilds: (params, requestOptions) => request_1.Request("GET", "/users/" + "/@me/" + "/guilds?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
GetCurrentGuilds: (params, requestOptions) => request_1.Request("GET", "/users/" + "/@me/" + "/guilds" + QueryString(params), requestOptions ?? defaultRequestOptions),
LeaveGuild: (guild_id, requestOptions) => request_1.Request("DELETE", "/users" + "/@me" + "/guilds/" + guild_id, requestOptions ?? defaultRequestOptions),

@@ -156,5 +154,5 @@ CreateDM: (params, requestOptions) => request_1.Request("POST", "/users" + "/@me" + "/channels", requestOptions ?? defaultRequestOptions, params),

DeleteWithToken: (webhook_id, webhook_token, requestOptions) => request_1.Request("DELETE", "/webhooks/" + webhook_id + '/' + webhook_token, requestOptions ?? defaultRequestOptions),
Execute: (webhook_id, webhook_token, params1, params2, requestOptions) => request_1.Request("POST", "/webhooks/" + webhook_id + '/' + webhook_token + '?' + querystring_1.default.stringify(params2), requestOptions ?? defaultRequestOptions, params1),
ExecuteSlack: (webhook_id, webhook_token, params, requestOptions) => request_1.Request("POST", "/webhooks/" + webhook_id + '/' + webhook_token + "/slack?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
ExecuteGitHub: (webhook_id, webhook_token, params, requestOptions) => request_1.Request("POST", "/webhooks/" + webhook_id + '/' + webhook_token + "/github?" + querystring_1.default.stringify(params), requestOptions ?? defaultRequestOptions),
Execute: (webhook_id, webhook_token, params1, params2, requestOptions) => request_1.Request("POST", "/webhooks/" + webhook_id + '/' + webhook_token + QueryString(params2), requestOptions ?? defaultRequestOptions, params1),
ExecuteSlack: (webhook_id, webhook_token, params, requestOptions) => request_1.Request("POST", "/webhooks/" + webhook_id + '/' + webhook_token + "/slack" + QueryString(params), requestOptions ?? defaultRequestOptions),
ExecuteGitHub: (webhook_id, webhook_token, params, requestOptions) => request_1.Request("POST", "/webhooks/" + webhook_id + '/' + webhook_token + "/github" + QueryString(params), requestOptions ?? defaultRequestOptions),
GetMessage: (webhook_id, webhook_token, message_id, requestOptions) => request_1.Request("GET", "/webhooks/" + webhook_id + '/' + webhook_token + "/messages/" + message_id, requestOptions ?? defaultRequestOptions),

@@ -189,3 +187,3 @@ EditMessage: (webhook_id, webhook_token, message_id, params, requestOptions) => request_1.Request("PATCH", "/webhooks/" + webhook_id + '/' + webhook_token + "/messages/" + message_id, requestOptions ?? defaultRequestOptions, params),

exports.OAuth2 = {
TokenExchange: (params, requestOptions) => request_1.Request("POST", "/oauth2" + "/token", requestOptions ?? defaultRequestOptions, querystring_1.default.stringify(params)),
TokenExchange: (params, requestOptions) => request_1.Request("POST", "/oauth2" + "/token", requestOptions ?? defaultRequestOptions, QueryString(params)),
GetCurrentApplicationInformation: (requestOptions) => request_1.Request("GET", "/oauth2" + "/applications" + "/@me", requestOptions ?? defaultRequestOptions),

@@ -192,0 +190,0 @@ GetCurrentAuthorizationInformation: (requestOptions) => request_1.Request("GET", "/oauth2" + "/@me", requestOptions ?? defaultRequestOptions),

@@ -421,1 +421,7 @@ 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";

}
export declare enum ThreadArchiveDuration {
_1_HOUR = 60,
_24_HOURS = 1440,
_3_DAYS = 4320,
_1_WEEK = 10080
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TimestampStyles = exports.ApplicationFlags = exports.InviteTargetTypes = exports.GuildNSFWLevel = exports.PrivacyLevel = exports.ButtonStyles = exports.ComponentTypes = exports.VideoQualityModes = exports.SpeakingStates = exports.VoiceEncryptionModes = exports.MembershipStates = exports.OAuth2GrantTypes = exports.OAuth2Scopes = exports.InteractionResponseFlags = exports.InteractionResponseTypes = exports.InteractionTypes = exports.ApplicationCommandPermissionType = exports.ApplicationCommandOptionTypes = exports.ActivityFlags = exports.WebhookTypes = exports.VisibilityTypes = exports.PremiumTypes = exports.UserFlags = exports.WidgetStyleOptions = exports.StatusTypes = exports.ActivityTypes = exports.PremiumTier = exports.IntegrationExpireBehaviors = exports.GuildFeatures = exports.SystemChannelFlags = exports.VerificationLevel = exports.MFA_Level = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.AllowedMentionTypes = exports.PermissionsOverwriteTypes = exports.MessageStickerFormatTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.ChannelTypes = exports.AuditLogEvents = exports.Intents = exports.Permissions = exports.TokenTypes = exports.CDN = exports.API_PATH = exports.API_VERSION = exports.API = exports.HOST = void 0;
exports.ThreadArchiveDuration = void 0;
exports.HOST = 'https://discord.com', exports.API = `${exports.HOST}/api`, exports.API_VERSION = 9, exports.API_PATH = `${exports.API}/v${exports.API_VERSION}`, exports.CDN = 'https://cdn.discordapp.com';

@@ -468,2 +469,8 @@ var TokenTypes;

})(TimestampStyles = exports.TimestampStyles || (exports.TimestampStyles = {}));
;
var ThreadArchiveDuration;
(function (ThreadArchiveDuration) {
ThreadArchiveDuration[ThreadArchiveDuration["_1_HOUR"] = 60] = "_1_HOUR";
ThreadArchiveDuration[ThreadArchiveDuration["_24_HOURS"] = 1440] = "_24_HOURS";
ThreadArchiveDuration[ThreadArchiveDuration["_3_DAYS"] = 4320] = "_3_DAYS";
ThreadArchiveDuration[ThreadArchiveDuration["_1_WEEK"] = 10080] = "_1_WEEK";
})(ThreadArchiveDuration = exports.ThreadArchiveDuration || (exports.ThreadArchiveDuration = {}));

@@ -7,3 +7,3 @@ import { TokenTypes } from './helpers';

constructor(token: string, type?: TokenTypes);
_update: () => string;
private _update;
get type(): TokenTypes;

@@ -10,0 +10,0 @@ set type(value: TokenTypes);

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

member?: ThreadMember;
default_auto_archive_duration?: ThreadArchiveDuration;
default_auto_archive_duration?: helpers.ThreadArchiveDuration;
permissions?: string;

@@ -247,6 +247,5 @@ };

};
export declare type ThreadArchiveDuration = 60 | 1440 | 4320 | 10080;
export declare type ThreadMetadata = {
archived: boolean;
auto_archive_duration: ThreadArchiveDuration;
auto_archive_duration: helpers.ThreadArchiveDuration;
archive_timestamp: string;

@@ -253,0 +252,0 @@ locked?: boolean;

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

@@ -16,4 +16,3 @@ "author": "Hanabishi",

"library",
"framework",
"backend"
"framework"
],

@@ -33,5 +32,5 @@ "main": "./dist/index.js",

"devDependencies": {
"@types/node": "latest",
"@types/ws": "latest"
"@types/node": "*",
"@types/ws": "*"
}
}
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