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.1.3 to 2.1.4

3

dist/actions.d.ts

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

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

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

Get: (channel_id: string, requestOptions?: RequestOptions | undefined) => Promise<types.StageInstance>;
Update: (channel_id: string, params: {
Modify: (channel_id: string, params: {
topic?: string;

@@ -541,0 +542,0 @@ privacy_level?: helpers.PrivacyLevel;

@@ -197,4 +197,4 @@ "use strict";

Get: (channel_id, requestOptions) => request_1.Request("GET", "/stage-instances/" + channel_id, requestOptions ?? defaultRequestOptions),
Update: (channel_id, params, requestOptions) => request_1.Request("PATCH", "/stage-instances/" + channel_id, requestOptions ?? defaultRequestOptions, params),
Modify: (channel_id, params, requestOptions) => request_1.Request("PATCH", "/stage-instances/" + channel_id, requestOptions ?? defaultRequestOptions, params),
Delete: (channel_id, requestOptions) => request_1.Request("DELETE", "/stage-instances/" + channel_id, requestOptions ?? defaultRequestOptions),
};

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

code: string;
created_at: number;
created_at: string;
guild_id?: string;

@@ -167,0 +167,0 @@ inviter?: types.User;

@@ -398,1 +398,10 @@ 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 TimestampStyles {
SHORT_TIME = "t",
LONG_TIME = "T",
SHORT_DATE = "d",
LONG_DATE = "D",
SHORT_DATE_TIME = "f",
LONG_DATE_TIME = "F",
RELATIVE_TIME = "R"
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
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.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.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';

@@ -444,1 +444,12 @@ var TokenTypes;

})(ApplicationFlags = exports.ApplicationFlags || (exports.ApplicationFlags = {}));
var TimestampStyles;
(function (TimestampStyles) {
TimestampStyles["SHORT_TIME"] = "t";
TimestampStyles["LONG_TIME"] = "T";
TimestampStyles["SHORT_DATE"] = "d";
TimestampStyles["LONG_DATE"] = "D";
TimestampStyles["SHORT_DATE_TIME"] = "f";
TimestampStyles["LONG_DATE_TIME"] = "F";
TimestampStyles["RELATIVE_TIME"] = "R";
})(TimestampStyles = exports.TimestampStyles || (exports.TimestampStyles = {}));
;

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

import { Permissions as Flags } from './helpers';
import { Permissions as Flags, TimestampStyles } from './helpers';
import type { Guild, User, Application, Team, Emoji, Message, Channel, Role } from './types';

@@ -27,2 +27,3 @@ declare type Permission = typeof Flags[keyof typeof Flags];

Reaction: (emoji: Emoji) => string;
Timestamp: (timestamp: number | string | Date, style?: TimestampStyles | undefined) => string;
};

@@ -29,0 +30,0 @@ export declare const Link: {

@@ -27,2 +27,14 @@ "use strict";

Reaction: (emoji) => `${emoji.name}:${emoji.id}`,
Timestamp: (timestamp, style) => {
let value;
if (timestamp instanceof Date)
value = Math.trunc(timestamp.getTime() / 1000);
else if (typeof timestamp == 'string')
value = Math.trunc(new Date(timestamp).getTime() / 1000);
else
value = timestamp;
return style ?
`<t:${value}:${style}>` :
`<t:${value}>`;
},
};

@@ -29,0 +41,0 @@ exports.Link = {

@@ -177,8 +177,11 @@ import type * as helpers from './helpers';

id: string;
pack_id: string;
pack_id?: string;
name: string;
description: string;
tags?: string;
asset: string;
tags: string;
format_type: helpers.MessageStickerFormatTypes;
available?: boolean;
guild_id?: string;
user?: User;
sort_value?: number;
};

@@ -433,2 +436,3 @@ export declare type FollowedChannel = {

expires_at?: string | null;
stage_instance?: InviteStageInstance;
};

@@ -442,2 +446,8 @@ export declare type InviteMetadata = {

};
export declare type InviteStageInstance = {
members: Member[];
participant_count: number;
speaker_count: number;
topic: string;
};
export declare type Template = {

@@ -697,3 +707,3 @@ code: string;

cover_image?: string;
flags: helpers.ApplicationFlags;
flags?: helpers.ApplicationFlags;
};

@@ -700,0 +710,0 @@ export declare type Team = {

{
"name": "discord-slim",
"version": "2.1.3",
"version": "2.1.4",
"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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc