disgroove 2.2.6-dev.b9cd00b → 2.2.6
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/dist/lib/Client.d.ts +7 -5
- package/dist/lib/Client.js +1 -1
- package/dist/lib/constants.d.ts +7 -1
- package/dist/lib/constants.js +8 -1
- package/dist/lib/transformers/Invites.js +2 -0
- package/dist/lib/transformers/Roles.js +10 -0
- package/dist/lib/transformers/Users.js +20 -0
- package/dist/lib/types/guild.d.ts +2 -2
- package/dist/lib/types/invite.d.ts +3 -1
- package/dist/lib/types/role.d.ts +13 -0
- package/dist/lib/types/user.d.ts +15 -0
- package/dist/lib/utils/CDN.d.ts +1 -0
- package/dist/lib/utils/CDN.js +3 -1
- package/dist/lib/utils/formatters.d.ts +4 -0
- package/dist/lib/utils/formatters.js +11 -1
- package/dist/package.json +6 -6
- package/package.json +6 -6
package/dist/lib/Client.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import type { GuildTemplate } from "./types/guild-template";
|
|
|
21
21
|
import type { Interaction, InteractionCallbackResponse, InteractionResponse } from "./types/interaction";
|
|
22
22
|
import type { Invite } from "./types/invite";
|
|
23
23
|
import type { PollCreateParams } from "./types/poll";
|
|
24
|
-
import type { Role } from "./types/role";
|
|
24
|
+
import type { Role, RoleColors } from "./types/role";
|
|
25
25
|
import type { SKU } from "./types/sku";
|
|
26
26
|
import type { StageInstance } from "./types/stage-instance";
|
|
27
27
|
import type { Sticker, StickerPack } from "./types/sticker";
|
|
@@ -262,6 +262,7 @@ export declare class Client extends EventEmitter {
|
|
|
262
262
|
name?: string;
|
|
263
263
|
permissions?: string;
|
|
264
264
|
color?: number;
|
|
265
|
+
colors?: RoleColors | null;
|
|
265
266
|
hoist?: boolean;
|
|
266
267
|
icon?: string | null;
|
|
267
268
|
unicodeEmoji?: string | null;
|
|
@@ -596,16 +597,17 @@ export declare class Client extends EventEmitter {
|
|
|
596
597
|
}, reason?: string): Promise<MFALevel>;
|
|
597
598
|
/** https://discord.com/developers/docs/resources/guild#modify-guild-onboarding */
|
|
598
599
|
editGuildOnboarding(guildID: snowflake, options: {
|
|
599
|
-
prompts
|
|
600
|
-
defaultChannelIDs
|
|
601
|
-
enabled
|
|
602
|
-
mode
|
|
600
|
+
prompts?: Array<OnboardingPrompt>;
|
|
601
|
+
defaultChannelIDs?: Array<snowflake>;
|
|
602
|
+
enabled?: boolean;
|
|
603
|
+
mode?: OnboardingMode;
|
|
603
604
|
}, reason?: string): void;
|
|
604
605
|
/** https://discord.com/developers/docs/resources/guild#modify-guild-role */
|
|
605
606
|
editGuildRole(guildID: snowflake, roleID: snowflake, options?: {
|
|
606
607
|
name?: string | null;
|
|
607
608
|
permissions?: string | null;
|
|
608
609
|
color?: number | null;
|
|
610
|
+
colors?: RoleColors | null;
|
|
609
611
|
hoist?: boolean | null;
|
|
610
612
|
icon?: string | null;
|
|
611
613
|
unicodeEmoji?: string | null;
|
package/dist/lib/Client.js
CHANGED
|
@@ -1143,7 +1143,7 @@ class Client extends node_events_1.default {
|
|
|
1143
1143
|
editGuildOnboarding(guildID, options, reason) {
|
|
1144
1144
|
this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.guildOnboarding(guildID), {
|
|
1145
1145
|
json: {
|
|
1146
|
-
prompts: options.prompts
|
|
1146
|
+
prompts: options.prompts?.map((prompt) => ({
|
|
1147
1147
|
id: prompt.id,
|
|
1148
1148
|
type: prompt.type,
|
|
1149
1149
|
options: prompt.options.map((promptOption) => ({
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -405,7 +405,9 @@ export declare enum GuildFeatures {
|
|
|
405
405
|
VanityURL = "VANITY_URL",
|
|
406
406
|
Verified = "VERIFIED",
|
|
407
407
|
VipRegions = "VIP_REGIONS",
|
|
408
|
-
WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED"
|
|
408
|
+
WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED",
|
|
409
|
+
GuestsEnabled = "GUESTS_ENABLED",
|
|
410
|
+
EnhancedRoleColors = "ENHANCED_ROLE_COLORS"
|
|
409
411
|
}
|
|
410
412
|
/** https://discord.com/developers/docs/resources/guild#guild-object-mutable-guild-features */
|
|
411
413
|
export declare enum MutableGuildFeatures {
|
|
@@ -509,6 +511,10 @@ export declare enum InviteTargetTypes {
|
|
|
509
511
|
Stream = 1,
|
|
510
512
|
EmbeddedApplication = 2
|
|
511
513
|
}
|
|
514
|
+
/** https://discord.com/developers/docs/resources/invite#invite-object-guild-invite-flags */
|
|
515
|
+
export declare enum GuildInviteFlags {
|
|
516
|
+
IsGuestInvite = 1
|
|
517
|
+
}
|
|
512
518
|
/** https://discord.com/developers/docs/resources/message#message-object-message-types */
|
|
513
519
|
export declare enum MessageTypes {
|
|
514
520
|
Default = 0,
|
package/dist/lib/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ActivityLocationKind = exports.ApplicationFlags = exports.ApplicationEventWebhookStatus = exports.ApplicationIntegrationTypes = exports.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.SeparatorSpacing = exports.ComponentTypes = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.EntryPointCommandHandlerTypes = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = exports.GuildNavigationTypes = exports.TimestampStyles = void 0;
|
|
4
|
-
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.SubscriptionStatuses = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.InviteTargetTypes = exports.InviteTypes = void 0;
|
|
4
|
+
exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.AnimationTypes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.SubscriptionStatuses = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = void 0;
|
|
5
5
|
/** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
|
|
6
6
|
var TimestampStyles;
|
|
7
7
|
(function (TimestampStyles) {
|
|
@@ -448,6 +448,8 @@ var GuildFeatures;
|
|
|
448
448
|
GuildFeatures["Verified"] = "VERIFIED";
|
|
449
449
|
GuildFeatures["VipRegions"] = "VIP_REGIONS";
|
|
450
450
|
GuildFeatures["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED";
|
|
451
|
+
GuildFeatures["GuestsEnabled"] = "GUESTS_ENABLED";
|
|
452
|
+
GuildFeatures["EnhancedRoleColors"] = "ENHANCED_ROLE_COLORS";
|
|
451
453
|
})(GuildFeatures || (exports.GuildFeatures = GuildFeatures = {}));
|
|
452
454
|
/** https://discord.com/developers/docs/resources/guild#guild-object-mutable-guild-features */
|
|
453
455
|
var MutableGuildFeatures;
|
|
@@ -565,6 +567,11 @@ var InviteTargetTypes;
|
|
|
565
567
|
InviteTargetTypes[InviteTargetTypes["Stream"] = 1] = "Stream";
|
|
566
568
|
InviteTargetTypes[InviteTargetTypes["EmbeddedApplication"] = 2] = "EmbeddedApplication";
|
|
567
569
|
})(InviteTargetTypes || (exports.InviteTargetTypes = InviteTargetTypes = {}));
|
|
570
|
+
/** https://discord.com/developers/docs/resources/invite#invite-object-guild-invite-flags */
|
|
571
|
+
var GuildInviteFlags;
|
|
572
|
+
(function (GuildInviteFlags) {
|
|
573
|
+
GuildInviteFlags[GuildInviteFlags["IsGuestInvite"] = 1] = "IsGuestInvite";
|
|
574
|
+
})(GuildInviteFlags || (exports.GuildInviteFlags = GuildInviteFlags = {}));
|
|
568
575
|
/** https://discord.com/developers/docs/resources/message#message-object-message-types */
|
|
569
576
|
var MessageTypes;
|
|
570
577
|
(function (MessageTypes) {
|
|
@@ -39,6 +39,7 @@ class Invites {
|
|
|
39
39
|
guildScheduledEvent: invite.guild_scheduled_event !== undefined
|
|
40
40
|
? GuildScheduledEvents_1.GuildScheduledEvents.guildScheduledEventFromRaw(invite.guild_scheduled_event)
|
|
41
41
|
: undefined,
|
|
42
|
+
flags: invite.flags,
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
static inviteToRaw(invite) {
|
|
@@ -73,6 +74,7 @@ class Invites {
|
|
|
73
74
|
guild_scheduled_event: invite.guildScheduledEvent !== undefined
|
|
74
75
|
? GuildScheduledEvents_1.GuildScheduledEvents.guildScheduledEventToRaw(invite.guildScheduledEvent)
|
|
75
76
|
: undefined,
|
|
77
|
+
flags: invite.flags,
|
|
76
78
|
};
|
|
77
79
|
}
|
|
78
80
|
}
|
|
@@ -7,6 +7,11 @@ class Roles {
|
|
|
7
7
|
id: role.id,
|
|
8
8
|
name: role.name,
|
|
9
9
|
color: role.color,
|
|
10
|
+
colors: {
|
|
11
|
+
primaryColor: role.colors.primary_color,
|
|
12
|
+
secondaryColor: role.colors.secondary_color,
|
|
13
|
+
tertiaryColors: role.colors.tertiary_colors,
|
|
14
|
+
},
|
|
10
15
|
hoist: role.hoist,
|
|
11
16
|
icon: role.icon,
|
|
12
17
|
unicodeEmoji: role.unicode_emoji,
|
|
@@ -32,6 +37,11 @@ class Roles {
|
|
|
32
37
|
id: role.id,
|
|
33
38
|
name: role.name,
|
|
34
39
|
color: role.color,
|
|
40
|
+
colors: {
|
|
41
|
+
primary_color: role.colors.primaryColor,
|
|
42
|
+
secondary_color: role.colors.secondaryColor,
|
|
43
|
+
tertiary_colors: role.colors.tertiaryColors,
|
|
44
|
+
},
|
|
35
45
|
hoist: role.hoist,
|
|
36
46
|
icon: role.icon,
|
|
37
47
|
unicode_emoji: role.unicodeEmoji,
|
|
@@ -53,6 +53,16 @@ class Users {
|
|
|
53
53
|
}
|
|
54
54
|
: null
|
|
55
55
|
: undefined,
|
|
56
|
+
primaryGuild: user.primary_guild !== undefined
|
|
57
|
+
? user.primary_guild !== null
|
|
58
|
+
? {
|
|
59
|
+
identityGuildID: user.primary_guild.identity_guild_id,
|
|
60
|
+
identityEnabled: user.primary_guild.identity_enabled,
|
|
61
|
+
tag: user.primary_guild.tag,
|
|
62
|
+
badge: user.primary_guild.badge,
|
|
63
|
+
}
|
|
64
|
+
: null
|
|
65
|
+
: undefined,
|
|
56
66
|
};
|
|
57
67
|
}
|
|
58
68
|
static userToRaw(user) {
|
|
@@ -90,6 +100,16 @@ class Users {
|
|
|
90
100
|
}
|
|
91
101
|
: null
|
|
92
102
|
: undefined,
|
|
103
|
+
primary_guild: user.primaryGuild !== undefined
|
|
104
|
+
? user.primaryGuild !== null
|
|
105
|
+
? {
|
|
106
|
+
identity_guild_id: user.primaryGuild.identityGuildID,
|
|
107
|
+
identity_enabled: user.primaryGuild.identityEnabled,
|
|
108
|
+
tag: user.primaryGuild.tag,
|
|
109
|
+
badge: user.primaryGuild.badge,
|
|
110
|
+
}
|
|
111
|
+
: null
|
|
112
|
+
: undefined,
|
|
93
113
|
};
|
|
94
114
|
}
|
|
95
115
|
}
|
|
@@ -92,7 +92,7 @@ export interface RawGuildMember {
|
|
|
92
92
|
avatar?: string | null;
|
|
93
93
|
banner?: string | null;
|
|
94
94
|
roles: Array<snowflake>;
|
|
95
|
-
joined_at: timestamp;
|
|
95
|
+
joined_at: timestamp | null;
|
|
96
96
|
premium_since?: number | null;
|
|
97
97
|
deaf: boolean;
|
|
98
98
|
mute: boolean;
|
|
@@ -269,7 +269,7 @@ export interface GuildMember {
|
|
|
269
269
|
avatar?: string | null;
|
|
270
270
|
banner?: string | null;
|
|
271
271
|
roles: Array<snowflake>;
|
|
272
|
-
joinedAt: string;
|
|
272
|
+
joinedAt: string | null;
|
|
273
273
|
premiumSince?: number | null;
|
|
274
274
|
deaf: boolean;
|
|
275
275
|
mute: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InviteTargetTypes, InviteTypes } from "../constants";
|
|
1
|
+
import type { GuildInviteFlags, InviteTargetTypes, InviteTypes } from "../constants";
|
|
2
2
|
import type { RawApplication, Application } from "./application";
|
|
3
3
|
import type { RawChannel, Channel } from "./channel";
|
|
4
4
|
import type { timestamp } from "./common";
|
|
@@ -20,6 +20,7 @@ export interface RawInvite {
|
|
|
20
20
|
expires_at?: timestamp | null;
|
|
21
21
|
stage_instance?: RawInviteStageInstance;
|
|
22
22
|
guild_scheduled_event?: RawGuildScheduledEvent;
|
|
23
|
+
flags?: GuildInviteFlags;
|
|
23
24
|
}
|
|
24
25
|
/** https://discord.com/developers/docs/resources/invite#invite-metadata-object-invite-metadata-structure */
|
|
25
26
|
export interface RawInviteMetadata {
|
|
@@ -50,6 +51,7 @@ export interface Invite {
|
|
|
50
51
|
expiresAt?: timestamp | null;
|
|
51
52
|
stageInstance?: InviteStageInstance;
|
|
52
53
|
guildScheduledEvent?: GuildScheduledEvent;
|
|
54
|
+
flags?: GuildInviteFlags;
|
|
53
55
|
}
|
|
54
56
|
export interface InviteMetadata {
|
|
55
57
|
uses: number;
|
package/dist/lib/types/role.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface RawRole {
|
|
|
5
5
|
id: snowflake;
|
|
6
6
|
name: string;
|
|
7
7
|
color: number;
|
|
8
|
+
colors: RawRoleColors;
|
|
8
9
|
hoist: boolean;
|
|
9
10
|
icon?: string | null;
|
|
10
11
|
unicode_emoji?: string | null;
|
|
@@ -24,10 +25,17 @@ export interface RawRoleTags {
|
|
|
24
25
|
available_for_purchase?: null;
|
|
25
26
|
guild_connections?: null;
|
|
26
27
|
}
|
|
28
|
+
/** https://discord.com/developers/docs/topics/permissions#role-object-role-colors-object */
|
|
29
|
+
export interface RawRoleColors {
|
|
30
|
+
primary_color: number;
|
|
31
|
+
secondary_color: number | null;
|
|
32
|
+
tertiary_colors: number | null;
|
|
33
|
+
}
|
|
27
34
|
export interface Role {
|
|
28
35
|
id: snowflake;
|
|
29
36
|
name: string;
|
|
30
37
|
color: number;
|
|
38
|
+
colors: RoleColors;
|
|
31
39
|
hoist: boolean;
|
|
32
40
|
icon?: string | null;
|
|
33
41
|
unicodeEmoji?: string | null;
|
|
@@ -46,3 +54,8 @@ export interface RoleTags {
|
|
|
46
54
|
availableForPurchase?: null;
|
|
47
55
|
guildConnections?: null;
|
|
48
56
|
}
|
|
57
|
+
export interface RoleColors {
|
|
58
|
+
primaryColor: number;
|
|
59
|
+
secondaryColor: number | null;
|
|
60
|
+
tertiaryColors: number | null;
|
|
61
|
+
}
|
package/dist/lib/types/user.d.ts
CHANGED
|
@@ -22,6 +22,14 @@ export interface RawUser {
|
|
|
22
22
|
public_flags?: UserFlags;
|
|
23
23
|
avatar_decoration_data?: RawAvatarDecorationData | null;
|
|
24
24
|
collectibles?: RawCollectibles | null;
|
|
25
|
+
primary_guild?: RawUserPrimaryGuild | null;
|
|
26
|
+
}
|
|
27
|
+
/** https://discord.com/developers/docs/resources/user#user-object-user-primary-guild */
|
|
28
|
+
export interface RawUserPrimaryGuild {
|
|
29
|
+
identity_guild_id: snowflake | null;
|
|
30
|
+
identity_enabled: boolean | null;
|
|
31
|
+
tag: string | null;
|
|
32
|
+
badge: string | null;
|
|
25
33
|
}
|
|
26
34
|
/** https://discord.com/developers/docs/resources/user#avatar-decoration-data-object-avatar-decoration-data-structure */
|
|
27
35
|
export interface RawAvatarDecorationData {
|
|
@@ -77,6 +85,13 @@ export interface User {
|
|
|
77
85
|
publicFlags?: UserFlags;
|
|
78
86
|
avatarDecorationData?: AvatarDecorationData | null;
|
|
79
87
|
collectibles?: Collectibles | null;
|
|
88
|
+
primaryGuild?: UserPrimaryGuild | null;
|
|
89
|
+
}
|
|
90
|
+
export interface UserPrimaryGuild {
|
|
91
|
+
identityGuildID: snowflake | null;
|
|
92
|
+
identityEnabled: boolean | null;
|
|
93
|
+
tag: string | null;
|
|
94
|
+
badge: string | null;
|
|
80
95
|
}
|
|
81
96
|
export interface AvatarDecorationData {
|
|
82
97
|
asset: string;
|
package/dist/lib/utils/CDN.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export declare const guildMemberAvatar: (guildID: snowflake, userID: snowflake,
|
|
|
14
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}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
15
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}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
16
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}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
17
|
+
export declare const guildTagBadge: (guildID: snowflake, hash: 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}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
17
18
|
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}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
18
19
|
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}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
|
19
20
|
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}.avif` | `https://cdn.discordapp.com/${string}.json`;
|
package/dist/lib/utils/CDN.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/* https://discord.com/developers/docs/reference#image-formatting */
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.userBanner = exports.userAvatarDecoration = exports.userAvatar = exports.teamIcon = exports.soundboardSound = 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;
|
|
4
|
+
exports.userBanner = exports.userAvatarDecoration = exports.userAvatar = exports.teamIcon = exports.soundboardSound = exports.storePageAsset = exports.sticker = exports.stickerPackBanner = exports.roleIcon = exports.guildTagBadge = 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
5
|
const constants_1 = require("../constants");
|
|
6
6
|
const cdnURL = (cdnEndpoint, imageFormat = constants_1.ImageFormats.PNG) => `https://cdn.discordapp.com/${cdnEndpoint}.${imageFormat}`;
|
|
7
7
|
exports.cdnURL = cdnURL;
|
|
@@ -31,6 +31,8 @@ const guildScheduledEventCover = (scheduledEventID, coverImage, imageFormat = co
|
|
|
31
31
|
exports.guildScheduledEventCover = guildScheduledEventCover;
|
|
32
32
|
const guildSplash = (guildID, splash, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`splashes/${guildID}/${splash}`, imageFormat);
|
|
33
33
|
exports.guildSplash = guildSplash;
|
|
34
|
+
const guildTagBadge = (guildID, hash, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`guild-tag-badges/${guildID}/${hash}`, imageFormat);
|
|
35
|
+
exports.guildTagBadge = guildTagBadge;
|
|
34
36
|
const roleIcon = (roleID, icon, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`role-icons/${roleID}/${icon}`, imageFormat);
|
|
35
37
|
exports.roleIcon = roleIcon;
|
|
36
38
|
const stickerPackBanner = (assetID, imageFormat = constants_1.ImageFormats.PNG) => (0, exports.cdnURL)(`app-assets/710982414301790216/store/${assetID}`, imageFormat);
|
|
@@ -14,3 +14,7 @@ export declare function customEmoji(emojiName: string, emojiID: snowflake, anima
|
|
|
14
14
|
export declare function unixTimestamp(time: number, style?: TimestampStyles): string;
|
|
15
15
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
16
16
|
export declare function guildNavigation(guildID: snowflake, type: GuildNavigationTypes, roleID?: snowflake): string;
|
|
17
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
18
|
+
export declare function email(username: string, domain: string): string;
|
|
19
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
20
|
+
export declare function phoneNumber(number: number): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.guildNavigation = exports.unixTimestamp = exports.customEmoji = exports.slashCommandMention = exports.roleMention = exports.channelMention = exports.userMention = void 0;
|
|
3
|
+
exports.phoneNumber = exports.email = exports.guildNavigation = exports.unixTimestamp = exports.customEmoji = exports.slashCommandMention = exports.roleMention = exports.channelMention = exports.userMention = void 0;
|
|
4
4
|
const constants_1 = require("../constants");
|
|
5
5
|
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
6
6
|
function userMention(userID) {
|
|
@@ -45,3 +45,13 @@ function guildNavigation(guildID, type, roleID) {
|
|
|
45
45
|
: `<${guildID}:${type}>`;
|
|
46
46
|
}
|
|
47
47
|
exports.guildNavigation = guildNavigation;
|
|
48
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
49
|
+
function email(username, domain) {
|
|
50
|
+
return `<${username}:${domain}>`;
|
|
51
|
+
}
|
|
52
|
+
exports.email = email;
|
|
53
|
+
/** https://discord.com/developers/docs/reference#message-formatting-formats */
|
|
54
|
+
function phoneNumber(number) {
|
|
55
|
+
return `<+${phoneNumber}>`;
|
|
56
|
+
}
|
|
57
|
+
exports.phoneNumber = phoneNumber;
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "2.2.6
|
|
3
|
+
"version": "2.2.6",
|
|
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,12 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/sergiogotuzzo/disgroove#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^22.
|
|
29
|
-
"@types/ws": "^8.18.
|
|
30
|
-
"typescript": "^5.8.
|
|
31
|
-
"undici-types": "^7.
|
|
28
|
+
"@types/node": "^22.16.3",
|
|
29
|
+
"@types/ws": "^8.18.1",
|
|
30
|
+
"typescript": "^5.8.3",
|
|
31
|
+
"undici-types": "^7.11.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"ws": "^8.18.
|
|
34
|
+
"ws": "^8.18.3"
|
|
35
35
|
}
|
|
36
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "disgroove",
|
|
3
|
-
"version": "2.2.6
|
|
3
|
+
"version": "2.2.6",
|
|
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,12 +25,12 @@
|
|
|
25
25
|
},
|
|
26
26
|
"homepage": "https://github.com/sergiogotuzzo/disgroove#readme",
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@types/node": "^22.
|
|
29
|
-
"@types/ws": "^8.18.
|
|
30
|
-
"typescript": "^5.8.
|
|
31
|
-
"undici-types": "^7.
|
|
28
|
+
"@types/node": "^22.16.3",
|
|
29
|
+
"@types/ws": "^8.18.1",
|
|
30
|
+
"typescript": "^5.8.3",
|
|
31
|
+
"undici-types": "^7.11.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"ws": "^8.18.
|
|
34
|
+
"ws": "^8.18.3"
|
|
35
35
|
}
|
|
36
36
|
}
|