disgroove 2.2.2-dev.db6cb16 → 2.2.3-dev.4f98e3d
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 +116 -126
- package/dist/lib/Client.js +360 -267
- 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/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 +21 -8
- 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/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,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,62 @@
|
|
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
|
+
avatarDecorationData: user.avatar_decoration_data !== undefined
|
24
|
+
? user.avatar_decoration_data !== null
|
25
|
+
? {
|
26
|
+
asset: user.avatar_decoration_data.asset,
|
27
|
+
skuID: user.avatar_decoration_data.sku_id,
|
28
|
+
}
|
29
|
+
: null
|
30
|
+
: undefined,
|
31
|
+
};
|
32
|
+
}
|
33
|
+
static userToRaw(user) {
|
34
|
+
return {
|
35
|
+
id: user.id,
|
36
|
+
username: user.username,
|
37
|
+
discriminator: user.discriminator,
|
38
|
+
global_name: user.globalName,
|
39
|
+
avatar: user.avatar,
|
40
|
+
bot: user.bot,
|
41
|
+
system: user.system,
|
42
|
+
mfa_enabled: user.mfaEnabled,
|
43
|
+
banner: user.banner,
|
44
|
+
accent_color: user.accentColor,
|
45
|
+
locale: user.locale,
|
46
|
+
verified: user.verified,
|
47
|
+
email: user.email,
|
48
|
+
flags: user.flags,
|
49
|
+
premium_type: user.premiumType,
|
50
|
+
public_flags: user.publicFlags,
|
51
|
+
avatar_decoration_data: user.avatarDecorationData !== undefined
|
52
|
+
? user.avatarDecorationData !== null
|
53
|
+
? {
|
54
|
+
asset: user.avatarDecorationData.asset,
|
55
|
+
sku_id: user.avatarDecorationData.skuID,
|
56
|
+
}
|
57
|
+
: null
|
58
|
+
: undefined,
|
59
|
+
};
|
60
|
+
}
|
61
|
+
}
|
62
|
+
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,23 @@
|
|
1
|
+
export * from "./ApplicationCommands";
|
2
|
+
export * from "./ApplicationRoleConnectionMetadatas";
|
3
|
+
export * from "./Applications";
|
4
|
+
export * from "./AuditLogs";
|
5
|
+
export * from "./AutoModeration";
|
6
|
+
export * from "./Channels";
|
7
|
+
export * from "./Emojis";
|
8
|
+
export * from "./Entitlements";
|
9
|
+
export * from "./Guilds";
|
10
|
+
export * from "./GuildScheduledEvents";
|
11
|
+
export * from "./GuildTemplates";
|
12
|
+
export * from "./Interactions";
|
13
|
+
export * from "./Invites";
|
14
|
+
export * from "./Polls";
|
15
|
+
export * from "./Presences";
|
16
|
+
export * from "./Roles";
|
17
|
+
export * from "./SKUs";
|
18
|
+
export * from "./StageInstances";
|
19
|
+
export * from "./Stickers";
|
20
|
+
export * from "./Teams";
|
21
|
+
export * from "./Users";
|
22
|
+
export * from "./Voice";
|
23
|
+
export * from "./Webhooks";
|
@@ -0,0 +1,39 @@
|
|
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("./ApplicationCommands"), exports);
|
18
|
+
__exportStar(require("./ApplicationRoleConnectionMetadatas"), exports);
|
19
|
+
__exportStar(require("./Applications"), exports);
|
20
|
+
__exportStar(require("./AuditLogs"), exports);
|
21
|
+
__exportStar(require("./AutoModeration"), exports);
|
22
|
+
__exportStar(require("./Channels"), exports);
|
23
|
+
__exportStar(require("./Emojis"), exports);
|
24
|
+
__exportStar(require("./Entitlements"), exports);
|
25
|
+
__exportStar(require("./Guilds"), exports);
|
26
|
+
__exportStar(require("./GuildScheduledEvents"), exports);
|
27
|
+
__exportStar(require("./GuildTemplates"), exports);
|
28
|
+
__exportStar(require("./Interactions"), exports);
|
29
|
+
__exportStar(require("./Invites"), exports);
|
30
|
+
__exportStar(require("./Polls"), exports);
|
31
|
+
__exportStar(require("./Presences"), exports);
|
32
|
+
__exportStar(require("./Roles"), exports);
|
33
|
+
__exportStar(require("./SKUs"), exports);
|
34
|
+
__exportStar(require("./StageInstances"), exports);
|
35
|
+
__exportStar(require("./Stickers"), exports);
|
36
|
+
__exportStar(require("./Teams"), exports);
|
37
|
+
__exportStar(require("./Users"), exports);
|
38
|
+
__exportStar(require("./Voice"), exports);
|
39
|
+
__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
|
}
|
@@ -23,7 +23,7 @@ export interface RawIdentify {
|
|
23
23
|
compress?: boolean;
|
24
24
|
large_threshold?: number;
|
25
25
|
shard?: [number, number];
|
26
|
-
presence?: RawGatewayPresenceUpdate
|
26
|
+
presence?: Partial<Pick<RawGatewayPresenceUpdate, "since" | "activities" | "status" | "afk">>;
|
27
27
|
intents: GatewayIntents;
|
28
28
|
}
|
29
29
|
/** https://discord.com/developers/docs/topics/gateway-events#identify-identify-connection-properties */
|
@@ -50,7 +50,7 @@ export interface RawRequestGuildMembers {
|
|
50
50
|
/** https://discord.com/developers/docs/topics/gateway-events#update-presence-gateway-presence-update-structure */
|
51
51
|
export interface RawGatewayPresenceUpdate {
|
52
52
|
since: number | null;
|
53
|
-
activities: Array<Pick<RawActivity, "name" | "type" | "url" | "state"
|
53
|
+
activities: Array<Partial<Pick<RawActivity, "name" | "type" | "url" | "state">>>;
|
54
54
|
status: StatusTypes;
|
55
55
|
afk: boolean;
|
56
56
|
}
|
@@ -258,7 +258,7 @@ export interface RawMessageReactionRemoveEmojiEventFields {
|
|
258
258
|
}
|
259
259
|
/** https://discord.com/developers/docs/topics/gateway-events#presence-update-presence-update-event-fields */
|
260
260
|
export interface RawPresenceUpdateEventFields {
|
261
|
-
user: RawUser
|
261
|
+
user: Pick<RawUser, "id"> & Partial<RawUser>;
|
262
262
|
guild_id: snowflake;
|
263
263
|
status: StatusTypes;
|
264
264
|
activities: Array<RawActivity>;
|
@@ -275,11 +275,12 @@ export interface RawActivity {
|
|
275
275
|
name: string;
|
276
276
|
type: ActivityType;
|
277
277
|
url?: string | null;
|
278
|
-
created_at:
|
278
|
+
created_at: number;
|
279
279
|
timestamps?: RawActivityTimestamps;
|
280
280
|
application_id?: snowflake;
|
281
281
|
details?: string | null;
|
282
282
|
state?: string | null;
|
283
|
+
emoji?: RawActivityEmoji | null;
|
283
284
|
party?: RawActivityParty;
|
284
285
|
assets?: RawActivityAssets;
|
285
286
|
secrets?: RawActivitySecrets;
|
@@ -292,6 +293,12 @@ export interface RawActivityTimestamps {
|
|
292
293
|
start?: number;
|
293
294
|
end?: number;
|
294
295
|
}
|
296
|
+
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-emoji */
|
297
|
+
export interface RawActivityEmoji {
|
298
|
+
name: string;
|
299
|
+
id?: snowflake;
|
300
|
+
animated?: boolean;
|
301
|
+
}
|
295
302
|
/** https://discord.com/developers/docs/topics/gateway-events#activity-object-activity-party */
|
296
303
|
export interface RawActivityParty {
|
297
304
|
id?: string;
|
@@ -357,7 +364,7 @@ export interface Identify {
|
|
357
364
|
compress?: boolean;
|
358
365
|
largeThreshold?: number;
|
359
366
|
shard?: [number, number];
|
360
|
-
presence?: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>;
|
367
|
+
presence?: Partial<Pick<GatewayPresenceUpdate, "since" | "activities" | "status" | "afk">>;
|
361
368
|
intents: GatewayIntents;
|
362
369
|
}
|
363
370
|
export interface IdentifyConnectionProperties {
|
@@ -380,7 +387,7 @@ export interface RequestGuildMembers {
|
|
380
387
|
}
|
381
388
|
export interface GatewayPresenceUpdate {
|
382
389
|
since: number | null;
|
383
|
-
activities: Array<Pick<Activity, "name" | "type" | "url" | "state"
|
390
|
+
activities: Array<Partial<Pick<Activity, "name" | "type" | "url" | "state">>>;
|
384
391
|
status: StatusTypes;
|
385
392
|
afk: boolean;
|
386
393
|
}
|
@@ -560,7 +567,7 @@ export interface MessageReactionRemoveEmojiEventFields {
|
|
560
567
|
emoji: Emoji;
|
561
568
|
}
|
562
569
|
export interface PresenceUpdateEventFields {
|
563
|
-
user: User
|
570
|
+
user: Pick<User, "id"> & Partial<User>;
|
564
571
|
guildID: snowflake;
|
565
572
|
status: StatusTypes;
|
566
573
|
activities: Array<Activity>;
|
@@ -575,11 +582,12 @@ export interface Activity {
|
|
575
582
|
name: string;
|
576
583
|
type: ActivityType;
|
577
584
|
url?: string | null;
|
578
|
-
createdAt:
|
585
|
+
createdAt: number;
|
579
586
|
timestamps?: ActivityTimestamps;
|
580
587
|
applicationID?: snowflake;
|
581
588
|
details?: string | null;
|
582
589
|
state?: string | null;
|
590
|
+
emoji?: ActivityEmoji | null;
|
583
591
|
party?: ActivityParty;
|
584
592
|
assets?: ActivityAssets;
|
585
593
|
secrets?: ActivitySecrets;
|
@@ -591,6 +599,11 @@ export interface ActivityTimestamps {
|
|
591
599
|
start?: number;
|
592
600
|
end?: number;
|
593
601
|
}
|
602
|
+
export interface ActivityEmoji {
|
603
|
+
name: string;
|
604
|
+
id?: snowflake;
|
605
|
+
animated?: boolean;
|
606
|
+
}
|
594
607
|
export interface ActivityParty {
|
595
608
|
id?: string;
|
596
609
|
size?: Array<number>;
|
@@ -4,7 +4,7 @@ import type { snowflake, timestamp } from "./common";
|
|
4
4
|
import type { RawEmoji, Emoji } from "./emoji";
|
5
5
|
import type { RawRole, Role } from "./role";
|
6
6
|
import type { RawSticker, Sticker } from "./sticker";
|
7
|
-
import type { RawUser, User } from "./user";
|
7
|
+
import type { AvatarDecorationData, RawAvatarDecorationData, RawUser, User } from "./user";
|
8
8
|
/** https://discord.com/developers/docs/resources/guild#guild-object-guild-structure */
|
9
9
|
export interface RawGuild {
|
10
10
|
id: snowflake;
|
@@ -98,6 +98,7 @@ export interface RawGuildMember {
|
|
98
98
|
pending?: boolean;
|
99
99
|
permissions?: string;
|
100
100
|
communication_disabled_until?: number | null;
|
101
|
+
avatar_decoration_data?: RawAvatarDecorationData | null;
|
101
102
|
}
|
102
103
|
/** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
|
103
104
|
export interface RawIntegration {
|
@@ -265,6 +266,7 @@ export interface GuildMember {
|
|
265
266
|
pending?: boolean;
|
266
267
|
permissions?: string;
|
267
268
|
communicationDisabledUntil?: number | null;
|
269
|
+
avatarDecorationData?: AvatarDecorationData | null;
|
268
270
|
}
|
269
271
|
export interface Integration {
|
270
272
|
id: snowflake;
|
@@ -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
|
}
|
package/dist/lib/types/user.d.ts
CHANGED
@@ -20,7 +20,7 @@ export interface RawUser {
|
|
20
20
|
flags?: UserFlags;
|
21
21
|
premium_type?: PremiumTypes;
|
22
22
|
public_flags?: UserFlags;
|
23
|
-
|
23
|
+
avatar_decoration_data?: RawAvatarDecorationData | null;
|
24
24
|
}
|
25
25
|
/** https://discord.com/developers/docs/resources/user#avatar-decoration-data-object-avatar-decoration-data-structure */
|
26
26
|
export interface RawAvatarDecorationData {
|
@@ -63,7 +63,7 @@ export interface User {
|
|
63
63
|
flags?: UserFlags;
|
64
64
|
premiumType?: PremiumTypes;
|
65
65
|
publicFlags?: UserFlags;
|
66
|
-
|
66
|
+
avatarDecorationData?: AvatarDecorationData | null;
|
67
67
|
}
|
68
68
|
export interface AvatarDecorationData {
|
69
69
|
asset: string;
|
@@ -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;
|