disgroove 2.2.2-dev.db6cb16 → 2.2.3-dev.10e8e97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -9
- package/dist/lib/Client.d.ts +119 -129
- package/dist/lib/Client.js +363 -270
- package/dist/lib/constants.d.ts +85 -74
- package/dist/lib/constants.js +88 -75
- package/dist/lib/gateway/Shard.d.ts +1 -0
- package/dist/lib/gateway/Shard.js +194 -170
- package/dist/lib/gateway/index.d.ts +0 -1
- package/dist/lib/gateway/index.js +0 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.js +1 -0
- package/dist/lib/rest/Endpoints.d.ts +6 -6
- package/dist/lib/rest/Endpoints.js +13 -13
- package/dist/lib/rest/RequestManager.d.ts +1 -1
- package/dist/lib/rest/RequestManager.js +1 -1
- package/dist/lib/rest/index.d.ts +0 -1
- package/dist/lib/rest/index.js +1 -2
- package/dist/lib/transformers/ApplicationCommands.d.ts +7 -0
- package/dist/lib/transformers/ApplicationCommands.js +90 -0
- package/dist/lib/transformers/ApplicationRoleConnectionMetadatas.d.ts +5 -0
- package/dist/lib/transformers/ApplicationRoleConnectionMetadatas.js +26 -0
- package/dist/lib/transformers/Applications.d.ts +5 -0
- package/dist/lib/transformers/Applications.js +97 -0
- package/dist/lib/transformers/AuditLogs.d.ts +7 -0
- package/dist/lib/transformers/AuditLogs.js +97 -0
- package/dist/lib/transformers/AutoModeration.d.ts +9 -0
- package/dist/lib/transformers/AutoModeration.js +76 -0
- package/dist/lib/transformers/Channels.d.ts +16 -0
- package/dist/lib/transformers/Channels.js +676 -0
- package/dist/lib/transformers/Emojis.d.ts +5 -0
- package/dist/lib/transformers/Emojis.js +31 -0
- package/dist/lib/transformers/Entitlements.d.ts +7 -0
- package/dist/lib/transformers/Entitlements.js +58 -0
- package/dist/lib/transformers/GuildScheduledEvents.d.ts +5 -0
- package/dist/lib/transformers/GuildScheduledEvents.js +51 -0
- package/dist/lib/transformers/GuildTemplates.d.ts +5 -0
- package/dist/lib/transformers/GuildTemplates.js +38 -0
- package/dist/lib/transformers/Guilds.d.ts +12 -0
- package/dist/lib/transformers/Guilds.js +264 -0
- package/dist/lib/transformers/Interactions.d.ts +10 -0
- package/dist/lib/transformers/Interactions.js +273 -0
- package/dist/lib/transformers/Invites.d.ts +5 -0
- package/dist/lib/transformers/Invites.js +79 -0
- package/dist/lib/transformers/Polls.d.ts +5 -0
- package/dist/lib/transformers/Polls.js +50 -0
- package/dist/lib/transformers/Presences.d.ts +5 -0
- package/dist/lib/transformers/Presences.js +116 -0
- package/dist/lib/transformers/Roles.d.ts +5 -0
- package/dist/lib/transformers/Roles.js +56 -0
- package/dist/lib/transformers/SKUs.d.ts +5 -0
- package/dist/lib/transformers/SKUs.js +26 -0
- package/dist/lib/transformers/StageInstances.d.ts +5 -0
- package/dist/lib/transformers/StageInstances.js +28 -0
- package/dist/lib/transformers/Stickers.d.ts +5 -0
- package/dist/lib/transformers/Stickers.js +41 -0
- package/dist/lib/transformers/Teams.d.ts +5 -0
- package/dist/lib/transformers/Teams.js +35 -0
- package/dist/lib/transformers/Users.d.ts +5 -0
- package/dist/lib/transformers/Users.js +62 -0
- package/dist/lib/transformers/Voice.d.ts +5 -0
- package/dist/lib/transformers/Voice.js +45 -0
- package/dist/lib/transformers/Webhooks.d.ts +5 -0
- package/dist/lib/transformers/Webhooks.js +51 -0
- package/dist/lib/transformers/index.d.ts +23 -0
- package/dist/lib/transformers/index.js +39 -0
- package/dist/lib/types/entitlements.d.ts +0 -6
- package/dist/lib/types/gateway-events.d.ts +25 -12
- package/dist/lib/types/guild.d.ts +3 -1
- package/dist/lib/types/interaction.d.ts +2 -2
- package/dist/lib/types/sku.d.ts +0 -12
- package/dist/lib/types/user.d.ts +2 -2
- package/dist/lib/utils/CDN.d.ts +24 -0
- package/dist/lib/utils/CDN.js +49 -0
- package/dist/lib/utils/errors.d.ts +3 -3
- package/dist/lib/utils/errors.js +10 -12
- package/dist/lib/utils/formatters.d.ts +16 -0
- package/dist/lib/utils/formatters.js +44 -0
- package/dist/lib/utils/index.d.ts +2 -1
- package/dist/lib/utils/index.js +15 -1
- package/dist/package.json +3 -3
- package/package.json +3 -3
- package/dist/lib/gateway/ShardManager.d.ts +0 -10
- package/dist/lib/gateway/ShardManager.js +0 -18
- package/dist/lib/rest/CDN.d.ts +0 -22
- package/dist/lib/rest/CDN.js +0 -45
- package/dist/lib/types/voice-connections.d.ts +0 -64
- package/dist/lib/types/voice-connections.js +0 -2
- package/dist/lib/utils/Util.d.ts +0 -94
- package/dist/lib/utils/Util.js +0 -2228
- package/dist/lib/voice/VoiceConnection.d.ts +0 -57
- package/dist/lib/voice/VoiceConnection.js +0 -150
- package/dist/lib/voice/VoiceConnectionManager.d.ts +0 -19
- package/dist/lib/voice/VoiceConnectionManager.js +0 -66
- package/dist/lib/voice/index.d.ts +0 -2
- package/dist/lib/voice/index.js +0 -18
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* https://discord.com/developers/docs/reference#image-formatting */
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.userBanner = exports.userAvatarDecoration = exports.userAvatar = exports.teamIcon = exports.storePageAsset = exports.sticker = exports.stickerPackBanner = exports.roleIcon = exports.guildSplash = exports.guildScheduledEventCover = exports.guildMemberBanner = exports.guildMemberAvatar = exports.guildIcon = exports.guildDiscoverySplash = exports.guildBanner = exports.defaultUserAvatar = exports.customEmoji = exports.applicationIcon = exports.applicationCover = exports.applicationAsset = exports.achievementIcon = exports.cdnURL = void 0;
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
const cdnURL = (cdnEndpoint, imageFormat = constants_1.ImageFormats.PNG) => `https://cdn.discordapp.com/${cdnEndpoint}.${imageFormat}`;
|
|
7
|
+
exports.cdnURL = cdnURL;
|
|
8
|
+
const achievementIcon = (applicationID, achievementID, iconHash, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`app-assets/${applicationID}/achievements/${achievementID}/icons/${iconHash}`, imageFormat);
|
|
9
|
+
exports.achievementIcon = achievementIcon;
|
|
10
|
+
const applicationAsset = (applicationID, assetID, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`app-assets/${applicationID}/${assetID}`, imageFormat);
|
|
11
|
+
exports.applicationAsset = applicationAsset;
|
|
12
|
+
const applicationCover = (applicationID, coverImage, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`app-icons/${applicationID}/${coverImage}`, imageFormat);
|
|
13
|
+
exports.applicationCover = applicationCover;
|
|
14
|
+
const applicationIcon = (applicationID, icon, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`app-icons/${applicationID}/${icon}`, imageFormat);
|
|
15
|
+
exports.applicationIcon = applicationIcon;
|
|
16
|
+
const customEmoji = (emojiID, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`emojis/${emojiID}`, imageFormat);
|
|
17
|
+
exports.customEmoji = customEmoji;
|
|
18
|
+
const defaultUserAvatar = (index) => (0, exports.cdnURL)(`embed/avatars/${index}`);
|
|
19
|
+
exports.defaultUserAvatar = defaultUserAvatar;
|
|
20
|
+
const guildBanner = (guildID, banner, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`banners/${guildID}/${banner}`, imageFormat);
|
|
21
|
+
exports.guildBanner = guildBanner;
|
|
22
|
+
const guildDiscoverySplash = (guildID, splash, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`discovery-splashes/${guildID}/${splash}`, imageFormat);
|
|
23
|
+
exports.guildDiscoverySplash = guildDiscoverySplash;
|
|
24
|
+
const guildIcon = (guildID, icon, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`icons/${guildID}/${icon}`, imageFormat);
|
|
25
|
+
exports.guildIcon = guildIcon;
|
|
26
|
+
const guildMemberAvatar = (guildID, userID, avatar, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`guilds/${guildID}/users/${userID}/avatars/${avatar}`, imageFormat);
|
|
27
|
+
exports.guildMemberAvatar = guildMemberAvatar;
|
|
28
|
+
const guildMemberBanner = (guildID, userID, banner, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`guilds/${guildID}/users/${userID}/banners/${banner}`, imageFormat);
|
|
29
|
+
exports.guildMemberBanner = guildMemberBanner;
|
|
30
|
+
const guildScheduledEventCover = (scheduledEventID, coverImage, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`guild-events/${scheduledEventID}/${coverImage}`, imageFormat);
|
|
31
|
+
exports.guildScheduledEventCover = guildScheduledEventCover;
|
|
32
|
+
const guildSplash = (guildID, splash, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`splashes/${guildID}/${splash}`, imageFormat);
|
|
33
|
+
exports.guildSplash = guildSplash;
|
|
34
|
+
const roleIcon = (roleID, icon, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`role-icons/${roleID}/${icon}`, imageFormat);
|
|
35
|
+
exports.roleIcon = roleIcon;
|
|
36
|
+
const stickerPackBanner = (assetID, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`app-assets/710982414301790216/store/${assetID}`, imageFormat);
|
|
37
|
+
exports.stickerPackBanner = stickerPackBanner;
|
|
38
|
+
const sticker = (stickerID, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`stickers/${stickerID}`, imageFormat);
|
|
39
|
+
exports.sticker = sticker;
|
|
40
|
+
const storePageAsset = (applicationID, assetID, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`app-assets/${applicationID}/store/${assetID}`, imageFormat);
|
|
41
|
+
exports.storePageAsset = storePageAsset;
|
|
42
|
+
const teamIcon = (teamID, icon, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`team-icons/${teamID}/${icon}`, imageFormat);
|
|
43
|
+
exports.teamIcon = teamIcon;
|
|
44
|
+
const userAvatar = (userID, avatar, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`avatars/${userID}/${avatar}`, imageFormat);
|
|
45
|
+
exports.userAvatar = userAvatar;
|
|
46
|
+
const userAvatarDecoration = (userID, avatarDecoration) => (0, exports.cdnURL)(`avatar-decorations/${userID}/${avatarDecoration}`);
|
|
47
|
+
exports.userAvatarDecoration = userAvatarDecoration;
|
|
48
|
+
const userBanner = (userID, banner, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`banners/${userID}/${banner}`, imageFormat);
|
|
49
|
+
exports.userBanner = userBanner;
|
|
@@ -4,15 +4,15 @@ export declare class RESTError extends Error {
|
|
|
4
4
|
method: string;
|
|
5
5
|
endpoint: string;
|
|
6
6
|
constructor(code: JSONErrorCodes, message: string, errors: Record<string, unknown>, method: string, endpoint: string);
|
|
7
|
-
flattenErrors(errors: Record<string, unknown> | undefined, prefix?: string): string;
|
|
7
|
+
static flattenErrors(errors: Record<string, unknown> | undefined, prefix?: string): string;
|
|
8
8
|
}
|
|
9
9
|
export declare class HTTPError extends Error {
|
|
10
10
|
name: string;
|
|
11
11
|
method: string;
|
|
12
12
|
endpoint: string;
|
|
13
|
-
constructor(status: number, statusText: string, method: string, endpoint: string);
|
|
13
|
+
constructor(status: number, statusText: string, errors: Record<string, unknown>, method: string, endpoint: string);
|
|
14
14
|
}
|
|
15
15
|
export declare class GatewayError extends Error {
|
|
16
16
|
name: string;
|
|
17
|
-
constructor(
|
|
17
|
+
constructor(code: number, reason: string);
|
|
18
18
|
}
|
package/dist/lib/utils/errors.js
CHANGED
|
@@ -6,13 +6,12 @@ class RESTError extends Error {
|
|
|
6
6
|
method;
|
|
7
7
|
endpoint;
|
|
8
8
|
constructor(code, message, errors, method, endpoint) {
|
|
9
|
-
super();
|
|
9
|
+
super(`[${code}] ${message}\n${RESTError.flattenErrors(errors)}`);
|
|
10
10
|
this.method = method;
|
|
11
11
|
this.endpoint = endpoint;
|
|
12
|
-
this.message = `[${code}] ${message}\n${this.flattenErrors(errors)}`;
|
|
13
12
|
}
|
|
14
|
-
flattenErrors(errors, prefix = "") {
|
|
15
|
-
let
|
|
13
|
+
static flattenErrors(errors, prefix = "") {
|
|
14
|
+
let message = "";
|
|
16
15
|
if (errors) {
|
|
17
16
|
for (const [key, value] of Object.entries(errors)) {
|
|
18
17
|
if (errors.hasOwnProperty(key)) {
|
|
@@ -21,17 +20,17 @@ class RESTError extends Error {
|
|
|
21
20
|
if (typeof error === "object" &&
|
|
22
21
|
error !== null &&
|
|
23
22
|
"message" in error) {
|
|
24
|
-
|
|
23
|
+
message += `${prefix ? `${prefix}: [${error.code}]` : `[${error.code}]`} ${error.message}\n`;
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
}
|
|
28
27
|
else if (typeof value === "object" && value !== null) {
|
|
29
|
-
|
|
28
|
+
message += this.flattenErrors(value, prefix ? `${prefix}.${key}` : key);
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
|
-
return
|
|
33
|
+
return message;
|
|
35
34
|
}
|
|
36
35
|
}
|
|
37
36
|
exports.RESTError = RESTError;
|
|
@@ -39,18 +38,17 @@ class HTTPError extends Error {
|
|
|
39
38
|
name = "HTTPError";
|
|
40
39
|
method;
|
|
41
40
|
endpoint;
|
|
42
|
-
constructor(status, statusText, method, endpoint) {
|
|
43
|
-
super();
|
|
41
|
+
constructor(status, statusText, errors, method, endpoint) {
|
|
42
|
+
super(`[${status}] ${statusText}\n${RESTError.flattenErrors(errors)}`);
|
|
44
43
|
this.method = method;
|
|
45
44
|
this.endpoint = endpoint;
|
|
46
|
-
this.message = `[${status}] ${statusText}`;
|
|
47
45
|
}
|
|
48
46
|
}
|
|
49
47
|
exports.HTTPError = HTTPError;
|
|
50
48
|
class GatewayError extends Error {
|
|
51
49
|
name = "GatewayError";
|
|
52
|
-
constructor(
|
|
53
|
-
super(
|
|
50
|
+
constructor(code, reason) {
|
|
51
|
+
super(`[${code}] ${reason}`);
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
54
|
exports.GatewayError = GatewayError;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GuildNavigationTypes, TimestampStyles } from "../constants";
|
|
2
|
+
import type { snowflake } from "../types/common";
|
|
3
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
4
|
+
export declare function userMention(userID: snowflake): string;
|
|
5
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
6
|
+
export declare function channelMention(channelID: snowflake): string;
|
|
7
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
8
|
+
export declare function roleMention(roleID: snowflake): string;
|
|
9
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
10
|
+
export declare function slashCommandMention(commandName: string, commandID: snowflake, subCommandName?: string, subCommandGroupName?: string): string;
|
|
11
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
12
|
+
export declare function customEmoji(emojiName: string, emojiID: snowflake, animated?: boolean): string;
|
|
13
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
14
|
+
export declare function unixTimestamp(time: number, style?: TimestampStyles): string;
|
|
15
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
16
|
+
export declare function guildNavigation(guildID: snowflake, type: GuildNavigationTypes): string;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.guildNavigation = exports.unixTimestamp = exports.customEmoji = exports.slashCommandMention = exports.roleMention = exports.channelMention = exports.userMention = void 0;
|
|
4
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
5
|
+
function userMention(userID) {
|
|
6
|
+
return `<@${userID}>`;
|
|
7
|
+
}
|
|
8
|
+
exports.userMention = userMention;
|
|
9
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
10
|
+
function channelMention(channelID) {
|
|
11
|
+
return `<#${channelID}>`;
|
|
12
|
+
}
|
|
13
|
+
exports.channelMention = channelMention;
|
|
14
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
15
|
+
function roleMention(roleID) {
|
|
16
|
+
return `<@&${roleID}>`;
|
|
17
|
+
}
|
|
18
|
+
exports.roleMention = roleMention;
|
|
19
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
20
|
+
function slashCommandMention(commandName, commandID, subCommandName, subCommandGroupName) {
|
|
21
|
+
return subCommandName
|
|
22
|
+
? subCommandGroupName
|
|
23
|
+
? `</${commandName} ${subCommandGroupName} ${subCommandName}:${commandID}>`
|
|
24
|
+
: `</${commandName} ${subCommandName}:${commandID}>`
|
|
25
|
+
: `</${commandName}:${commandID}>`;
|
|
26
|
+
}
|
|
27
|
+
exports.slashCommandMention = slashCommandMention;
|
|
28
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
29
|
+
function customEmoji(emojiName, emojiID, animated) {
|
|
30
|
+
return animated
|
|
31
|
+
? `<a:${emojiName}:${emojiID}>`
|
|
32
|
+
: `<:${emojiName}:${emojiID}>`;
|
|
33
|
+
}
|
|
34
|
+
exports.customEmoji = customEmoji;
|
|
35
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
36
|
+
function unixTimestamp(time, style) {
|
|
37
|
+
return style ? `<t:${time}:${style}>` : `<t:${time}>`;
|
|
38
|
+
}
|
|
39
|
+
exports.unixTimestamp = unixTimestamp;
|
|
40
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
41
|
+
function guildNavigation(guildID, type) {
|
|
42
|
+
return `<${guildID}:${type}>`;
|
|
43
|
+
}
|
|
44
|
+
exports.guildNavigation = guildNavigation;
|
package/dist/lib/utils/index.js
CHANGED
|
@@ -10,9 +10,23 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
|
|
|
10
10
|
if (k2 === undefined) k2 = k;
|
|
11
11
|
o[k2] = m[k];
|
|
12
12
|
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
13
25
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
26
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
27
|
};
|
|
16
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.CDN = void 0;
|
|
30
|
+
exports.CDN = __importStar(require("./CDN"));
|
|
17
31
|
__exportStar(require("./errors"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
32
|
+
__exportStar(require("./formatters"), exports);
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3-dev.10e8e97",
|
|
4
4
|
"description": "A module to interface with Discord",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/XenKys/disgroove#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^20.14.
|
|
28
|
+
"@types/node": "^20.14.10",
|
|
29
29
|
"@types/ws": "^8.5.10",
|
|
30
30
|
"typescript": "^5.5.3"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"ws": "^8.
|
|
33
|
+
"ws": "^8.18.0"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.3-dev.10e8e97",
|
|
4
4
|
"description": "A module to interface with Discord",
|
|
5
5
|
"main": "./dist/lib/index.js",
|
|
6
6
|
"types": "./dist/lib/index.d.ts",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/XenKys/disgroove#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^20.14.
|
|
28
|
+
"@types/node": "^20.14.10",
|
|
29
29
|
"@types/ws": "^8.5.10",
|
|
30
30
|
"typescript": "^5.5.3"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"ws": "^8.
|
|
33
|
+
"ws": "^8.18.0"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Shard } from ".";
|
|
2
|
-
import type { GatewayPresenceUpdate } from "../types/gateway-events";
|
|
3
|
-
export declare class ShardManager extends Map<number, Shard> {
|
|
4
|
-
/** https://discord.com/developers/docs/topics/gateway#connections */
|
|
5
|
-
connect(): void;
|
|
6
|
-
/** https://discord.com/developers/docs/topics/gateway#connections */
|
|
7
|
-
disconnect(): void;
|
|
8
|
-
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
9
|
-
updatePresence(options: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>): void;
|
|
10
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ShardManager = void 0;
|
|
4
|
-
class ShardManager extends Map {
|
|
5
|
-
/** https://discord.com/developers/docs/topics/gateway#connections */
|
|
6
|
-
connect() {
|
|
7
|
-
this.forEach((shard) => shard.connect());
|
|
8
|
-
}
|
|
9
|
-
/** https://discord.com/developers/docs/topics/gateway#connections */
|
|
10
|
-
disconnect() {
|
|
11
|
-
this.forEach((shard) => shard.disconnect());
|
|
12
|
-
}
|
|
13
|
-
/** https://discord.com/developers/docs/topics/gateway-events#update-presence */
|
|
14
|
-
updatePresence(options) {
|
|
15
|
-
this.forEach((shard) => shard.updatePresence(options));
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.ShardManager = ShardManager;
|
package/dist/lib/rest/CDN.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { snowflake } from "../types/common";
|
|
2
|
-
export declare const achievementIcon: (applicationID: snowflake, achievementID: snowflake, iconHash: string) => `https://cdn.discordapp.com/app-assets/${string}/achievements/${string}/icons/${string}.png`;
|
|
3
|
-
export declare const applicationAsset: (applicationID: snowflake, assetID: snowflake) => `https://cdn.discordapp.com/app-assets/${string}/${string}.png`;
|
|
4
|
-
export declare const applicationCover: (applicationID: snowflake, coverImage: string) => `https://cdn.discordapp.com/app-icons/${string}/${string}.png`;
|
|
5
|
-
export declare const applicationIcon: (applicationID: snowflake, icon: string) => `https://cdn.discordapp.com/app-icons/${string}/${string}.png`;
|
|
6
|
-
export declare const customEmoji: (emojiID: snowflake) => `https://cdn.discordapp.com/emojis/${string}.png`;
|
|
7
|
-
export declare const defaultUserAvatar: (index: string) => `https://cdn.discordapp.com/embed/avatars/${string}.png`;
|
|
8
|
-
export declare const guildBanner: (guildID: snowflake, banner: string) => `https://cdn.discordapp.com/banners/${string}/${string}.png`;
|
|
9
|
-
export declare const guildDiscoverySplash: (guildID: snowflake, splash: string) => `https://cdn.discordapp.com/discovery-splashes/${string}/${string}.png`;
|
|
10
|
-
export declare const guildIcon: (guildID: snowflake, icon: string) => `https://cdn.discordapp.com/icons/${string}/${string}.png`;
|
|
11
|
-
export declare const guildMemberAvatar: (guildID: snowflake, userID: snowflake, avatar: string) => `https://cdn.discordapp.com/guilds/${string}/users/${string}/avatars/${string}.png`;
|
|
12
|
-
export declare const guildMemberBanner: (guildID: snowflake, userID: snowflake, banner: string) => `https://cdn.discordapp.com/guilds/${string}/users/${string}/banners/${string}.png`;
|
|
13
|
-
export declare const guildScheduledEventCover: (scheduledEventID: snowflake, coverImage: string) => `https://cdn.discordapp.com/guild-events/${string}/${string}.png`;
|
|
14
|
-
export declare const guildSplash: (guildID: snowflake, splash: string) => `https://cdn.discordapp.com/splashes/${string}/${string}.png`;
|
|
15
|
-
export declare const roleIcon: (roleID: snowflake, icon: string) => `https://cdn.discordapp.com/role-icons/${string}/${string}.png`;
|
|
16
|
-
export declare const stickerPackBanner: (assetID: snowflake) => `https://cdn.discordapp.com/app-assets/710982414301790216/store/${string}.png`;
|
|
17
|
-
export declare const sticker: (stickerID: snowflake) => `https://cdn.discordapp.com/stickers/${string}.png`;
|
|
18
|
-
export declare const storePageAsset: (applicationID: snowflake, assetID: snowflake) => `https://cdn.discordapp.com/app-assets/${string}/store/${string}`;
|
|
19
|
-
export declare const teamIcon: (teamID: snowflake, icon: string) => `https://cdn.discordapp.com/team-icons/${string}/${string}.png`;
|
|
20
|
-
export declare const userAvatar: (userID: snowflake, avatar: string) => `https://cdn.discordapp.com/avatars/${string}/${string}.png`;
|
|
21
|
-
export declare const userAvatarDecoration: (userID: snowflake, avatarDecoration: string) => `https://cdn.discordapp.com/avatar-decorations/${string}/${string}.png`;
|
|
22
|
-
export declare const userBanner: (userID: snowflake, banner: string) => `https://cdn.discordapp.com/banners/${string}/${string}.png`;
|
package/dist/lib/rest/CDN.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.userBanner = exports.userAvatarDecoration = exports.userAvatar = exports.teamIcon = exports.storePageAsset = exports.sticker = exports.stickerPackBanner = exports.roleIcon = exports.guildSplash = exports.guildScheduledEventCover = exports.guildMemberBanner = exports.guildMemberAvatar = exports.guildIcon = exports.guildDiscoverySplash = exports.guildBanner = exports.defaultUserAvatar = exports.customEmoji = exports.applicationIcon = exports.applicationCover = exports.applicationAsset = exports.achievementIcon = void 0;
|
|
4
|
-
const achievementIcon = (applicationID, achievementID, iconHash) => `https://cdn.discordapp.com/app-assets/${applicationID}/achievements/${achievementID}/icons/${iconHash}.png`;
|
|
5
|
-
exports.achievementIcon = achievementIcon;
|
|
6
|
-
const applicationAsset = (applicationID, assetID) => `https://cdn.discordapp.com/app-assets/${applicationID}/${assetID}.png`;
|
|
7
|
-
exports.applicationAsset = applicationAsset;
|
|
8
|
-
const applicationCover = (applicationID, coverImage) => `https://cdn.discordapp.com/app-icons/${applicationID}/${coverImage}.png`;
|
|
9
|
-
exports.applicationCover = applicationCover;
|
|
10
|
-
const applicationIcon = (applicationID, icon) => `https://cdn.discordapp.com/app-icons/${applicationID}/${icon}.png`;
|
|
11
|
-
exports.applicationIcon = applicationIcon;
|
|
12
|
-
const customEmoji = (emojiID) => `https://cdn.discordapp.com/emojis/${emojiID}.png`;
|
|
13
|
-
exports.customEmoji = customEmoji;
|
|
14
|
-
const defaultUserAvatar = (index) => `https://cdn.discordapp.com/embed/avatars/${index}.png`;
|
|
15
|
-
exports.defaultUserAvatar = defaultUserAvatar;
|
|
16
|
-
const guildBanner = (guildID, banner) => `https://cdn.discordapp.com/banners/${guildID}/${banner}.png`;
|
|
17
|
-
exports.guildBanner = guildBanner;
|
|
18
|
-
const guildDiscoverySplash = (guildID, splash) => `https://cdn.discordapp.com/discovery-splashes/${guildID}/${splash}.png`;
|
|
19
|
-
exports.guildDiscoverySplash = guildDiscoverySplash;
|
|
20
|
-
const guildIcon = (guildID, icon) => `https://cdn.discordapp.com/icons/${guildID}/${icon}.png`;
|
|
21
|
-
exports.guildIcon = guildIcon;
|
|
22
|
-
const guildMemberAvatar = (guildID, userID, avatar) => `https://cdn.discordapp.com/guilds/${guildID}/users/${userID}/avatars/${avatar}.png`;
|
|
23
|
-
exports.guildMemberAvatar = guildMemberAvatar;
|
|
24
|
-
const guildMemberBanner = (guildID, userID, banner) => `https://cdn.discordapp.com/guilds/${guildID}/users/${userID}/banners/${banner}.png`;
|
|
25
|
-
exports.guildMemberBanner = guildMemberBanner;
|
|
26
|
-
const guildScheduledEventCover = (scheduledEventID, coverImage) => `https://cdn.discordapp.com/guild-events/${scheduledEventID}/${coverImage}.png`;
|
|
27
|
-
exports.guildScheduledEventCover = guildScheduledEventCover;
|
|
28
|
-
const guildSplash = (guildID, splash) => `https://cdn.discordapp.com/splashes/${guildID}/${splash}.png`;
|
|
29
|
-
exports.guildSplash = guildSplash;
|
|
30
|
-
const roleIcon = (roleID, icon) => `https://cdn.discordapp.com/role-icons/${roleID}/${icon}.png`;
|
|
31
|
-
exports.roleIcon = roleIcon;
|
|
32
|
-
const stickerPackBanner = (assetID) => `https://cdn.discordapp.com/app-assets/710982414301790216/store/${assetID}.png`;
|
|
33
|
-
exports.stickerPackBanner = stickerPackBanner;
|
|
34
|
-
const sticker = (stickerID) => `https://cdn.discordapp.com/stickers/${stickerID}.png`;
|
|
35
|
-
exports.sticker = sticker;
|
|
36
|
-
const storePageAsset = (applicationID, assetID) => `https://cdn.discordapp.com/app-assets/${applicationID}/store/${assetID}`;
|
|
37
|
-
exports.storePageAsset = storePageAsset;
|
|
38
|
-
const teamIcon = (teamID, icon) => `https://cdn.discordapp.com/team-icons/${teamID}/${icon}.png`;
|
|
39
|
-
exports.teamIcon = teamIcon;
|
|
40
|
-
const userAvatar = (userID, avatar) => `https://cdn.discordapp.com/avatars/${userID}/${avatar}.png`;
|
|
41
|
-
exports.userAvatar = userAvatar;
|
|
42
|
-
const userAvatarDecoration = (userID, avatarDecoration) => `https://cdn.discordapp.com/avatar-decorations/${userID}/${avatarDecoration}.png`;
|
|
43
|
-
exports.userAvatarDecoration = userAvatarDecoration;
|
|
44
|
-
const userBanner = (userID, banner) => `https://cdn.discordapp.com/banners/${userID}/${banner}.png`;
|
|
45
|
-
exports.userBanner = userBanner;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import type { snowflake } from "./common";
|
|
2
|
-
/** https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection-example-voice-identify-payload */
|
|
3
|
-
export interface RawVoiceIdentifyPayload {
|
|
4
|
-
server_id: snowflake;
|
|
5
|
-
user_id: snowflake;
|
|
6
|
-
session_id: string;
|
|
7
|
-
token: string;
|
|
8
|
-
}
|
|
9
|
-
/** https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-websocket-connection-example-voice-ready-payload */
|
|
10
|
-
export interface RawVoiceReadyPayload {
|
|
11
|
-
ssrc: number;
|
|
12
|
-
ip: string;
|
|
13
|
-
port: number;
|
|
14
|
-
modes: Array<string>;
|
|
15
|
-
}
|
|
16
|
-
/** https://discord.com/developers/docs/topics/voice-connections#resuming-voice-connection-example-resume-connection-payload */
|
|
17
|
-
export interface RawResumeConnectionPayload {
|
|
18
|
-
server_id: snowflake;
|
|
19
|
-
session_id: string;
|
|
20
|
-
token: string;
|
|
21
|
-
}
|
|
22
|
-
/** https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-select-protocol-payload */
|
|
23
|
-
export interface RawSelectProtocolPayload {
|
|
24
|
-
protocol: string;
|
|
25
|
-
data: {
|
|
26
|
-
address: string;
|
|
27
|
-
port: number;
|
|
28
|
-
mode: string;
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
/** https://discord.com/developers/docs/topics/voice-connections#establishing-a-voice-udp-connection-example-session-description-payload */
|
|
32
|
-
export interface RawSessionDescriptionPayload {
|
|
33
|
-
mode: string;
|
|
34
|
-
secret_key: Array<number>;
|
|
35
|
-
}
|
|
36
|
-
export interface VoiceIdentifyPayload {
|
|
37
|
-
serverID: snowflake;
|
|
38
|
-
userID: snowflake;
|
|
39
|
-
sessionID: string;
|
|
40
|
-
token: string;
|
|
41
|
-
}
|
|
42
|
-
export interface VoiceReadyPayload {
|
|
43
|
-
ssrc: number;
|
|
44
|
-
ip: string;
|
|
45
|
-
port: number;
|
|
46
|
-
modes: Array<string>;
|
|
47
|
-
}
|
|
48
|
-
export interface ResumeConnectionPayload {
|
|
49
|
-
serverID: snowflake;
|
|
50
|
-
sessionID: string;
|
|
51
|
-
token: string;
|
|
52
|
-
}
|
|
53
|
-
export interface SelectProtocolPayload {
|
|
54
|
-
protocol: string;
|
|
55
|
-
data: {
|
|
56
|
-
address: string;
|
|
57
|
-
port: number;
|
|
58
|
-
mode: string;
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
export interface SessionDescriptionPayload {
|
|
62
|
-
mode: string;
|
|
63
|
-
secretKey: Array<number>;
|
|
64
|
-
}
|
package/dist/lib/utils/Util.d.ts
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import type { Application, RawApplication } from "../types/application";
|
|
2
|
-
import type { ApplicationCommand, GuildApplicationCommandPermissions, RawApplicationCommand, RawGuildApplicationCommandPermissions } from "../types/application-command";
|
|
3
|
-
import type { AutoModerationRule, RawAutoModerationRule } from "../types/auto-moderation";
|
|
4
|
-
import type { Attachment, Channel, Embed, Message, MessageInteractionMetadata, RawAttachment, RawChannel, RawEmbed, RawMessage, RawMessageInteractionMetadata, RawThreadMember, ThreadMember } from "../types/channel";
|
|
5
|
-
import type { Emoji, RawEmoji } from "../types/emoji";
|
|
6
|
-
import type { Guild, GuildMember, Integration, RawGuild, RawGuildMember, RawIntegration } from "../types/guild";
|
|
7
|
-
import type { GuildScheduledEvent, RawGuildScheduledEvent } from "../types/guild-scheduled-event";
|
|
8
|
-
import type { GuildTemplate, RawGuildTemplate } from "../types/guild-template";
|
|
9
|
-
import type { Invite, RawInvite } from "../types/invite";
|
|
10
|
-
import type { RawUser, User } from "../types/user";
|
|
11
|
-
import type { Poll, RawPoll } from "../types/poll";
|
|
12
|
-
import type { RawStageInstance, StageInstance } from "../types/stage-instance";
|
|
13
|
-
import type { RawSticker, Sticker } from "../types/sticker";
|
|
14
|
-
import type { RawVoiceState, VoiceState } from "../types/voice";
|
|
15
|
-
import type { RawWebhook, Webhook } from "../types/webhook";
|
|
16
|
-
import type { RawTeam, Team } from "../types/team";
|
|
17
|
-
import type { RawRole, Role } from "../types/role";
|
|
18
|
-
import type { ActionRow, RawActionRow } from "../types/message-components";
|
|
19
|
-
import type { Interaction, RawInteraction, RawResolvedData, ResolvedData } from "../types/interaction";
|
|
20
|
-
import type { Entitlement, RawEntitlement } from "../types/entitlements";
|
|
21
|
-
import type { AuditLog, AuditLogEntry, RawAuditLog, RawAuditLogEntry } from "../types/audit-log";
|
|
22
|
-
import type { RawSKU, SKU } from "../types/sku";
|
|
23
|
-
import type { PresenceUpdateEventFields, RawPresenceUpdateEventFields } from "../types/gateway-events";
|
|
24
|
-
export declare class Util {
|
|
25
|
-
auditLogFromRaw(auditLog: RawAuditLog): AuditLog;
|
|
26
|
-
auditLogToRaw(auditLog: AuditLog): RawAuditLog;
|
|
27
|
-
auditLogEntryFromRaw(auditLogEntry: RawAuditLogEntry): AuditLogEntry;
|
|
28
|
-
auditLogEntryToRaw(auditLogEntry: AuditLogEntry): RawAuditLogEntry;
|
|
29
|
-
autoModerationRuleFromRaw(autoModerationRule: RawAutoModerationRule): AutoModerationRule;
|
|
30
|
-
autoModerationRuleToRaw(autoModerationRule: AutoModerationRule): RawAutoModerationRule;
|
|
31
|
-
attachmentFromRaw(attachment: RawAttachment): Attachment;
|
|
32
|
-
attachmentToRaw(attachment: Attachment): RawAttachment;
|
|
33
|
-
applicationFromRaw(application: RawApplication): Application;
|
|
34
|
-
applicationToRaw(application: Application): RawApplication;
|
|
35
|
-
applicationCommandFromRaw(applicationCommand: RawApplicationCommand): ApplicationCommand;
|
|
36
|
-
applicationCommandToRaw(applicationCommand: ApplicationCommand): RawApplicationCommand;
|
|
37
|
-
channelFromRaw(channel: RawChannel): Channel;
|
|
38
|
-
channelToRaw(channel: Channel): RawChannel;
|
|
39
|
-
embedFromRaw(embed: RawEmbed): Embed;
|
|
40
|
-
embedToRaw(embed: Embed): RawEmbed;
|
|
41
|
-
emojiFromRaw(emoji: RawEmoji): Emoji;
|
|
42
|
-
emojiToRaw(emoji: Emoji): RawEmoji;
|
|
43
|
-
entitlementFromRaw(entitlement: RawEntitlement): Entitlement;
|
|
44
|
-
entitlementToRaw(entitlement: Entitlement): RawEntitlement;
|
|
45
|
-
guildApplicationCommandPermissionsFromRaw(guildApplicationCommandPermissions: RawGuildApplicationCommandPermissions): GuildApplicationCommandPermissions;
|
|
46
|
-
guildApplicationCommandPermissionsToRaw(guildApplicationCommandPermissions: GuildApplicationCommandPermissions): RawGuildApplicationCommandPermissions;
|
|
47
|
-
guildFromRaw(guild: RawGuild): Guild;
|
|
48
|
-
guildToRaw(guild: Guild): RawGuild;
|
|
49
|
-
guildMemberFromRaw(guildMember: RawGuildMember): GuildMember;
|
|
50
|
-
guildMemberToRaw(guildMember: GuildMember): RawGuildMember;
|
|
51
|
-
guildScheduledEventFromRaw(guildScheduledEvent: RawGuildScheduledEvent): GuildScheduledEvent;
|
|
52
|
-
guildScheduledEventToRaw(guildScheduledEvent: GuildScheduledEvent): RawGuildScheduledEvent;
|
|
53
|
-
guildTemplateFromRaw(guildTemplate: RawGuildTemplate): GuildTemplate;
|
|
54
|
-
guildTemplateToRaw(guildTemplate: GuildTemplate): RawGuildTemplate;
|
|
55
|
-
integrationFromRaw(integration: RawIntegration): Integration;
|
|
56
|
-
integrationToRaw(integration: Integration): RawIntegration;
|
|
57
|
-
interactionFromRaw(interaction: RawInteraction): Interaction;
|
|
58
|
-
interactionToRaw(interaction: Interaction): RawInteraction;
|
|
59
|
-
interactionMetadataFromRaw(interactionMetadata: RawMessageInteractionMetadata): MessageInteractionMetadata;
|
|
60
|
-
interactionMetadataToRaw(interactionMetadata: MessageInteractionMetadata): RawMessageInteractionMetadata;
|
|
61
|
-
inviteFromRaw(invite: RawInvite): Invite;
|
|
62
|
-
inviteToRaw(invite: Invite): RawInvite;
|
|
63
|
-
messageComponentsFromRaw(components: Array<RawActionRow>): Array<ActionRow>;
|
|
64
|
-
messageComponentsToRaw(components: Array<ActionRow>): Array<RawActionRow>;
|
|
65
|
-
messageFromRaw(message: RawMessage): Message;
|
|
66
|
-
messageToRaw(message: Message): RawMessage;
|
|
67
|
-
partialApplicationCommandToRaw(applicationCommand: Partial<ApplicationCommand>): Partial<RawApplicationCommand>;
|
|
68
|
-
presenceFromRaw(presence: RawPresenceUpdateEventFields): PresenceUpdateEventFields;
|
|
69
|
-
presenceToRaw(presence: PresenceUpdateEventFields): RawPresenceUpdateEventFields;
|
|
70
|
-
resolvedDataFromRaw(resolvedData: RawResolvedData): ResolvedData;
|
|
71
|
-
resolvedDataToRaw(resolvedData: ResolvedData): RawResolvedData;
|
|
72
|
-
pollFromRaw(poll: RawPoll): Poll;
|
|
73
|
-
pollToRaw(poll: Poll): RawPoll;
|
|
74
|
-
roleFromRaw(role: RawRole): Role;
|
|
75
|
-
roleToRaw(role: Role): RawRole;
|
|
76
|
-
skuFromRaw(sku: RawSKU): SKU;
|
|
77
|
-
skuToRaw(sku: SKU): RawSKU;
|
|
78
|
-
stageInstanceFromRaw(stageInstance: RawStageInstance): StageInstance;
|
|
79
|
-
stageInstanceToRaw(stageInstance: StageInstance): RawStageInstance;
|
|
80
|
-
stickerFromRaw(sticker: RawSticker): Sticker;
|
|
81
|
-
stickerToRaw(sticker: Sticker): RawSticker;
|
|
82
|
-
teamFromRaw(team: RawTeam): Team;
|
|
83
|
-
teamToRaw(team: Team): RawTeam;
|
|
84
|
-
threadMemberFromRaw(threadMember: RawThreadMember): ThreadMember;
|
|
85
|
-
threadMemberToRaw(threadMember: ThreadMember): RawThreadMember;
|
|
86
|
-
testEntitlementFromRaw(entitlement: Omit<RawEntitlement, "starts_at" | "ends_at" | "subscription_id">): Omit<Entitlement, "startsAt" | "endsAt" | "subscriptionID">;
|
|
87
|
-
testEntitlementToRaw(entitlement: Omit<Entitlement, "startsAt" | "endsAt" | "subscriptionID">): Omit<RawEntitlement, "starts_at" | "ends_at" | "subscription_id">;
|
|
88
|
-
userFromRaw(user: RawUser): User;
|
|
89
|
-
userToRaw(user: User): RawUser;
|
|
90
|
-
voiceStateFromRaw(voiceState: RawVoiceState): VoiceState;
|
|
91
|
-
voiceStateToRaw(voiceState: VoiceState): RawVoiceState;
|
|
92
|
-
webhookFromRaw(webhook: RawWebhook): Webhook;
|
|
93
|
-
webhookToRaw(webhook: Webhook): RawWebhook;
|
|
94
|
-
}
|