disgroove 2.2.2-dev.bd3875c → 2.2.2
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 +2 -6
- package/dist/lib/Client.d.ts +47 -49
- package/dist/lib/Client.js +170 -182
- package/dist/lib/constants.d.ts +19 -4
- package/dist/lib/constants.js +22 -5
- package/dist/lib/gateway/Shard.js +59 -58
- 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/index.d.ts +0 -1
- package/dist/lib/rest/index.js +1 -2
- package/dist/lib/transformers/Applications.d.ts +8 -0
- package/dist/lib/transformers/Applications.js +211 -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 +5 -0
- package/dist/lib/transformers/AutoModeration.js +64 -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 +248 -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 +8 -0
- package/dist/lib/transformers/Presences.js +108 -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 +48 -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 +21 -0
- package/dist/lib/transformers/index.js +37 -0
- package/dist/lib/types/entitlements.d.ts +0 -6
- package/dist/lib/types/interaction.d.ts +2 -2
- package/dist/lib/types/sku.d.ts +0 -12
- package/dist/lib/utils/CDN.d.ts +24 -0
- package/dist/lib/utils/CDN.js +49 -0
- package/dist/lib/utils/Util.d.ts +1 -93
- package/dist/lib/utils/Util.js +2 -2211
- package/dist/lib/utils/formatters.d.ts +9 -0
- package/dist/lib/utils/formatters.js +38 -0
- package/dist/lib/utils/index.d.ts +2 -0
- package/dist/lib/utils/index.js +15 -0
- package/dist/package.json +3 -3
- package/package.json +3 -3
- 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/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,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Stickers = void 0;
|
4
|
+
const Users_1 = require("./Users");
|
5
|
+
class Stickers {
|
6
|
+
static stickerFromRaw(sticker) {
|
7
|
+
return {
|
8
|
+
id: sticker.id,
|
9
|
+
packID: sticker.pack_id,
|
10
|
+
name: sticker.name,
|
11
|
+
description: sticker.description,
|
12
|
+
tags: sticker.tags,
|
13
|
+
asset: sticker.asset,
|
14
|
+
type: sticker.type,
|
15
|
+
formatType: sticker.format_type,
|
16
|
+
available: sticker.available,
|
17
|
+
guildID: sticker.id,
|
18
|
+
user: sticker.user !== undefined
|
19
|
+
? Users_1.Users.userFromRaw(sticker.user)
|
20
|
+
: undefined,
|
21
|
+
sortValue: sticker.sort_value,
|
22
|
+
};
|
23
|
+
}
|
24
|
+
static stickerToRaw(sticker) {
|
25
|
+
return {
|
26
|
+
id: sticker.id,
|
27
|
+
pack_id: sticker.packID,
|
28
|
+
name: sticker.name,
|
29
|
+
description: sticker.description,
|
30
|
+
tags: sticker.tags,
|
31
|
+
asset: sticker.asset,
|
32
|
+
type: sticker.type,
|
33
|
+
format_type: sticker.formatType,
|
34
|
+
available: sticker.available,
|
35
|
+
guild_id: sticker.id,
|
36
|
+
user: sticker.user !== undefined ? Users_1.Users.userToRaw(sticker.user) : undefined,
|
37
|
+
sort_value: sticker.sortValue,
|
38
|
+
};
|
39
|
+
}
|
40
|
+
}
|
41
|
+
exports.Stickers = Stickers;
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Teams = void 0;
|
4
|
+
const Users_1 = require("./Users");
|
5
|
+
class Teams {
|
6
|
+
static teamFromRaw(team) {
|
7
|
+
return {
|
8
|
+
icon: team.icon,
|
9
|
+
id: team.id,
|
10
|
+
members: team.members.map((teamMember) => ({
|
11
|
+
membershipState: teamMember.membership_state,
|
12
|
+
teamID: teamMember.team_id,
|
13
|
+
user: Users_1.Users.userFromRaw(teamMember.user),
|
14
|
+
role: teamMember.role,
|
15
|
+
})),
|
16
|
+
name: team.name,
|
17
|
+
ownerUserID: team.owner_user_id,
|
18
|
+
};
|
19
|
+
}
|
20
|
+
static teamToRaw(team) {
|
21
|
+
return {
|
22
|
+
icon: team.icon,
|
23
|
+
id: team.id,
|
24
|
+
members: team.members.map((teamMember) => ({
|
25
|
+
membership_state: teamMember.membershipState,
|
26
|
+
team_id: teamMember.teamID,
|
27
|
+
user: Users_1.Users.userToRaw(teamMember.user),
|
28
|
+
role: teamMember.role,
|
29
|
+
})),
|
30
|
+
name: team.name,
|
31
|
+
owner_user_id: team.ownerUserID,
|
32
|
+
};
|
33
|
+
}
|
34
|
+
}
|
35
|
+
exports.Teams = Teams;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Users = void 0;
|
4
|
+
class Users {
|
5
|
+
static userFromRaw(user) {
|
6
|
+
return {
|
7
|
+
id: user.id,
|
8
|
+
username: user.username,
|
9
|
+
discriminator: user.discriminator,
|
10
|
+
globalName: user.global_name,
|
11
|
+
avatar: user.avatar,
|
12
|
+
bot: user.bot,
|
13
|
+
system: user.system,
|
14
|
+
mfaEnabled: user.mfa_enabled,
|
15
|
+
banner: user.banner,
|
16
|
+
accentColor: user.accent_color,
|
17
|
+
locale: user.locale,
|
18
|
+
verified: user.verified,
|
19
|
+
email: user.email,
|
20
|
+
flags: user.flags,
|
21
|
+
premiumType: user.premium_type,
|
22
|
+
publicFlags: user.public_flags,
|
23
|
+
avatarDecoration: user.avatar_decoration,
|
24
|
+
};
|
25
|
+
}
|
26
|
+
static userToRaw(user) {
|
27
|
+
return {
|
28
|
+
id: user.id,
|
29
|
+
username: user.username,
|
30
|
+
discriminator: user.discriminator,
|
31
|
+
global_name: user.globalName,
|
32
|
+
avatar: user.avatar,
|
33
|
+
bot: user.bot,
|
34
|
+
system: user.system,
|
35
|
+
mfa_enabled: user.mfaEnabled,
|
36
|
+
banner: user.banner,
|
37
|
+
accent_color: user.accentColor,
|
38
|
+
locale: user.locale,
|
39
|
+
verified: user.verified,
|
40
|
+
email: user.email,
|
41
|
+
flags: user.flags,
|
42
|
+
premium_type: user.premiumType,
|
43
|
+
public_flags: user.publicFlags,
|
44
|
+
avatar_decoration: user.avatarDecoration,
|
45
|
+
};
|
46
|
+
}
|
47
|
+
}
|
48
|
+
exports.Users = Users;
|
@@ -0,0 +1,45 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Voice = void 0;
|
4
|
+
const Guilds_1 = require("./Guilds");
|
5
|
+
class Voice {
|
6
|
+
static voiceStateFromRaw(voiceState) {
|
7
|
+
return {
|
8
|
+
guildID: voiceState.guild_id,
|
9
|
+
channelID: voiceState.channel_id,
|
10
|
+
userID: voiceState.user_id,
|
11
|
+
member: voiceState.member !== undefined
|
12
|
+
? Guilds_1.Guilds.guildMemberFromRaw(voiceState.member)
|
13
|
+
: undefined,
|
14
|
+
sessionID: voiceState.session_id,
|
15
|
+
deaf: voiceState.deaf,
|
16
|
+
mute: voiceState.mute,
|
17
|
+
selfDeaf: voiceState.self_deaf,
|
18
|
+
selfMute: voiceState.self_mute,
|
19
|
+
selfStream: voiceState.self_stream,
|
20
|
+
selfVideo: voiceState.self_video,
|
21
|
+
suppress: voiceState.suppress,
|
22
|
+
requestToSpeakTimestamp: voiceState.request_to_speak_timestamp,
|
23
|
+
};
|
24
|
+
}
|
25
|
+
static voiceStateToRaw(voiceState) {
|
26
|
+
return {
|
27
|
+
guild_id: voiceState.guildID,
|
28
|
+
channel_id: voiceState.channelID,
|
29
|
+
user_id: voiceState.userID,
|
30
|
+
member: voiceState.member !== undefined
|
31
|
+
? Guilds_1.Guilds.guildMemberToRaw(voiceState.member)
|
32
|
+
: undefined,
|
33
|
+
session_id: voiceState.sessionID,
|
34
|
+
deaf: voiceState.deaf,
|
35
|
+
mute: voiceState.mute,
|
36
|
+
self_deaf: voiceState.selfDeaf,
|
37
|
+
self_mute: voiceState.selfMute,
|
38
|
+
self_stream: voiceState.selfStream,
|
39
|
+
self_video: voiceState.selfVideo,
|
40
|
+
suppress: voiceState.suppress,
|
41
|
+
request_to_speak_timestamp: voiceState.requestToSpeakTimestamp,
|
42
|
+
};
|
43
|
+
}
|
44
|
+
}
|
45
|
+
exports.Voice = Voice;
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Webhooks = void 0;
|
4
|
+
const Channels_1 = require("./Channels");
|
5
|
+
const Guilds_1 = require("./Guilds");
|
6
|
+
const Users_1 = require("./Users");
|
7
|
+
class Webhooks {
|
8
|
+
static webhookFromRaw(webhook) {
|
9
|
+
return {
|
10
|
+
id: webhook.id,
|
11
|
+
type: webhook.type,
|
12
|
+
guildID: webhook.guild_id,
|
13
|
+
channelID: webhook.channel_id,
|
14
|
+
user: webhook.user !== undefined
|
15
|
+
? Users_1.Users.userFromRaw(webhook.user)
|
16
|
+
: undefined,
|
17
|
+
name: webhook.name,
|
18
|
+
avatar: webhook.avatar,
|
19
|
+
token: webhook.token,
|
20
|
+
applicationID: webhook.application_id,
|
21
|
+
sourceGuild: webhook.source_guild !== undefined
|
22
|
+
? Guilds_1.Guilds.guildFromRaw(webhook.source_guild)
|
23
|
+
: undefined,
|
24
|
+
sourceChannel: webhook.source_channel !== undefined
|
25
|
+
? Channels_1.Channels.channelFromRaw(webhook.source_channel)
|
26
|
+
: undefined,
|
27
|
+
url: webhook.url,
|
28
|
+
};
|
29
|
+
}
|
30
|
+
static webhookToRaw(webhook) {
|
31
|
+
return {
|
32
|
+
id: webhook.id,
|
33
|
+
type: webhook.type,
|
34
|
+
guild_id: webhook.guildID,
|
35
|
+
channel_id: webhook.channelID,
|
36
|
+
user: webhook.user !== undefined ? Users_1.Users.userToRaw(webhook.user) : undefined,
|
37
|
+
name: webhook.name,
|
38
|
+
avatar: webhook.avatar,
|
39
|
+
token: webhook.token,
|
40
|
+
application_id: webhook.applicationID,
|
41
|
+
source_guild: webhook.sourceGuild !== undefined
|
42
|
+
? Guilds_1.Guilds.guildToRaw(webhook.sourceGuild)
|
43
|
+
: undefined,
|
44
|
+
source_channel: webhook.sourceChannel !== undefined
|
45
|
+
? Channels_1.Channels.channelToRaw(webhook.sourceChannel)
|
46
|
+
: undefined,
|
47
|
+
url: webhook.url,
|
48
|
+
};
|
49
|
+
}
|
50
|
+
}
|
51
|
+
exports.Webhooks = Webhooks;
|
@@ -0,0 +1,21 @@
|
|
1
|
+
export * from "./Applications";
|
2
|
+
export * from "./AuditLogs";
|
3
|
+
export * from "./AutoModeration";
|
4
|
+
export * from "./Channels";
|
5
|
+
export * from "./Emojis";
|
6
|
+
export * from "./Entitlements";
|
7
|
+
export * from "./Guilds";
|
8
|
+
export * from "./GuildScheduledEvents";
|
9
|
+
export * from "./GuildTemplates";
|
10
|
+
export * from "./Interactions";
|
11
|
+
export * from "./Invites";
|
12
|
+
export * from "./Polls";
|
13
|
+
export * from "./Presences";
|
14
|
+
export * from "./Roles";
|
15
|
+
export * from "./SKUs";
|
16
|
+
export * from "./StageInstances";
|
17
|
+
export * from "./Stickers";
|
18
|
+
export * from "./Teams";
|
19
|
+
export * from "./Users";
|
20
|
+
export * from "./Voice";
|
21
|
+
export * from "./Webhooks";
|
@@ -0,0 +1,37 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./Applications"), exports);
|
18
|
+
__exportStar(require("./AuditLogs"), exports);
|
19
|
+
__exportStar(require("./AutoModeration"), exports);
|
20
|
+
__exportStar(require("./Channels"), exports);
|
21
|
+
__exportStar(require("./Emojis"), exports);
|
22
|
+
__exportStar(require("./Entitlements"), exports);
|
23
|
+
__exportStar(require("./Guilds"), exports);
|
24
|
+
__exportStar(require("./GuildScheduledEvents"), exports);
|
25
|
+
__exportStar(require("./GuildTemplates"), exports);
|
26
|
+
__exportStar(require("./Interactions"), exports);
|
27
|
+
__exportStar(require("./Invites"), exports);
|
28
|
+
__exportStar(require("./Polls"), exports);
|
29
|
+
__exportStar(require("./Presences"), exports);
|
30
|
+
__exportStar(require("./Roles"), exports);
|
31
|
+
__exportStar(require("./SKUs"), exports);
|
32
|
+
__exportStar(require("./StageInstances"), exports);
|
33
|
+
__exportStar(require("./Stickers"), exports);
|
34
|
+
__exportStar(require("./Teams"), exports);
|
35
|
+
__exportStar(require("./Users"), exports);
|
36
|
+
__exportStar(require("./Voice"), exports);
|
37
|
+
__exportStar(require("./Webhooks"), exports);
|
@@ -6,28 +6,22 @@ export interface RawEntitlement {
|
|
6
6
|
sku_id: snowflake;
|
7
7
|
application_id: snowflake;
|
8
8
|
user_id?: snowflake;
|
9
|
-
promotion_id?: snowflake | null;
|
10
9
|
type: EntitlementTypes;
|
11
10
|
deleted: boolean;
|
12
|
-
gift_code_flags?: number;
|
13
11
|
consumed?: boolean;
|
14
12
|
starts_at?: timestamp;
|
15
13
|
ends_at?: timestamp;
|
16
14
|
guild_id?: snowflake;
|
17
|
-
subscription_id?: string;
|
18
15
|
}
|
19
16
|
export interface Entitlement {
|
20
17
|
id: snowflake;
|
21
18
|
skuID: snowflake;
|
22
19
|
applicationID: snowflake;
|
23
20
|
userID?: snowflake;
|
24
|
-
promotionID?: snowflake | null;
|
25
21
|
type: EntitlementTypes;
|
26
22
|
deleted: boolean;
|
27
|
-
giftCodeFlags?: number;
|
28
23
|
consumed?: boolean;
|
29
24
|
startsAt?: timestamp;
|
30
25
|
endsAt?: timestamp;
|
31
26
|
guildID?: snowflake;
|
32
|
-
subscriptionID?: string;
|
33
27
|
}
|
@@ -96,7 +96,7 @@ export interface RawInteractionCallbackData {
|
|
96
96
|
allowed_mentions?: RawAllowedMentions;
|
97
97
|
flags?: MessageFlags;
|
98
98
|
components?: Array<RawActionRow>;
|
99
|
-
attachments?: Array<RawAttachment
|
99
|
+
attachments?: Array<Pick<RawAttachment, "filename" | "description">>;
|
100
100
|
poll?: RawPollCreateParams;
|
101
101
|
files?: Array<File>;
|
102
102
|
choices?: Array<RawApplicationCommandOptionChoice>;
|
@@ -181,7 +181,7 @@ export interface InteractionCallbackData {
|
|
181
181
|
allowedMentions?: AllowedMentions;
|
182
182
|
flags?: MessageFlags;
|
183
183
|
components?: Array<ActionRow>;
|
184
|
-
attachments?: Array<Attachment
|
184
|
+
attachments?: Array<Pick<Attachment, "filename" | "description">>;
|
185
185
|
poll?: PollCreateParams;
|
186
186
|
files?: Array<File>;
|
187
187
|
choices?: Array<ApplicationCommandOptionChoice>;
|
package/dist/lib/types/sku.d.ts
CHANGED
@@ -4,28 +4,16 @@ import type { snowflake } from "./common";
|
|
4
4
|
export interface RawSKU {
|
5
5
|
id: snowflake;
|
6
6
|
type: SKUTypes;
|
7
|
-
dependent_sku_id?: string | null;
|
8
7
|
application_id: snowflake;
|
9
|
-
manifest_labels?: null;
|
10
|
-
access_type?: number;
|
11
8
|
name: string;
|
12
|
-
features?: [];
|
13
|
-
release_date?: null;
|
14
9
|
slug: string;
|
15
10
|
flags: SKUFlags;
|
16
|
-
show_age_gate?: boolean;
|
17
11
|
}
|
18
12
|
export interface SKU {
|
19
13
|
id: snowflake;
|
20
14
|
type: SKUTypes;
|
21
|
-
dependentSKUID?: string | null;
|
22
15
|
applicationID: snowflake;
|
23
|
-
manifestLabels?: null;
|
24
|
-
accessType?: number;
|
25
16
|
name: string;
|
26
|
-
features?: [];
|
27
|
-
releaseDate?: null;
|
28
17
|
slug: string;
|
29
18
|
flags: SKUFlags;
|
30
|
-
showAgeGate?: boolean;
|
31
19
|
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { ImageFormats } from "../constants";
|
2
|
+
import type { snowflake } from "../types/common";
|
3
|
+
export declare const cdnURL: (cdnEndpoint: string, imageFormat?: ImageFormats) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
4
|
+
export declare const achievementIcon: (applicationID: snowflake, achievementID: snowflake, iconHash: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
5
|
+
export declare const applicationAsset: (applicationID: snowflake, assetID: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
6
|
+
export declare const applicationCover: (applicationID: snowflake, coverImage: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
7
|
+
export declare const applicationIcon: (applicationID: snowflake, icon: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
8
|
+
export declare const customEmoji: (emojiID: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
9
|
+
export declare const defaultUserAvatar: (index: string) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
10
|
+
export declare const guildBanner: (guildID: snowflake, banner: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
11
|
+
export declare const guildDiscoverySplash: (guildID: snowflake, splash: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
12
|
+
export declare const guildIcon: (guildID: snowflake, icon: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
13
|
+
export declare const guildMemberAvatar: (guildID: snowflake, userID: snowflake, avatar: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
14
|
+
export declare const guildMemberBanner: (guildID: snowflake, userID: snowflake, banner: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
15
|
+
export declare const guildScheduledEventCover: (scheduledEventID: snowflake, coverImage: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
16
|
+
export declare const guildSplash: (guildID: snowflake, splash: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
17
|
+
export declare const roleIcon: (roleID: snowflake, icon: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
18
|
+
export declare const stickerPackBanner: (assetID: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
19
|
+
export declare const sticker: (stickerID: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.Lottie | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
20
|
+
export declare const storePageAsset: (applicationID: snowflake, assetID: snowflake, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
21
|
+
export declare const teamIcon: (teamID: snowflake, icon: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
22
|
+
export declare const userAvatar: (userID: snowflake, avatar: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
23
|
+
export declare const userAvatarDecoration: (userID: snowflake, avatarDecoration: string) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
24
|
+
export declare const userBanner: (userID: snowflake, banner: string, imageFormat?: ImageFormats.PNG | ImageFormats.JPEG | ImageFormats.JPG | ImageFormats.WebP | ImageFormats.GIF) => `https://cdn.discordapp.com/${string}.jpg` | `https://cdn.discordapp.com/${string}.jpeg` | `https://cdn.discordapp.com/${string}.png` | `https://cdn.discordapp.com/${string}.webp` | `https://cdn.discordapp.com/${string}.gif` | `https://cdn.discordapp.com/${string}.json`;
|
@@ -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;
|
package/dist/lib/utils/Util.d.ts
CHANGED
@@ -1,96 +1,4 @@
|
|
1
|
-
import type {
|
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";
|
1
|
+
import type { ApplicationCommand, RawApplicationCommand } from "../types/application-command";
|
24
2
|
export declare class Util {
|
25
|
-
applicationCommandFromRaw(applicationCommand: RawApplicationCommand): ApplicationCommand;
|
26
|
-
applicationCommandToRaw(applicationCommand: ApplicationCommand): RawApplicationCommand;
|
27
|
-
applicationFromRaw(application: RawApplication): Application;
|
28
|
-
applicationToRaw(application: Application): RawApplication;
|
29
|
-
attachmentFromRaw(attachment: RawAttachment): Attachment;
|
30
|
-
attachmentToRaw(attachment: Attachment): RawAttachment;
|
31
|
-
auditLogEntryFromRaw(auditLogEntry: RawAuditLogEntry): AuditLogEntry;
|
32
|
-
auditLogEntryToRaw(auditLogEntry: AuditLogEntry): RawAuditLogEntry;
|
33
|
-
auditLogFromRaw(auditLog: RawAuditLog): AuditLog;
|
34
|
-
auditLogToRaw(auditLog: AuditLog): RawAuditLog;
|
35
|
-
autoModerationRuleFromRaw(autoModerationRule: RawAutoModerationRule): AutoModerationRule;
|
36
|
-
autoModerationRuleToRaw(autoModerationRule: AutoModerationRule): RawAutoModerationRule;
|
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
|
-
guildMemberFromRaw(guildMember: RawGuildMember): GuildMember;
|
49
|
-
guildMemberToRaw(guildMember: GuildMember): RawGuildMember;
|
50
|
-
guildScheduledEventFromRaw(guildScheduledEvent: RawGuildScheduledEvent): GuildScheduledEvent;
|
51
|
-
guildScheduledEventToRaw(guildScheduledEvent: GuildScheduledEvent): RawGuildScheduledEvent;
|
52
|
-
guildTemplateFromRaw(guildTemplate: RawGuildTemplate): GuildTemplate;
|
53
|
-
guildTemplateToRaw(guildTemplate: GuildTemplate): RawGuildTemplate;
|
54
|
-
guildToRaw(guild: Guild): RawGuild;
|
55
|
-
integrationFromRaw(integration: RawIntegration): Integration;
|
56
|
-
integrationToRaw(integration: Integration): RawIntegration;
|
57
|
-
interactionFromRaw(interaction: RawInteraction): Interaction;
|
58
|
-
interactionMetadataFromRaw(interactionMetadata: RawMessageInteractionMetadata): MessageInteractionMetadata;
|
59
|
-
interactionMetadataToRaw(interactionMetadata: MessageInteractionMetadata): RawMessageInteractionMetadata;
|
60
|
-
interactionToRaw(interaction: Interaction): RawInteraction;
|
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
3
|
partialApplicationCommandToRaw(applicationCommand: Partial<ApplicationCommand>): Partial<RawApplicationCommand>;
|
68
|
-
presenceFromRaw(presence: RawPresenceUpdateEventFields): PresenceUpdateEventFields;
|
69
|
-
presenceToRaw(presence: PresenceUpdateEventFields): RawPresenceUpdateEventFields;
|
70
|
-
presenceUserFromRaw(user: Pick<RawUser, "id"> & Partial<RawUser>): Pick<User, "id"> & Partial<User>;
|
71
|
-
presenceUserToRaw(user: Pick<User, "id"> & Partial<User>): Pick<RawUser, "id"> & Partial<RawUser>;
|
72
|
-
pollFromRaw(poll: RawPoll): Poll;
|
73
|
-
pollToRaw(poll: Poll): RawPoll;
|
74
|
-
resolvedDataFromRaw(resolvedData: RawResolvedData): ResolvedData;
|
75
|
-
resolvedDataToRaw(resolvedData: ResolvedData): RawResolvedData;
|
76
|
-
roleFromRaw(role: RawRole): Role;
|
77
|
-
roleToRaw(role: Role): RawRole;
|
78
|
-
skuFromRaw(sku: RawSKU): SKU;
|
79
|
-
skuToRaw(sku: SKU): RawSKU;
|
80
|
-
stageInstanceFromRaw(stageInstance: RawStageInstance): StageInstance;
|
81
|
-
stageInstanceToRaw(stageInstance: StageInstance): RawStageInstance;
|
82
|
-
stickerFromRaw(sticker: RawSticker): Sticker;
|
83
|
-
stickerToRaw(sticker: Sticker): RawSticker;
|
84
|
-
teamFromRaw(team: RawTeam): Team;
|
85
|
-
teamToRaw(team: Team): RawTeam;
|
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
|
-
threadMemberFromRaw(threadMember: RawThreadMember): ThreadMember;
|
89
|
-
threadMemberToRaw(threadMember: ThreadMember): RawThreadMember;
|
90
|
-
userFromRaw(user: RawUser): User;
|
91
|
-
userToRaw(user: User): RawUser;
|
92
|
-
voiceStateFromRaw(voiceState: RawVoiceState): VoiceState;
|
93
|
-
voiceStateToRaw(voiceState: VoiceState): RawVoiceState;
|
94
|
-
webhookFromRaw(webhook: RawWebhook): Webhook;
|
95
|
-
webhookToRaw(webhook: Webhook): RawWebhook;
|
96
4
|
}
|