disgroove 2.2.6-dev.4de2c29 → 2.2.6-dev.fd02f21

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.
@@ -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";
@@ -29,7 +29,7 @@ import type { User, ApplicationRoleConnection, Connection } from "./types/user";
29
29
  import type { VoiceRegion, VoiceState } from "./types/voice";
30
30
  import type { Webhook } from "./types/webhook";
31
31
  import type { ClientOptions as WebSocketOptions } from "ws";
32
- import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessageTopLevelComponent } from "./types/message";
32
+ import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessageTopLevelComponent, MessagePin } from "./types/message";
33
33
  import type { Subscription } from "./types/subscription";
34
34
  import type { SoundboardSound } from "./types/soundboard";
35
35
  export interface GatewayOptions {
@@ -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: Array<OnboardingPrompt>;
600
- defaultChannelIDs: Array<snowflake>;
601
- enabled: boolean;
602
- mode: OnboardingMode;
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;
@@ -996,7 +998,13 @@ export declare class Client extends EventEmitter {
996
998
  user?: User;
997
999
  }>;
998
1000
  /** https://discord.com/developers/docs/resources/channel#get-pinned-messages */
999
- getPinnedMessages(channelID: snowflake): Promise<Array<Message>>;
1001
+ getPinnedMessages(channelID: snowflake, options: {
1002
+ before?: timestamp;
1003
+ limit?: number;
1004
+ }): Promise<{
1005
+ items: Array<MessagePin>;
1006
+ hasMore: boolean;
1007
+ }>;
1000
1008
  /** https://discord.com/developers/docs/resources/poll#get-answer-voters */
1001
1009
  getPollAnswerVoters(channelID: snowflake, messageID: snowflake, answerID: snowflake, options?: {
1002
1010
  after?: snowflake;
@@ -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.map((prompt) => ({
1146
+ prompts: options.prompts?.map((prompt) => ({
1147
1147
  id: prompt.id,
1148
1148
  type: prompt.type,
1149
1149
  options: prompt.options.map((promptOption) => ({
@@ -2205,9 +2205,17 @@ class Client extends node_events_1.default {
2205
2205
  };
2206
2206
  }
2207
2207
  /** https://discord.com/developers/docs/resources/channel#get-pinned-messages */
2208
- async getPinnedMessages(channelID) {
2209
- const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelPins(channelID));
2210
- return response.map((message) => transformers_1.Messages.messageFromRaw(message));
2208
+ async getPinnedMessages(channelID, options) {
2209
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelPins(channelID), {
2210
+ query: options,
2211
+ });
2212
+ return {
2213
+ items: response.items.map((item) => ({
2214
+ pinnetAt: item.pinnet_at,
2215
+ message: transformers_1.Messages.messageFromRaw(item.message),
2216
+ })),
2217
+ hasMore: response.has_more,
2218
+ };
2211
2219
  }
2212
2220
  /** https://discord.com/developers/docs/resources/poll#get-answer-voters */
2213
2221
  async getPollAnswerVoters(channelID, messageID, answerID, options) {
@@ -22,6 +22,7 @@ export declare enum ImageFormats {
22
22
  PNG = "png",
23
23
  WebP = "webp",
24
24
  GIF = "gif",
25
+ AVIF = "avif",
25
26
  Lottie = "json"
26
27
  }
27
28
  /** https://discord.com/developers/docs/reference#locales */
@@ -159,6 +160,12 @@ export declare enum ApplicationIntegrationTypes {
159
160
  GuildInstall = 0,
160
161
  UserInstall = 1
161
162
  }
163
+ /** https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status */
164
+ export declare enum ApplicationEventWebhookStatus {
165
+ Disabled = 1,
166
+ Enabled = 2,
167
+ DisabledByDiscord = 3
168
+ }
162
169
  /** https://discord.com/developers/docs/resources/application#application-object-application-flags */
163
170
  export declare enum ApplicationFlags {
164
171
  ApplicationAutoModerationRuleCreateBadge = 64,
@@ -398,7 +405,9 @@ export declare enum GuildFeatures {
398
405
  VanityURL = "VANITY_URL",
399
406
  Verified = "VERIFIED",
400
407
  VipRegions = "VIP_REGIONS",
401
- WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED"
408
+ WelcomeScreenEnabled = "WELCOME_SCREEN_ENABLED",
409
+ GuestsEnabled = "GUESTS_ENABLED",
410
+ EnhancedRoleColors = "ENHANCED_ROLE_COLORS"
402
411
  }
403
412
  /** https://discord.com/developers/docs/resources/guild#guild-object-mutable-guild-features */
404
413
  export declare enum MutableGuildFeatures {
@@ -502,6 +511,10 @@ export declare enum InviteTargetTypes {
502
511
  Stream = 1,
503
512
  EmbeddedApplication = 2
504
513
  }
514
+ /** https://discord.com/developers/docs/resources/invite#invite-object-guild-invite-flags */
515
+ export declare enum GuildInviteFlags {
516
+ IsGuestInvite = 1
517
+ }
505
518
  /** https://discord.com/developers/docs/resources/message#message-object-message-types */
506
519
  export declare enum MessageTypes {
507
520
  Default = 0,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InviteTypes = 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.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 = void 0;
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.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) {
@@ -29,6 +29,7 @@ var ImageFormats;
29
29
  ImageFormats["PNG"] = "png";
30
30
  ImageFormats["WebP"] = "webp";
31
31
  ImageFormats["GIF"] = "gif";
32
+ ImageFormats["AVIF"] = "avif";
32
33
  ImageFormats["Lottie"] = "json";
33
34
  })(ImageFormats || (exports.ImageFormats = ImageFormats = {}));
34
35
  /** https://discord.com/developers/docs/reference#locales */
@@ -179,6 +180,13 @@ var ApplicationIntegrationTypes;
179
180
  ApplicationIntegrationTypes[ApplicationIntegrationTypes["GuildInstall"] = 0] = "GuildInstall";
180
181
  ApplicationIntegrationTypes[ApplicationIntegrationTypes["UserInstall"] = 1] = "UserInstall";
181
182
  })(ApplicationIntegrationTypes || (exports.ApplicationIntegrationTypes = ApplicationIntegrationTypes = {}));
183
+ /** https://discord.com/developers/docs/resources/application#application-object-application-event-webhook-status */
184
+ var ApplicationEventWebhookStatus;
185
+ (function (ApplicationEventWebhookStatus) {
186
+ ApplicationEventWebhookStatus[ApplicationEventWebhookStatus["Disabled"] = 1] = "Disabled";
187
+ ApplicationEventWebhookStatus[ApplicationEventWebhookStatus["Enabled"] = 2] = "Enabled";
188
+ ApplicationEventWebhookStatus[ApplicationEventWebhookStatus["DisabledByDiscord"] = 3] = "DisabledByDiscord";
189
+ })(ApplicationEventWebhookStatus || (exports.ApplicationEventWebhookStatus = ApplicationEventWebhookStatus = {}));
182
190
  /** https://discord.com/developers/docs/resources/application#application-object-application-flags */
183
191
  var ApplicationFlags;
184
192
  (function (ApplicationFlags) {
@@ -440,6 +448,8 @@ var GuildFeatures;
440
448
  GuildFeatures["Verified"] = "VERIFIED";
441
449
  GuildFeatures["VipRegions"] = "VIP_REGIONS";
442
450
  GuildFeatures["WelcomeScreenEnabled"] = "WELCOME_SCREEN_ENABLED";
451
+ GuildFeatures["GuestsEnabled"] = "GUESTS_ENABLED";
452
+ GuildFeatures["EnhancedRoleColors"] = "ENHANCED_ROLE_COLORS";
443
453
  })(GuildFeatures || (exports.GuildFeatures = GuildFeatures = {}));
444
454
  /** https://discord.com/developers/docs/resources/guild#guild-object-mutable-guild-features */
445
455
  var MutableGuildFeatures;
@@ -557,6 +567,11 @@ var InviteTargetTypes;
557
567
  InviteTargetTypes[InviteTargetTypes["Stream"] = 1] = "Stream";
558
568
  InviteTargetTypes[InviteTargetTypes["EmbeddedApplication"] = 2] = "EmbeddedApplication";
559
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 = {}));
560
575
  /** https://discord.com/developers/docs/resources/message#message-object-message-types */
561
576
  var MessageTypes;
562
577
  (function (MessageTypes) {
@@ -55,8 +55,8 @@ export declare const channelMessageCrosspost: (channelID: snowflake, messageID:
55
55
  export declare const channelMessageReaction: (channelID: snowflake, messageID: snowflake, emoji: string, userID?: snowflake | "@me") => `channels/${string}/messages/${string}/reactions/${string}/${string}`;
56
56
  export declare const channelMessages: (channelID: snowflake) => `channels/${string}/messages`;
57
57
  export declare const channelPermission: (channelID: snowflake, overwriteID: snowflake) => `channels/${string}/permissions/${string}`;
58
- export declare const channelPin: (channelID: snowflake, messageID: snowflake) => `channels/${string}/pins/${string}`;
59
- export declare const channelPins: (channelID: snowflake) => `channels/${string}/pins`;
58
+ export declare const channelPin: (channelID: snowflake, messageID: snowflake) => `channels/${string}/messages/pins/${string}`;
59
+ export declare const channelPins: (channelID: snowflake) => `channels/${string}/messages/pins`;
60
60
  export declare const channelRecipient: (channelID: snowflake, userID: snowflake) => `channels/${string}/recipients/${string}`;
61
61
  export declare const channelThreads: (channelID: snowflake, archivedStatus: "public" | "private", joined: boolean) => `channels/${string}/threads/archived/private` | `channels/${string}/threads/archived/public`;
62
62
  export declare const channelTyping: (channelID: snowflake) => `channels/${string}/typing`;
@@ -119,9 +119,9 @@ const channelMessages = (channelID) => `channels/${channelID}/messages`;
119
119
  exports.channelMessages = channelMessages;
120
120
  const channelPermission = (channelID, overwriteID) => `channels/${channelID}/permissions/${overwriteID}`;
121
121
  exports.channelPermission = channelPermission;
122
- const channelPin = (channelID, messageID) => `channels/${channelID}/pins/${messageID}`;
122
+ const channelPin = (channelID, messageID) => `channels/${channelID}/messages/pins/${messageID}`;
123
123
  exports.channelPin = channelPin;
124
- const channelPins = (channelID) => `channels/${channelID}/pins`;
124
+ const channelPins = (channelID) => `channels/${channelID}/messages/pins`;
125
125
  exports.channelPins = channelPins;
126
126
  const channelRecipient = (channelID, userID) => `channels/${channelID}/recipients/${userID}`;
127
127
  exports.channelRecipient = channelRecipient;
@@ -31,9 +31,13 @@ class Applications {
31
31
  flags: application.flags,
32
32
  approximateGuildCount: application.approximate_guild_count,
33
33
  approximateUserInstallCount: application.approximate_user_install_count,
34
+ approximateUserAuthorizationCount: application.approximate_user_authorization_count,
34
35
  redirectURIs: application.redirect_uris,
35
36
  interactionsEndpointURL: application.interactions_endpoint_url,
36
37
  roleConnectionsVerificationURL: application.role_connections_verification_url,
38
+ eventWebhooksURL: application.event_webhooks_url,
39
+ eventWebhooksStatus: application.event_webhooks_status,
40
+ eventWebhooksTypes: application.event_webhooks_types,
37
41
  tags: application.tags,
38
42
  installParams: application.install_params,
39
43
  integrationTypesConfig: application.integration_types_config !== undefined
@@ -77,9 +81,13 @@ class Applications {
77
81
  flags: application.flags,
78
82
  approximate_guild_count: application.approximateGuildCount,
79
83
  approximate_user_install_count: application.approximateUserInstallCount,
84
+ approximate_user_authorization_count: application.approximateUserAuthorizationCount,
80
85
  redirect_uris: application.redirectURIs,
81
86
  interactions_endpoint_url: application.interactionsEndpointURL,
82
87
  role_connections_verification_url: application.roleConnectionsVerificationURL,
88
+ event_webhooks_url: application.eventWebhooksURL,
89
+ event_webhooks_status: application.eventWebhooksStatus,
90
+ event_webhooks_types: application.eventWebhooksTypes,
83
91
  tags: application.tags,
84
92
  install_params: application.installParams,
85
93
  integration_types_config: application.integrationTypesConfig !== undefined
@@ -141,6 +141,8 @@ class Components {
141
141
  id: file.id,
142
142
  file: Components.unfurledMediaItemFromRaw(file.file),
143
143
  spoiler: file.spoiler,
144
+ name: file.name,
145
+ size: file.size,
144
146
  };
145
147
  }
146
148
  static fileToRaw(file) {
@@ -149,6 +151,8 @@ class Components {
149
151
  id: file.id,
150
152
  file: Components.unfurledMediaItemToRaw(file.file),
151
153
  spoiler: file.spoiler,
154
+ name: file.name,
155
+ size: file.size,
152
156
  };
153
157
  }
154
158
  static mediaGalleryFromRaw(mediaGallery) {
@@ -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,
@@ -1,5 +1,7 @@
1
- import type { RawUser, User } from "../types/user";
1
+ import type { Nameplate, RawNameplate, RawUser, User } from "../types/user";
2
2
  export declare class Users {
3
+ static nameplateFromRaw(nameplate: RawNameplate): Nameplate;
4
+ static nameplateToRaw(nameplate: Nameplate): RawNameplate;
3
5
  static userFromRaw(user: RawUser): User;
4
6
  static userToRaw(user: User): RawUser;
5
7
  }
@@ -2,6 +2,22 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Users = void 0;
4
4
  class Users {
5
+ static nameplateFromRaw(nameplate) {
6
+ return {
7
+ skuID: nameplate.sku_id,
8
+ asset: nameplate.asset,
9
+ label: nameplate.label,
10
+ palette: nameplate.palette,
11
+ };
12
+ }
13
+ static nameplateToRaw(nameplate) {
14
+ return {
15
+ sku_id: nameplate.skuID,
16
+ asset: nameplate.asset,
17
+ label: nameplate.label,
18
+ palette: nameplate.palette,
19
+ };
20
+ }
5
21
  static userFromRaw(user) {
6
22
  return {
7
23
  id: user.id,
@@ -28,6 +44,25 @@ class Users {
28
44
  }
29
45
  : null
30
46
  : undefined,
47
+ collectibles: user.collectibles !== undefined
48
+ ? user.collectibles !== null
49
+ ? {
50
+ nameplate: user.collectibles.nameplate !== undefined
51
+ ? this.nameplateFromRaw(user.collectibles.nameplate)
52
+ : undefined,
53
+ }
54
+ : null
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,
31
66
  };
32
67
  }
33
68
  static userToRaw(user) {
@@ -56,6 +91,25 @@ class Users {
56
91
  }
57
92
  : null
58
93
  : undefined,
94
+ collectibles: user.collectibles !== undefined
95
+ ? user.collectibles !== null
96
+ ? {
97
+ nameplate: user.collectibles.nameplate !== undefined
98
+ ? this.nameplateToRaw(user.collectibles.nameplate)
99
+ : undefined,
100
+ }
101
+ : null
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,
59
113
  };
60
114
  }
61
115
  }
@@ -1,4 +1,4 @@
1
- import type { ActivityLocationKind, ApplicationFlags, ApplicationIntegrationTypes, OAuth2Scopes } from "../constants";
1
+ import type { ActivityLocationKind, ApplicationEventWebhookStatus, ApplicationFlags, ApplicationIntegrationTypes, OAuth2Scopes } from "../constants";
2
2
  import type { snowflake } from "./common";
3
3
  import type { RawGuild, Guild } from "./guild";
4
4
  import type { RawTeam, Team } from "./team";
@@ -25,9 +25,13 @@ export interface RawApplication {
25
25
  flags?: ApplicationFlags;
26
26
  approximate_guild_count?: number;
27
27
  approximate_user_install_count?: number;
28
+ approximate_user_authorization_count?: number;
28
29
  redirect_uris?: Array<string>;
29
30
  interactions_endpoint_url?: string;
30
31
  role_connections_verification_url?: string;
32
+ event_webhooks_url?: string | null;
33
+ event_webhooks_status: ApplicationEventWebhookStatus;
34
+ event_webhooks_types?: Array<string>;
31
35
  tags?: Array<string>;
32
36
  install_params?: RawInstallParams;
33
37
  integration_types_config?: Record<ApplicationIntegrationTypes, RawApplicationIntegrationTypeConfiguration>;
@@ -78,9 +82,13 @@ export interface Application {
78
82
  flags?: ApplicationFlags;
79
83
  approximateGuildCount?: number;
80
84
  approximateUserInstallCount?: number;
85
+ approximateUserAuthorizationCount?: number;
81
86
  redirectURIs?: Array<string>;
82
87
  interactionsEndpointURL?: string;
83
88
  roleConnectionsVerificationURL?: string;
89
+ eventWebhooksURL?: string | null;
90
+ eventWebhooksStatus: ApplicationEventWebhookStatus;
91
+ eventWebhooksTypes?: Array<string>;
84
92
  tags?: Array<string>;
85
93
  installParams?: InstallParams;
86
94
  integrationTypesConfig?: Record<ApplicationIntegrationTypes, ApplicationIntegrationTypeConfiguration>;
@@ -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;
@@ -27,6 +27,8 @@ export interface RawFile {
27
27
  id?: number;
28
28
  file: RawUnfurledMediaItem;
29
29
  spoiler?: boolean;
30
+ name: string;
31
+ size: number;
30
32
  }
31
33
  /** https://discord.com/developers/docs/components/reference#media-gallery-media-gallery-structure */
32
34
  export interface RawMediaGallery {
@@ -120,6 +122,7 @@ export interface RawUnfurledMediaItem {
120
122
  height?: number | null;
121
123
  width?: number | null;
122
124
  content_type?: string;
125
+ attachment_id?: snowflake;
123
126
  }
124
127
  export interface Button {
125
128
  type: ComponentTypes.Button;
@@ -144,6 +147,8 @@ export interface File {
144
147
  id?: number;
145
148
  file: UnfurledMediaItem;
146
149
  spoiler?: boolean;
150
+ name: string;
151
+ size: number;
147
152
  }
148
153
  export interface MediaGallery {
149
154
  type: ComponentTypes.MediaGallery;
@@ -225,4 +230,5 @@ export interface UnfurledMediaItem {
225
230
  height?: number | null;
226
231
  width?: number | null;
227
232
  contentType?: string;
233
+ attachmentID?: snowflake;
228
234
  }
@@ -197,6 +197,11 @@ export interface RawAllowedMentions {
197
197
  users?: Array<snowflake>;
198
198
  replied_user?: boolean;
199
199
  }
200
+ /** https://discord.com/developers/docs/resources/message#message-pin-object-message-pin-structure */
201
+ export interface RawMessagePin {
202
+ pinnet_at: timestamp;
203
+ message: RawMessage;
204
+ }
200
205
  export interface Message {
201
206
  id: snowflake;
202
207
  channelID: snowflake;
@@ -366,3 +371,7 @@ export interface AllowedMentions {
366
371
  users?: Array<snowflake>;
367
372
  repliedUser?: boolean;
368
373
  }
374
+ export interface MessagePin {
375
+ pinnetAt: timestamp;
376
+ message: Message;
377
+ }
@@ -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
+ }
@@ -21,12 +21,32 @@ export interface RawUser {
21
21
  premium_type?: PremiumTypes;
22
22
  public_flags?: UserFlags;
23
23
  avatar_decoration_data?: RawAvatarDecorationData | null;
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;
24
33
  }
25
34
  /** https://discord.com/developers/docs/resources/user#avatar-decoration-data-object-avatar-decoration-data-structure */
26
35
  export interface RawAvatarDecorationData {
27
36
  asset: string;
28
37
  sku_id: snowflake;
29
38
  }
39
+ /** https://discord.com/developers/docs/resources/user#collectibles-object-collectibles-structure */
40
+ export interface RawCollectibles {
41
+ nameplate?: RawNameplate;
42
+ }
43
+ /** https://discord.com/developers/docs/resources/user#nameplate-object-nameplate-structure */
44
+ export interface RawNameplate {
45
+ sku_id: snowflake;
46
+ asset: string;
47
+ label: string;
48
+ palette: string;
49
+ }
30
50
  /** https://discord.com/developers/docs/resources/user#connection-object-connection-structure */
31
51
  export interface RawConnection {
32
52
  id: snowflake;
@@ -64,11 +84,28 @@ export interface User {
64
84
  premiumType?: PremiumTypes;
65
85
  publicFlags?: UserFlags;
66
86
  avatarDecorationData?: AvatarDecorationData | null;
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;
67
95
  }
68
96
  export interface AvatarDecorationData {
69
97
  asset: string;
70
98
  skuID: snowflake;
71
99
  }
100
+ export interface Collectibles {
101
+ nameplate?: Nameplate;
102
+ }
103
+ export interface Nameplate {
104
+ skuID: snowflake;
105
+ asset: string;
106
+ label: string;
107
+ palette: string;
108
+ }
72
109
  export interface Connection {
73
110
  id: snowflake;
74
111
  name: string;
@@ -1,25 +1,26 @@
1
1
  import { ImageFormats } from "../constants";
2
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 soundboardSound: (soundID: snowflake) => `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 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`;
23
- 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`;
24
- 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`;
25
- 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`;
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}.avif` | `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}.avif` | `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}.avif` | `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}.avif` | `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}.avif` | `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}.avif` | `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}.avif` | `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}.avif` | `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}.avif` | `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}.avif` | `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}.avif` | `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}.avif` | `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}.avif` | `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}.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`;
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`;
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`;
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`;
21
+ 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}.avif` | `https://cdn.discordapp.com/${string}.json`;
22
+ export declare const soundboardSound: (soundID: snowflake) => `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`;
23
+ 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}.avif` | `https://cdn.discordapp.com/${string}.json`;
24
+ 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}.avif` | `https://cdn.discordapp.com/${string}.json`;
25
+ 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}.avif` | `https://cdn.discordapp.com/${string}.json`;
26
+ 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}.avif` | `https://cdn.discordapp.com/${string}.json`;
@@ -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-dev.4de2c29",
3
+ "version": "2.2.6-dev.fd02f21",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.2.6-dev.4de2c29",
3
+ "version": "2.2.6-dev.fd02f21",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",