disgroove 3.0.1-dev.24a02ed → 3.0.1-dev.59674f9

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 CHANGED
@@ -1,14 +1,42 @@
1
1
  # disgroove
2
2
 
3
- A module to interface with Discord
3
+ > A lightweight (≈ **791 KB** unpacked) and low-level Node.js dependency for interfacing with Discord, focused on accuracy and flexibility.
4
+ > It is designed for developers who want full control over the Discord API without heavy abstractions and want as little RAM and CPU usage as possible.
4
5
 
5
- - Fast
6
- - Lightweight
7
- - Flexible
8
- - 100% coverage of the [Official Discord API Documentation](https://discord.com/developers/docs/intro)
6
+ > **disgroove** is intended for developers already familiar with the Discord API and gateway model.
9
7
 
10
- ## Example
8
+ ## Why disgroove?
9
+
10
+ ### ✅ Accurate with the official Discord API
11
+
12
+ All commits (since __July 3, 2024__), types, REST requests, and utilities strictly follow the [official Discord API documentation repository](https://github.com/discord/discord-api-docs) and are referenced to the [Discord API developer docs](https://docs.discord.com/developers/intro).
13
+
14
+ Development releases are mainly published when breaking changes are introduced in the Discord API.
15
+
16
+ ---
17
+
18
+ ### 🧠 Minimal caching
19
+
20
+ **disgroove** only caches guilds.
21
+
22
+ Guilds are mapped from the `READY` gateway event and kept in sync through
23
+ `GUILD_CREATE`, `GUILD_UPDATE` and `GUILD_DELETE` gateway events.
24
+
25
+ This design significantly decreases RAM and CPU usage and keeps the library lightweight.
11
26
 
27
+ ---
28
+
29
+ ### 🔧 Highly flexible and low-level
30
+
31
+ **disgroove** doesn't hide Discord features behind abstractions.
32
+
33
+ Every REST request is built directly on top of the [Discord API developer docs](https://docs.discord.com/developers/intro), with no changes.
34
+
35
+ You can listen to any gateway event directly using `Shard.ws.on(...)` and perform raw REST requests using `Client.rest.request(...)`
36
+
37
+ This allows you to use new Discord features immediately, even before a dedicated **disgroove** update is released.
38
+
39
+ ## Example
12
40
  ```js
13
41
  const {
14
42
  Client,
@@ -17,7 +45,7 @@ const {
17
45
  InteractionCallbackType,
18
46
  MessageFlags,
19
47
  } = require("disgroove");
20
- const client = new Client("B0t.T0k3N");
48
+ const client = new Client(process.env.TOKEN);
21
49
 
22
50
  client.once("ready", () => {
23
51
  console.log("Logged in as", client.user.username);
@@ -28,7 +56,7 @@ client.once("ready", () => {
28
56
  });
29
57
  });
30
58
 
31
- client.on("interactionCreate", async (interaction) => {
59
+ client.on("interactionCreate", (interaction) => {
32
60
  if (interaction.type !== InteractionType.ApplicationCommand) return;
33
61
 
34
62
  if (interaction.data.name === "ping") {
@@ -46,3 +74,5 @@ client.connect();
46
74
  ```
47
75
 
48
76
  More examples on the [GitHub repository](https://github.com/sergiogotuzzo/disgroove/tree/main/examples)
77
+
78
+ > Enjoy **disgroove**? Leave a ⭐ to this repository!
@@ -1,4 +1,4 @@
1
- import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, type ReactionTypes, type ApplicationCommandTypes, type EventTypes, type TriggerTypes, type ChannelTypes, type VideoQualityModes, type SortOrderTypes, type ForumLayoutTypes, type InviteTargetTypes, type VerificationLevel, type DefaultMessageNotificationLevel, type ExplicitContentFilterLevel, type SystemChannelFlags, type ApplicationFlags, type ApplicationIntegrationTypes, type ChannelFlags, type GuildFeatures, type GuildScheduledEventEntityTypes, type GuildScheduledEventPrivacyLevel, type GuildScheduledEventStatus, type MessageFlags, type OnboardingMode, type PrivacyLevel, type GuildMemberFlags, type InteractionContextTypes, type LobbyMemberFlags, InviteTargetUsersJobStatusErrorCodes } from "./constants";
1
+ import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, type ReactionTypes, type ApplicationCommandTypes, type EventTypes, type TriggerTypes, type ChannelTypes, type VideoQualityModes, type SortOrderTypes, type ForumLayoutTypes, type InviteTargetTypes, type VerificationLevel, type DefaultMessageNotificationLevel, type ExplicitContentFilterLevel, type SystemChannelFlags, type ApplicationFlags, type ApplicationIntegrationTypes, type ChannelFlags, type GuildFeatures, type GuildScheduledEventEntityTypes, type GuildScheduledEventPrivacyLevel, type GuildScheduledEventStatus, type MessageFlags, type OnboardingMode, type PrivacyLevel, type GuildMemberFlags, type InteractionContextTypes, type LobbyMemberFlags, type InviteTargetUsersJobStatusErrorCodes, type AuthorTypes, type SearchHasTypes, type SearchEmbedTypes, type SearchSortModes } from "./constants";
2
2
  import { RequestManager, type FileData } from "./rest";
3
3
  import EventEmitter from "node:events";
4
4
  import { Shard } from "./gateway";
@@ -26,7 +26,7 @@ import type { User, ApplicationRoleConnection, Connection } from "./types/user";
26
26
  import type { VoiceRegion, VoiceState } from "./types/voice";
27
27
  import type { Webhook } from "./types/webhook";
28
28
  import type { ClientOptions as WebSocketOptions } from "ws";
29
- import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin } from "./types/message";
29
+ import type { Embed, AllowedMentions, Attachment, Message, MessageReference, MessagePin, SharedClientTheme } from "./types/message";
30
30
  import type { Subscription } from "./types/subscription";
31
31
  import type { SoundboardSound } from "./types/soundboard";
32
32
  import type { ActionRow, Button, ChannelSelect, Container, File, MediaGallery, MentionableSelect, RoleSelect, Section, Separator, StringSelect, TextDisplay, Thumbnail, UserSelect } from "./types/components";
@@ -316,6 +316,7 @@ export declare class Client extends EventEmitter {
316
316
  flags?: MessageFlags;
317
317
  enforceNonce?: boolean;
318
318
  poll?: PollCreateParams;
319
+ sharedClientTheme?: SharedClientTheme;
319
320
  }): Promise<Message>;
320
321
  /** https://discord.com/developers/docs/resources/message#create-reaction */
321
322
  createMessageReaction(channelId: snowflake, messageId: snowflake, emoji: string): void;
@@ -1091,6 +1092,40 @@ export declare class Client extends EventEmitter {
1091
1092
  query: string;
1092
1093
  limit?: number;
1093
1094
  }): Promise<Array<GuildMember>>;
1095
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages */
1096
+ searchGuildMessages(guildId: snowflake, options?: {
1097
+ limit?: number;
1098
+ offset?: number;
1099
+ maxId?: snowflake;
1100
+ minId?: snowflake;
1101
+ slop?: number;
1102
+ content?: string;
1103
+ channelId?: snowflake;
1104
+ authorType?: Array<AuthorTypes>;
1105
+ authorId?: Array<snowflake>;
1106
+ mentions?: Array<snowflake>;
1107
+ mentionsRolesId?: Array<snowflake>;
1108
+ mentionEveryone?: boolean;
1109
+ repliedToUserId?: Array<snowflake>;
1110
+ repliedToMessageId?: Array<snowflake>;
1111
+ pinned?: boolean;
1112
+ has?: Array<SearchHasTypes>;
1113
+ embedType?: Array<SearchEmbedTypes>;
1114
+ embedProvider?: Array<string>;
1115
+ linkHostname?: Array<string>;
1116
+ attachmentFilename?: Array<string>;
1117
+ attachmentExtension?: Array<string>;
1118
+ sortBy?: SearchSortModes;
1119
+ sortOrder?: string;
1120
+ includeNfsw?: boolean;
1121
+ }): Promise<{
1122
+ doingDeepHistoricalIndex: boolean;
1123
+ documentsIndexed?: number;
1124
+ totalResults: number;
1125
+ messages: Array<Message>;
1126
+ threads?: Array<Channel>;
1127
+ members?: Array<ThreadMember>;
1128
+ }>;
1094
1129
  /** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
1095
1130
  sendSoundboardSound(channelId: snowflake, options: {
1096
1131
  soundId: snowflake;
@@ -652,6 +652,14 @@ class Client extends node_events_1.default {
652
652
  layout_type: options.poll.layoutType,
653
653
  }
654
654
  : undefined,
655
+ shared_client_theme: options.sharedClientTheme !== undefined
656
+ ? {
657
+ colors: options.sharedClientTheme.colors,
658
+ gradient_angle: options.sharedClientTheme.gradientAngle,
659
+ base_mix: options.sharedClientTheme.baseMix,
660
+ base_theme: options.sharedClientTheme.baseTheme,
661
+ }
662
+ : undefined,
655
663
  },
656
664
  files: options.files,
657
665
  });
@@ -2474,6 +2482,45 @@ class Client extends node_events_1.default {
2474
2482
  });
2475
2483
  return response.map((guildMember) => transformers_1.Guilds.guildMemberFromRaw(guildMember));
2476
2484
  }
2485
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages */
2486
+ async searchGuildMessages(guildId, options) {
2487
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildMessagesSearch(guildId), {
2488
+ query: {
2489
+ limit: options?.limit,
2490
+ offset: options?.offset,
2491
+ max_id: options?.maxId,
2492
+ min_id: options?.minId,
2493
+ slop: options?.slop,
2494
+ content: options?.content,
2495
+ channel_id: options?.channelId,
2496
+ author_type: options?.authorType,
2497
+ author_id: options?.authorId,
2498
+ mentions: options?.mentions,
2499
+ mentions_roles_id: options?.mentionsRolesId,
2500
+ mention_everyone: options?.mentionEveryone,
2501
+ replied_to_user_id: options?.repliedToUserId,
2502
+ replied_to_message_id: options?.repliedToMessageId,
2503
+ pinned: options?.pinned,
2504
+ has: options?.has,
2505
+ embed_type: options?.embedType,
2506
+ embed_provider: options?.embedProvider,
2507
+ link_hostname: options?.linkHostname,
2508
+ attachment_filename: options?.attachmentFilename,
2509
+ attachment_extension: options?.attachmentExtension,
2510
+ sort_by: options?.sortBy,
2511
+ sort_order: options?.sortOrder,
2512
+ include_nsfw: options?.includeNfsw,
2513
+ },
2514
+ });
2515
+ return {
2516
+ doingDeepHistoricalIndex: response.doing_deep_historical_index,
2517
+ documentsIndexed: response.documents_indexed,
2518
+ totalResults: response.total_results,
2519
+ messages: response.messages.map((message) => transformers_1.Messages.messageFromRaw(message)),
2520
+ threads: response.threads?.map((thread) => transformers_1.Channels.channelFromRaw(thread)),
2521
+ members: response.members?.map((member) => transformers_1.Channels.threadMemberFromRaw(member)),
2522
+ };
2523
+ }
2477
2524
  /** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
2478
2525
  sendSoundboardSound(channelId, options) {
2479
2526
  this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.sendSoundboardSound(channelId), {
@@ -138,7 +138,10 @@ export declare enum ComponentTypes {
138
138
  Separator = 14,
139
139
  Container = 17,
140
140
  Label = 18,
141
- FileUpload = 19
141
+ FileUpload = 19,
142
+ RadioGroup = 21,
143
+ CheckboxGroup = 22,
144
+ Checkbox = 23
142
145
  }
143
146
  /** https://discord.com/developers/docs/components/reference#button-button-styles */
144
147
  export declare enum ButtonStyles {
@@ -621,6 +624,45 @@ export declare enum AllowedMentionTypes {
621
624
  UserMentions = "users",
622
625
  EveryoneMentions = "everyone"
623
626
  }
627
+ /** https://docs.discord.com/developers/resources/message#base-theme-types */
628
+ export declare enum BaseThemeTypes {
629
+ Unset = 0,
630
+ Dark = 1,
631
+ Light = 2,
632
+ Darker = 3,
633
+ Midnight = 4
634
+ }
635
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-author-types */
636
+ export declare enum AuthorTypes {
637
+ User = "user",
638
+ Bot = "bot",
639
+ Webhook = "webhook"
640
+ }
641
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types */
642
+ export declare enum SearchHasTypes {
643
+ Image = "image",
644
+ Sound = "sound",
645
+ Video = "video",
646
+ File = "file",
647
+ Sticker = "sticker",
648
+ Embed = "embed",
649
+ Link = "link",
650
+ Poll = "poll",
651
+ Snapshot = "snapshot"
652
+ }
653
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types */
654
+ export declare enum SearchEmbedTypes {
655
+ Image = "image",
656
+ Video = "video",
657
+ GIF = "gif",
658
+ Sound = "sound",
659
+ Article = "article"
660
+ }
661
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes */
662
+ export declare enum SearchSortModes {
663
+ Timestamp = "timestamp",
664
+ Relevance = "relevance"
665
+ }
624
666
  /** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
625
667
  export declare enum ReactionTypes {
626
668
  Normal = 0,
@@ -955,7 +997,10 @@ export declare enum VoiceCloseEventCodes {
955
997
  Disconnect = 4014,
956
998
  VoiceServerCrashed = 4015,
957
999
  UnknownEncryptionMode = 4016,
958
- BadRequest = 4020
1000
+ ProtocolRequired = 4017,
1001
+ BadRequest = 4020,
1002
+ RateLimited = 4021,
1003
+ CallTerminated = 4022
959
1004
  }
960
1005
  /** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
961
1006
  export declare enum HTTPResponseCodes {
@@ -1161,10 +1206,13 @@ export declare enum JSONErrorCodes {
1161
1206
  YouCannotSendVoiceMessagesInThisChannel = 50173,
1162
1207
  TheUserAccountMustFirstBeVerified = 50178,
1163
1208
  TheProvidedFileDoesNotHaveAValidDuration = 50192,
1209
+ CannotSendMessagesToThisUser2 = 50278,
1164
1210
  YouDoNotHavePermissionToSendThisSticker = 50600,
1165
1211
  TwoFactorAuthenticationIsRequired = 60003,
1166
1212
  NoUsersWithDiscordTagExist = 80004,
1167
1213
  ReactionWasBlocked = 90001,
1214
+ UserCannotUseBurstReactions = 90002,
1215
+ IndexNotYetAvailable = 110000,
1168
1216
  ApplicationNotYetAvailable = 110001,
1169
1217
  APIResourceOverloaded = 130000,
1170
1218
  TheStageIsAlreadyOpen = 150006,
@@ -1,7 +1,8 @@
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.SeparatorSpacing = exports.TextInputStyles = exports.ButtonStyles = exports.ComponentTypes = exports.InteractionCallbackType = 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.LobbyMemberFlags = exports.InviteTargetUsersJobStatusErrorCodes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = void 0;
4
+ 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.SearchSortModes = exports.SearchEmbedTypes = exports.SearchHasTypes = exports.AuthorTypes = exports.BaseThemeTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.EmbedTypes = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.LobbyMemberFlags = exports.InviteTargetUsersJobStatusErrorCodes = exports.GuildInviteFlags = exports.InviteTargetTypes = exports.InviteTypes = void 0;
5
+ exports.EntitlementTypes = void 0;
5
6
  /** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
6
7
  var TimestampStyles;
7
8
  (function (TimestampStyles) {
@@ -155,6 +156,9 @@ var ComponentTypes;
155
156
  ComponentTypes[ComponentTypes["Container"] = 17] = "Container";
156
157
  ComponentTypes[ComponentTypes["Label"] = 18] = "Label";
157
158
  ComponentTypes[ComponentTypes["FileUpload"] = 19] = "FileUpload";
159
+ ComponentTypes[ComponentTypes["RadioGroup"] = 21] = "RadioGroup";
160
+ ComponentTypes[ComponentTypes["CheckboxGroup"] = 22] = "CheckboxGroup";
161
+ ComponentTypes[ComponentTypes["Checkbox"] = 23] = "Checkbox";
158
162
  })(ComponentTypes || (exports.ComponentTypes = ComponentTypes = {}));
159
163
  /** https://discord.com/developers/docs/components/reference#button-button-styles */
160
164
  var ButtonStyles;
@@ -687,6 +691,50 @@ var AllowedMentionTypes;
687
691
  AllowedMentionTypes["UserMentions"] = "users";
688
692
  AllowedMentionTypes["EveryoneMentions"] = "everyone";
689
693
  })(AllowedMentionTypes || (exports.AllowedMentionTypes = AllowedMentionTypes = {}));
694
+ /** https://docs.discord.com/developers/resources/message#base-theme-types */
695
+ var BaseThemeTypes;
696
+ (function (BaseThemeTypes) {
697
+ BaseThemeTypes[BaseThemeTypes["Unset"] = 0] = "Unset";
698
+ BaseThemeTypes[BaseThemeTypes["Dark"] = 1] = "Dark";
699
+ BaseThemeTypes[BaseThemeTypes["Light"] = 2] = "Light";
700
+ BaseThemeTypes[BaseThemeTypes["Darker"] = 3] = "Darker";
701
+ BaseThemeTypes[BaseThemeTypes["Midnight"] = 4] = "Midnight";
702
+ })(BaseThemeTypes || (exports.BaseThemeTypes = BaseThemeTypes = {}));
703
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-author-types */
704
+ var AuthorTypes;
705
+ (function (AuthorTypes) {
706
+ AuthorTypes["User"] = "user";
707
+ AuthorTypes["Bot"] = "bot";
708
+ AuthorTypes["Webhook"] = "webhook";
709
+ })(AuthorTypes || (exports.AuthorTypes = AuthorTypes = {}));
710
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-has-types */
711
+ var SearchHasTypes;
712
+ (function (SearchHasTypes) {
713
+ SearchHasTypes["Image"] = "image";
714
+ SearchHasTypes["Sound"] = "sound";
715
+ SearchHasTypes["Video"] = "video";
716
+ SearchHasTypes["File"] = "file";
717
+ SearchHasTypes["Sticker"] = "sticker";
718
+ SearchHasTypes["Embed"] = "embed";
719
+ SearchHasTypes["Link"] = "link";
720
+ SearchHasTypes["Poll"] = "poll";
721
+ SearchHasTypes["Snapshot"] = "snapshot";
722
+ })(SearchHasTypes || (exports.SearchHasTypes = SearchHasTypes = {}));
723
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-embed-types */
724
+ var SearchEmbedTypes;
725
+ (function (SearchEmbedTypes) {
726
+ SearchEmbedTypes["Image"] = "image";
727
+ SearchEmbedTypes["Video"] = "video";
728
+ SearchEmbedTypes["GIF"] = "gif";
729
+ SearchEmbedTypes["Sound"] = "sound";
730
+ SearchEmbedTypes["Article"] = "article";
731
+ })(SearchEmbedTypes || (exports.SearchEmbedTypes = SearchEmbedTypes = {}));
732
+ /** https://docs.discord.com/developers/resources/message#search-guild-messages-search-sort-modes */
733
+ var SearchSortModes;
734
+ (function (SearchSortModes) {
735
+ SearchSortModes["Timestamp"] = "timestamp";
736
+ SearchSortModes["Relevance"] = "relevance";
737
+ })(SearchSortModes || (exports.SearchSortModes = SearchSortModes = {}));
690
738
  /** https://discord.com/developers/docs/resources/message#get-reactions-reaction-types */
691
739
  var ReactionTypes;
692
740
  (function (ReactionTypes) {
@@ -1044,7 +1092,10 @@ var VoiceCloseEventCodes;
1044
1092
  VoiceCloseEventCodes[VoiceCloseEventCodes["Disconnect"] = 4014] = "Disconnect";
1045
1093
  VoiceCloseEventCodes[VoiceCloseEventCodes["VoiceServerCrashed"] = 4015] = "VoiceServerCrashed";
1046
1094
  VoiceCloseEventCodes[VoiceCloseEventCodes["UnknownEncryptionMode"] = 4016] = "UnknownEncryptionMode";
1095
+ VoiceCloseEventCodes[VoiceCloseEventCodes["ProtocolRequired"] = 4017] = "ProtocolRequired";
1047
1096
  VoiceCloseEventCodes[VoiceCloseEventCodes["BadRequest"] = 4020] = "BadRequest";
1097
+ VoiceCloseEventCodes[VoiceCloseEventCodes["RateLimited"] = 4021] = "RateLimited";
1098
+ VoiceCloseEventCodes[VoiceCloseEventCodes["CallTerminated"] = 4022] = "CallTerminated";
1048
1099
  })(VoiceCloseEventCodes || (exports.VoiceCloseEventCodes = VoiceCloseEventCodes = {}));
1049
1100
  /** https://discord.com/developers/docs/topics/opcodes-and-status-codes#http-http-response-codes */
1050
1101
  var HTTPResponseCodes;
@@ -1252,10 +1303,13 @@ var JSONErrorCodes;
1252
1303
  JSONErrorCodes[JSONErrorCodes["YouCannotSendVoiceMessagesInThisChannel"] = 50173] = "YouCannotSendVoiceMessagesInThisChannel";
1253
1304
  JSONErrorCodes[JSONErrorCodes["TheUserAccountMustFirstBeVerified"] = 50178] = "TheUserAccountMustFirstBeVerified";
1254
1305
  JSONErrorCodes[JSONErrorCodes["TheProvidedFileDoesNotHaveAValidDuration"] = 50192] = "TheProvidedFileDoesNotHaveAValidDuration";
1306
+ JSONErrorCodes[JSONErrorCodes["CannotSendMessagesToThisUser2"] = 50278] = "CannotSendMessagesToThisUser2";
1255
1307
  JSONErrorCodes[JSONErrorCodes["YouDoNotHavePermissionToSendThisSticker"] = 50600] = "YouDoNotHavePermissionToSendThisSticker";
1256
1308
  JSONErrorCodes[JSONErrorCodes["TwoFactorAuthenticationIsRequired"] = 60003] = "TwoFactorAuthenticationIsRequired";
1257
1309
  JSONErrorCodes[JSONErrorCodes["NoUsersWithDiscordTagExist"] = 80004] = "NoUsersWithDiscordTagExist";
1258
1310
  JSONErrorCodes[JSONErrorCodes["ReactionWasBlocked"] = 90001] = "ReactionWasBlocked";
1311
+ JSONErrorCodes[JSONErrorCodes["UserCannotUseBurstReactions"] = 90002] = "UserCannotUseBurstReactions";
1312
+ JSONErrorCodes[JSONErrorCodes["IndexNotYetAvailable"] = 110000] = "IndexNotYetAvailable";
1259
1313
  JSONErrorCodes[JSONErrorCodes["ApplicationNotYetAvailable"] = 110001] = "ApplicationNotYetAvailable";
1260
1314
  JSONErrorCodes[JSONErrorCodes["APIResourceOverloaded"] = 130000] = "APIResourceOverloaded";
1261
1315
  JSONErrorCodes[JSONErrorCodes["TheStageIsAlreadyOpen"] = 150006] = "TheStageIsAlreadyOpen";
@@ -208,6 +208,11 @@ exports.Handlers = {
208
208
  }
209
209
  : null
210
210
  : undefined,
211
+ collectibles: data.collectibles !== undefined
212
+ ? data.collectibles !== null
213
+ ? transformers_1.Users.collectiblesFromRaw(data.collectibles)
214
+ : null
215
+ : undefined,
211
216
  });
212
217
  },
213
218
  [constants_1.GatewayEvents.GuildMembersChunk]: (shard, data) => {
@@ -306,7 +311,7 @@ exports.Handlers = {
306
311
  temporary: data.temporary,
307
312
  uses: data.uses,
308
313
  expiresAt: data.expires_at,
309
- roleIds: data.roles_ids
314
+ roleIds: data.roles_ids,
310
315
  });
311
316
  },
312
317
  [constants_1.GatewayEvents.InviteDelete]: (shard, data) => {
@@ -22,6 +22,7 @@ export declare const guildMemberRole: (guildId: snowflake, memberId: snowflake,
22
22
  export declare const guildMembers: (guildId: snowflake) => `guilds/${string}/members`;
23
23
  export declare const guildMembersSearch: (guildId: snowflake) => `guilds/${string}/members/search`;
24
24
  export declare const guildMemberVerification: (guildId: snowflake) => `guilds/${string}/member-verification`;
25
+ export declare const guildMessagesSearch: (guildId: snowflake) => `guilds/${string}/messages/search`;
25
26
  export declare const guildOnboarding: (guildId: snowflake) => `guilds/${string}/onboarding`;
26
27
  export declare const guildPreview: (guildId: snowflake) => `guilds/${string}/preview`;
27
28
  export declare const guildPrune: (guildId: snowflake) => `guilds/${string}/prune`;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.channelFollowers = exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityURL = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildSoundboardSounds = exports.guildSoundboardSound = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRoleMemberCounts = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildIncidentsActions = exports.guildEmojis = exports.guildEmoji = exports.guildMemberNickname = exports.guildChannels = exports.guildBulkBan = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
4
- exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.soundboardDefaultSounds = exports.sendSoundboardSound = exports.skuSubscriptions = exports.skuSubscription = exports.stickerPacks = exports.stickerPack = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationEmojis = exports.applicationEmoji = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.applicationActivityInstance = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = void 0;
5
- exports.inviteTargetUsersJobStatus = exports.inviteTargetUsers = exports.lobbyChannelLinking = exports.lobbyMember = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = void 0;
3
+ exports.channelBulkDelete = exports.channel = exports.template = exports.guildWidgetSettings = exports.guildWidgetJSON = exports.guildWidgetImage = exports.guildWelcomeScreen = exports.guildWebhooks = exports.guildVoiceState = exports.guildVoiceRegions = exports.guildVanityURL = exports.guildTemplates = exports.guildTemplate = exports.guildStickers = exports.guildSticker = exports.guildSoundboardSounds = exports.guildSoundboardSound = exports.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = exports.guildRoleMemberCounts = exports.guildRole = exports.guildPrune = exports.guildPreview = exports.guildOnboarding = exports.guildMessagesSearch = exports.guildMemberVerification = exports.guildMembersSearch = exports.guildMembers = exports.guildMemberRole = exports.guildMember = exports.guildMFA = exports.guildInvites = exports.guildIntegrations = exports.guildIntegration = exports.guildIncidentsActions = exports.guildEmojis = exports.guildEmoji = exports.guildMemberNickname = exports.guildChannels = exports.guildBulkBan = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = void 0;
4
+ exports.gatewayBot = exports.gateway = exports.soundboardDefaultSounds = exports.sendSoundboardSound = exports.skuSubscriptions = exports.skuSubscription = exports.stickerPacks = exports.stickerPack = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationEmojis = exports.applicationEmoji = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = exports.applicationActivityInstance = exports.userGuilds = exports.userGuild = exports.userConnections = exports.userChannels = exports.userApplicationRoleConnection = exports.user = exports.pollExpire = exports.pollAnswerVoters = exports.threadMembers = exports.threads = exports.channelWebhooks = exports.channelTyping = exports.channelThreads = exports.channelRecipient = exports.channelPins = exports.channelPin = exports.channelPermission = exports.channelMessages = exports.channelMessageReaction = exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = exports.channelFollowers = void 0;
5
+ exports.inviteTargetUsersJobStatus = exports.inviteTargetUsers = exports.lobbyChannelLinking = exports.lobbyMember = exports.lobby = exports.lobbies = exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = void 0;
6
6
  // Guilds
7
7
  const guild = (guildId) => `guilds/${guildId}`;
8
8
  exports.guild = guild;
@@ -50,6 +50,8 @@ const guildMembersSearch = (guildId) => `guilds/${guildId}/members/search`;
50
50
  exports.guildMembersSearch = guildMembersSearch;
51
51
  const guildMemberVerification = (guildId) => `guilds/${guildId}/member-verification`;
52
52
  exports.guildMemberVerification = guildMemberVerification;
53
+ const guildMessagesSearch = (guildId) => `guilds/${guildId}/messages/search`;
54
+ exports.guildMessagesSearch = guildMessagesSearch;
53
55
  const guildOnboarding = (guildId) => `guilds/${guildId}/onboarding`;
54
56
  exports.guildOnboarding = guildOnboarding;
55
57
  const guildPreview = (guildId) => `guilds/${guildId}/preview`;
@@ -1,4 +1,4 @@
1
- import { ActionRow, Button, Container, RawActionRow, RawButton, RawContainer, RawFile, File, RawUnfurledMediaItem, UnfurledMediaItem, RawTextDisplay, TextDisplay, RawSeparator, Separator, RawSection, Section, Thumbnail, RawThumbnail, TextInput, RawTextInput, MediaGallery, RawMediaGallery, RawStringSelect, StringSelect, RawUserSelect, UserSelect, RawRoleSelect, RoleSelect, RawMentionableSelect, MentionableSelect, RawChannelSelect, ChannelSelect, RawLabel, Label, RawFileUpload, FileUpload } from "../types/components";
1
+ import { ActionRow, Button, Container, RawActionRow, RawButton, RawContainer, RawFile, File, RawUnfurledMediaItem, UnfurledMediaItem, RawTextDisplay, TextDisplay, RawSeparator, Separator, RawSection, Section, Thumbnail, RawThumbnail, TextInput, RawTextInput, MediaGallery, RawMediaGallery, RawStringSelect, StringSelect, RawUserSelect, UserSelect, RawRoleSelect, RoleSelect, RawMentionableSelect, MentionableSelect, RawChannelSelect, ChannelSelect, RawLabel, Label, RawFileUpload, FileUpload, RawRadioGroup, RadioGroup, RawCheckbox, Checkbox, RawCheckboxGroup, CheckboxGroup } from "../types/components";
2
2
  export declare class Components {
3
3
  static actionRowFromRaw(actionRow: RawActionRow): ActionRow;
4
4
  static actionRowToRaw(actionRow: ActionRow): RawActionRow;
@@ -6,6 +6,10 @@ export declare class Components {
6
6
  static buttonToRaw(button: Button): RawButton;
7
7
  static channelSelectFromRaw(channelSelect: RawChannelSelect): ChannelSelect;
8
8
  static channelSelectToRaw(channelSelect: ChannelSelect): RawChannelSelect;
9
+ static checkboxFromRaw(checkbox: RawCheckbox): Checkbox;
10
+ static checkboxToRaw(checkbox: Checkbox): RawCheckbox;
11
+ static checkboxGroupFromRaw(checkboxGroup: RawCheckboxGroup): CheckboxGroup;
12
+ static checkboxGroupToRaw(checkboxGroup: CheckboxGroup): RawCheckboxGroup;
9
13
  static containerFromRaw(container: RawContainer): Container;
10
14
  static containerToRaw(container: Container): RawContainer;
11
15
  static fileFromRaw(file: RawFile): File;
@@ -18,6 +22,8 @@ export declare class Components {
18
22
  static mediaGalleryToRaw(mediaGallery: MediaGallery): RawMediaGallery;
19
23
  static mentionableSelectFromRaw(mentionableSelect: RawMentionableSelect): MentionableSelect;
20
24
  static mentionableSelectToRaw(mentionableSelect: MentionableSelect): RawMentionableSelect;
25
+ static radioGroupFromRaw(radioGroup: RawRadioGroup): RadioGroup;
26
+ static radioGroupToRaw(radioGroup: RadioGroup): RawRadioGroup;
21
27
  static roleSelectFromRaw(roleSelect: RawRoleSelect): RoleSelect;
22
28
  static roleSelectToRaw(roleSelect: RoleSelect): RawRoleSelect;
23
29
  static sectionFromRaw(section: RawSection): Section;
@@ -103,6 +103,44 @@ class Components {
103
103
  disabled: channelSelect.disabled,
104
104
  };
105
105
  }
106
+ static checkboxFromRaw(checkbox) {
107
+ return {
108
+ type: checkbox.type,
109
+ id: checkbox.id,
110
+ customId: checkbox.custom_id,
111
+ default: checkbox.default,
112
+ };
113
+ }
114
+ static checkboxToRaw(checkbox) {
115
+ return {
116
+ type: checkbox.type,
117
+ id: checkbox.id,
118
+ custom_id: checkbox.customId,
119
+ default: checkbox.default,
120
+ };
121
+ }
122
+ static checkboxGroupFromRaw(checkboxGroup) {
123
+ return {
124
+ type: checkboxGroup.type,
125
+ id: checkboxGroup.id,
126
+ customId: checkboxGroup.custom_id,
127
+ options: checkboxGroup.options,
128
+ minValues: checkboxGroup.min_values,
129
+ maxValues: checkboxGroup.max_values,
130
+ required: checkboxGroup.required,
131
+ };
132
+ }
133
+ static checkboxGroupToRaw(checkboxGroup) {
134
+ return {
135
+ type: checkboxGroup.type,
136
+ id: checkboxGroup.id,
137
+ custom_id: checkboxGroup.customId,
138
+ options: checkboxGroup.options,
139
+ min_values: checkboxGroup.minValues,
140
+ max_values: checkboxGroup.maxValues,
141
+ required: checkboxGroup.required,
142
+ };
143
+ }
106
144
  static containerFromRaw(container) {
107
145
  return {
108
146
  type: container.type,
@@ -227,6 +265,14 @@ class Components {
227
265
  case constants_1.ComponentTypes.FileUpload:
228
266
  component = Components.fileUploadFromRaw(label.component);
229
267
  break;
268
+ case constants_1.ComponentTypes.RadioGroup:
269
+ component = Components.radioGroupFromRaw(label.component);
270
+ break;
271
+ case constants_1.ComponentTypes.CheckboxGroup:
272
+ component = Components.checkboxGroupFromRaw(label.component);
273
+ break;
274
+ case constants_1.ComponentTypes.Checkbox:
275
+ component = Components.checkboxFromRaw(label.component);
230
276
  }
231
277
  return {
232
278
  type: label.type,
@@ -260,6 +306,14 @@ class Components {
260
306
  case constants_1.ComponentTypes.FileUpload:
261
307
  component = Components.fileUploadToRaw(label.component);
262
308
  break;
309
+ case constants_1.ComponentTypes.RadioGroup:
310
+ component = Components.radioGroupToRaw(label.component);
311
+ break;
312
+ case constants_1.ComponentTypes.CheckboxGroup:
313
+ component = Components.checkboxGroupToRaw(label.component);
314
+ break;
315
+ case constants_1.ComponentTypes.Checkbox:
316
+ component = Components.checkboxToRaw(label.component);
263
317
  }
264
318
  return {
265
319
  type: label.type,
@@ -315,6 +369,24 @@ class Components {
315
369
  disabled: mentionableSelect.disabled,
316
370
  };
317
371
  }
372
+ static radioGroupFromRaw(radioGroup) {
373
+ return {
374
+ type: radioGroup.type,
375
+ id: radioGroup.id,
376
+ customId: radioGroup.custom_id,
377
+ options: radioGroup.options,
378
+ required: radioGroup.required,
379
+ };
380
+ }
381
+ static radioGroupToRaw(radioGroup) {
382
+ return {
383
+ type: radioGroup.type,
384
+ id: radioGroup.id,
385
+ custom_id: radioGroup.customId,
386
+ options: radioGroup.options,
387
+ required: radioGroup.required,
388
+ };
389
+ }
318
390
  static roleSelectFromRaw(roleSelect) {
319
391
  return {
320
392
  type: roleSelect.type,
@@ -119,6 +119,11 @@ class Guilds {
119
119
  }
120
120
  : null
121
121
  : undefined,
122
+ collectibles: guildMember.collectibles !== undefined
123
+ ? guildMember.collectibles !== null
124
+ ? Users_1.Users.collectiblesFromRaw(guildMember.collectibles)
125
+ : null
126
+ : undefined,
122
127
  };
123
128
  }
124
129
  static guildMemberToRaw(guildMember) {
@@ -145,6 +150,11 @@ class Guilds {
145
150
  }
146
151
  : null
147
152
  : undefined,
153
+ collectibles: guildMember.collectibles !== undefined
154
+ ? guildMember.collectibles !== null
155
+ ? Users_1.Users.collectiblesToRaw(guildMember.collectibles)
156
+ : null
157
+ : undefined,
148
158
  };
149
159
  }
150
160
  static guildToRaw(guild) {
@@ -211,6 +211,29 @@ class Interactions {
211
211
  values: component.component.values,
212
212
  };
213
213
  break;
214
+ case constants_1.ComponentTypes.RadioGroup:
215
+ c = {
216
+ type: component.component.type,
217
+ id: component.component.id,
218
+ customId: component.component.custom_id,
219
+ value: component.component.value
220
+ };
221
+ break;
222
+ case constants_1.ComponentTypes.CheckboxGroup:
223
+ c = {
224
+ type: component.component.type,
225
+ id: component.component.id,
226
+ customId: component.component.custom_id,
227
+ values: component.component.values,
228
+ };
229
+ break;
230
+ case constants_1.ComponentTypes.Checkbox:
231
+ c = {
232
+ type: component.component.type,
233
+ id: component.component.id,
234
+ customId: component.component.custom_id,
235
+ value: component.component.value
236
+ };
214
237
  }
215
238
  return {
216
239
  type: component.type,
@@ -449,6 +472,29 @@ class Interactions {
449
472
  values: component.component.values,
450
473
  };
451
474
  break;
475
+ case constants_1.ComponentTypes.RadioGroup:
476
+ c = {
477
+ type: component.component.type,
478
+ id: component.component.id,
479
+ custom_id: component.component.customId,
480
+ value: component.component.value
481
+ };
482
+ break;
483
+ case constants_1.ComponentTypes.CheckboxGroup:
484
+ c = {
485
+ type: component.component.type,
486
+ id: component.component.id,
487
+ custom_id: component.component.customId,
488
+ values: component.component.values,
489
+ };
490
+ break;
491
+ case constants_1.ComponentTypes.Checkbox:
492
+ c = {
493
+ type: component.component.type,
494
+ id: component.component.id,
495
+ custom_id: component.component.customId,
496
+ value: component.component.value
497
+ };
452
498
  }
453
499
  return {
454
500
  type: component.type,
@@ -1,5 +1,8 @@
1
1
  import type { RawInvite, Invite } from "../types/invite";
2
+ import { RawRole, Role } from "../types/role";
2
3
  export declare class Invites {
3
4
  static inviteFromRaw(invite: RawInvite): Invite;
4
5
  static inviteToRaw(invite: Invite): RawInvite;
6
+ static partialRoleFromRaw(role: Pick<RawRole, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicode_emoji">): Pick<Role, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicodeEmoji">;
7
+ static partialRoleToRaw(role: Pick<Role, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicodeEmoji">): Pick<RawRole, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicode_emoji">;
5
8
  }
@@ -40,6 +40,7 @@ class Invites {
40
40
  ? GuildScheduledEvents_1.GuildScheduledEvents.guildScheduledEventFromRaw(invite.guild_scheduled_event)
41
41
  : undefined,
42
42
  flags: invite.flags,
43
+ roles: invite.roles?.map((role) => Invites.partialRoleFromRaw(role))
43
44
  };
44
45
  }
45
46
  static inviteToRaw(invite) {
@@ -75,6 +76,37 @@ class Invites {
75
76
  ? GuildScheduledEvents_1.GuildScheduledEvents.guildScheduledEventToRaw(invite.guildScheduledEvent)
76
77
  : undefined,
77
78
  flags: invite.flags,
79
+ roles: invite.roles?.map((role) => Invites.partialRoleToRaw(role))
80
+ };
81
+ }
82
+ static partialRoleFromRaw(role) {
83
+ return {
84
+ id: role.id,
85
+ name: role.name,
86
+ position: role.position,
87
+ color: role.color,
88
+ colors: {
89
+ primaryColor: role.colors.primary_color,
90
+ secondaryColor: role.colors.secondary_color,
91
+ tertiaryColor: role.colors.tertiary_color
92
+ },
93
+ icon: role.icon,
94
+ unicodeEmoji: role.unicode_emoji
95
+ };
96
+ }
97
+ static partialRoleToRaw(role) {
98
+ return {
99
+ id: role.id,
100
+ name: role.name,
101
+ position: role.position,
102
+ color: role.color,
103
+ colors: {
104
+ primary_color: role.colors.primaryColor,
105
+ secondary_color: role.colors.secondaryColor,
106
+ tertiary_color: role.colors.tertiaryColor
107
+ },
108
+ icon: role.icon,
109
+ unicode_emoji: role.unicodeEmoji
78
110
  };
79
111
  }
80
112
  }
@@ -298,6 +298,14 @@ class Messages {
298
298
  ? Polls_1.Polls.pollFromRaw(message.poll)
299
299
  : undefined,
300
300
  call: message.call,
301
+ sharedClientTheme: message.shared_client_theme !== undefined
302
+ ? {
303
+ colors: message.shared_client_theme.colors,
304
+ gradientAngle: message.shared_client_theme.gradient_angle,
305
+ baseMix: message.shared_client_theme.base_mix,
306
+ baseTheme: message.shared_client_theme.base_theme,
307
+ }
308
+ : undefined,
301
309
  };
302
310
  }
303
311
  static messageToRaw(message) {
@@ -404,6 +412,14 @@ class Messages {
404
412
  : undefined,
405
413
  poll: message.poll !== undefined ? Polls_1.Polls.pollToRaw(message.poll) : undefined,
406
414
  call: message.call,
415
+ shared_client_theme: message.sharedClientTheme !== undefined
416
+ ? {
417
+ colors: message.sharedClientTheme.colors,
418
+ gradient_angle: message.sharedClientTheme.gradientAngle,
419
+ base_mix: message.sharedClientTheme.baseMix,
420
+ base_theme: message.sharedClientTheme.baseTheme,
421
+ }
422
+ : undefined,
407
423
  };
408
424
  }
409
425
  }
@@ -1,5 +1,7 @@
1
- import type { Nameplate, RawNameplate, RawUser, User } from "../types/user";
1
+ import type { Collectibles, Nameplate, RawCollectibles, RawNameplate, RawUser, User } from "../types/user";
2
2
  export declare class Users {
3
+ static collectiblesFromRaw(collectibles: RawCollectibles): Collectibles;
4
+ static collectiblesToRaw(collectibles: Collectibles): RawCollectibles;
3
5
  static nameplateFromRaw(nameplate: RawNameplate): Nameplate;
4
6
  static nameplateToRaw(nameplate: Nameplate): RawNameplate;
5
7
  static userFromRaw(user: RawUser): User;
@@ -2,6 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Users = void 0;
4
4
  class Users {
5
+ static collectiblesFromRaw(collectibles) {
6
+ return {
7
+ nameplate: collectibles.nameplate !== undefined
8
+ ? this.nameplateFromRaw(collectibles.nameplate)
9
+ : undefined,
10
+ };
11
+ }
12
+ static collectiblesToRaw(collectibles) {
13
+ return {
14
+ nameplate: collectibles.nameplate !== undefined
15
+ ? this.nameplateToRaw(collectibles.nameplate)
16
+ : undefined,
17
+ };
18
+ }
5
19
  static nameplateFromRaw(nameplate) {
6
20
  return {
7
21
  skuId: nameplate.sku_id,
@@ -46,11 +60,7 @@ class Users {
46
60
  : undefined,
47
61
  collectibles: user.collectibles !== undefined
48
62
  ? user.collectibles !== null
49
- ? {
50
- nameplate: user.collectibles.nameplate !== undefined
51
- ? this.nameplateFromRaw(user.collectibles.nameplate)
52
- : undefined,
53
- }
63
+ ? this.collectiblesFromRaw(user.collectibles)
54
64
  : null
55
65
  : undefined,
56
66
  primaryGuild: user.primary_guild !== undefined
@@ -93,11 +103,7 @@ class Users {
93
103
  : undefined,
94
104
  collectibles: user.collectibles !== undefined
95
105
  ? user.collectibles !== null
96
- ? {
97
- nameplate: user.collectibles.nameplate !== undefined
98
- ? this.nameplateToRaw(user.collectibles.nameplate)
99
- : undefined,
100
- }
106
+ ? this.collectiblesToRaw(user.collectibles)
101
107
  : null
102
108
  : undefined,
103
109
  primary_guild: user.primaryGuild !== undefined
@@ -222,13 +222,13 @@ export interface RawLabel {
222
222
  id?: number;
223
223
  label: string;
224
224
  description?: string;
225
- component: RawTextInput | RawStringSelect | RawUserSelect | RawRoleSelect | RawMentionableSelect | RawChannelSelect | RawFileUpload;
225
+ component: RawTextInput | RawStringSelect | RawUserSelect | RawRoleSelect | RawMentionableSelect | RawChannelSelect | RawFileUpload | RawRadioGroup | RawCheckboxGroup | RawCheckbox;
226
226
  }
227
227
  /** https://discord.com/developers/docs/components/reference#label-label-interaction-response-structure */
228
228
  export interface RawLabelInteractionResponse {
229
229
  type: ComponentTypes.Label;
230
230
  id: number;
231
- component: RawTextInputInteractionResponse | RawStringSelectInteractionResponse | RawUserSelectInteractionResponse | RawRoleSelectInteractionResponse | RawMentionableSelectInteractionResponse | RawChannelSelectInteractionResponse | RawFileUploadInteractionResponse;
231
+ component: RawTextInputInteractionResponse | RawStringSelectInteractionResponse | RawUserSelectInteractionResponse | RawRoleSelectInteractionResponse | RawMentionableSelectInteractionResponse | RawChannelSelectInteractionResponse | RawFileUploadInteractionResponse | RawRadioGroupInteractionResponse | RawCheckboxGroupInteractionResponse | RawCheckboxInteractionResponse;
232
232
  }
233
233
  /** https://discord.com/developers/docs/components/reference#file-upload-file-upload-structure */
234
234
  export interface RawFileUpload {
@@ -255,6 +255,66 @@ export interface RawUnfurledMediaItem {
255
255
  content_type?: string;
256
256
  attachment_id?: snowflake;
257
257
  }
258
+ /** https://docs.discord.com/developers/components/reference#radio-group-structure */
259
+ export interface RawRadioGroup {
260
+ type: ComponentTypes.RadioGroup;
261
+ id?: number;
262
+ custom_id: string;
263
+ options: Array<RawRadioGroupOptions>;
264
+ required?: boolean;
265
+ }
266
+ /** https://docs.discord.com/developers/components/reference#radio-group-option-structure */
267
+ export interface RawRadioGroupOptions {
268
+ value: string;
269
+ label: string;
270
+ description?: string;
271
+ default?: boolean;
272
+ }
273
+ /** https://docs.discord.com/developers/components/reference#radio-group-interaction-response-structure */
274
+ export interface RawRadioGroupInteractionResponse {
275
+ type: ComponentTypes.RadioGroup;
276
+ id: number;
277
+ custom_id: string;
278
+ value: string | null;
279
+ }
280
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-structure */
281
+ export interface RawCheckboxGroup {
282
+ type: ComponentTypes.CheckboxGroup;
283
+ id?: number;
284
+ custom_id: string;
285
+ options: Array<RawCheckboxGroupOptions>;
286
+ min_values?: number;
287
+ max_values?: number;
288
+ required?: boolean;
289
+ }
290
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-option-structure */
291
+ export interface RawCheckboxGroupOptions {
292
+ value: string;
293
+ label: string;
294
+ description?: string;
295
+ default?: boolean;
296
+ }
297
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-interaction-response-structure */
298
+ export interface RawCheckboxGroupInteractionResponse {
299
+ type: ComponentTypes.CheckboxGroup;
300
+ id: number;
301
+ custom_id: string;
302
+ values: Array<string>;
303
+ }
304
+ /** https://docs.discord.com/developers/components/reference#checkbox-structure */
305
+ export interface RawCheckbox {
306
+ type: ComponentTypes.Checkbox;
307
+ id?: number;
308
+ custom_id: string;
309
+ default?: boolean;
310
+ }
311
+ /** https://docs.discord.com/developers/components/reference#checkbox-interaction-response-structure */
312
+ export interface RawCheckboxInteractionResponse {
313
+ type: ComponentTypes.Checkbox;
314
+ id: number;
315
+ custom_id: string;
316
+ value: boolean;
317
+ }
258
318
  /** https://discord.com/developers/docs/components/reference#action-row-action-row-structure */
259
319
  export interface ActionRow {
260
320
  type: ComponentTypes.ActionRow;
@@ -475,13 +535,13 @@ export interface Label {
475
535
  id?: number;
476
536
  label: string;
477
537
  description?: string;
478
- component: TextInput | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | FileUpload;
538
+ component: TextInput | StringSelect | UserSelect | RoleSelect | MentionableSelect | ChannelSelect | FileUpload | RadioGroup | CheckboxGroup | Checkbox;
479
539
  }
480
540
  /** https://discord.com/developers/docs/components/reference#label-label-interaction-response-structure */
481
541
  export interface LabelInteractionResponse {
482
542
  type: ComponentTypes.Label;
483
543
  id: number;
484
- component: TextInputInteractionResponse | StringSelectInteractionResponse | UserSelectInteractionResponse | RoleSelectInteractionResponse | MentionableSelectInteractionResponse | ChannelSelectInteractionResponse | FileUploadInteractionResponse;
544
+ component: TextInputInteractionResponse | StringSelectInteractionResponse | UserSelectInteractionResponse | RoleSelectInteractionResponse | MentionableSelectInteractionResponse | ChannelSelectInteractionResponse | FileUploadInteractionResponse | RadioGroupInteractionResponse | CheckboxGroupInteractionResponse | CheckboxInteractionResponse;
485
545
  }
486
546
  /** https://discord.com/developers/docs/components/reference#file-upload-file-upload-structure */
487
547
  export interface FileUpload {
@@ -508,3 +568,63 @@ export interface UnfurledMediaItem {
508
568
  contentType?: string;
509
569
  attachmentId?: snowflake;
510
570
  }
571
+ /** https://docs.discord.com/developers/components/reference#radio-group-structure */
572
+ export interface RadioGroup {
573
+ type: ComponentTypes.RadioGroup;
574
+ id?: number;
575
+ customId: string;
576
+ options: Array<RadioGroupOptions>;
577
+ required?: boolean;
578
+ }
579
+ /** https://docs.discord.com/developers/components/reference#radio-group-option-structure */
580
+ export interface RadioGroupOptions {
581
+ value: string;
582
+ label: string;
583
+ description?: string;
584
+ default?: boolean;
585
+ }
586
+ /** https://docs.discord.com/developers/components/reference#radio-group-interaction-response-structure */
587
+ export interface RadioGroupInteractionResponse {
588
+ type: ComponentTypes.RadioGroup;
589
+ id: number;
590
+ customId: string;
591
+ value: string | null;
592
+ }
593
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-structure */
594
+ export interface CheckboxGroup {
595
+ type: ComponentTypes.CheckboxGroup;
596
+ id?: number;
597
+ customId: string;
598
+ options: Array<CheckboxGroupOptions>;
599
+ minValues?: number;
600
+ maxValues?: number;
601
+ required?: boolean;
602
+ }
603
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-option-structure */
604
+ export interface CheckboxGroupOptions {
605
+ value: string;
606
+ label: string;
607
+ description?: string;
608
+ default?: boolean;
609
+ }
610
+ /** https://docs.discord.com/developers/components/reference#checkbox-group-interaction-response-structure */
611
+ export interface CheckboxGroupInteractionResponse {
612
+ type: ComponentTypes.CheckboxGroup;
613
+ id: number;
614
+ customId: string;
615
+ values: Array<string>;
616
+ }
617
+ /** https://docs.discord.com/developers/components/reference#checkbox-structure */
618
+ export interface Checkbox {
619
+ type: ComponentTypes.Checkbox;
620
+ id?: number;
621
+ customId: string;
622
+ default?: boolean;
623
+ }
624
+ /** https://docs.discord.com/developers/components/reference#checkbox-interaction-response-structure */
625
+ export interface CheckboxInteractionResponse {
626
+ type: ComponentTypes.Checkbox;
627
+ id: number;
628
+ customId: string;
629
+ value: boolean;
630
+ }
@@ -10,7 +10,7 @@ import { RawRole, Role } from "./role";
10
10
  import type { RawSoundboardSound, SoundboardSound } from "./soundboard";
11
11
  import type { RawStageInstance, StageInstance } from "./stage-instance";
12
12
  import { RawSticker, Sticker } from "./sticker";
13
- import type { RawUser, RawAvatarDecorationData, User, AvatarDecorationData } from "./user";
13
+ import type { RawUser, RawAvatarDecorationData, User, AvatarDecorationData, Collectibles, RawCollectibles } from "./user";
14
14
  import type { RawVoiceState, VoiceState } from "./voice";
15
15
  /** https://discord.com/developers/docs/events/gateway-events#payload-structure */
16
16
  export interface RawPayload {
@@ -185,6 +185,7 @@ export interface RawGuildMemberUpdateEvent {
185
185
  communication_disabled_until?: number | null;
186
186
  flags?: GuildMemberFlags;
187
187
  avatar_decoration_data?: RawAvatarDecorationData | null;
188
+ collectibles?: RawCollectibles | null;
188
189
  }
189
190
  /** https://discord.com/developers/docs/events/gateway-events#guild-members-chunk-guild-members-chunk-event-fields */
190
191
  export interface RawGuildMembersChunkEvent {
@@ -625,6 +626,7 @@ export interface GuildMemberUpdateEvent {
625
626
  communicationDisabledUntil?: number | null;
626
627
  flags?: GuildMemberFlags;
627
628
  avatarDecorationData?: AvatarDecorationData | null;
629
+ collectibles?: Collectibles | null;
628
630
  }
629
631
  /** https://discord.com/developers/docs/events/gateway-events#guild-members-chunk-guild-members-chunk-event-fields */
630
632
  export interface GuildMembersChunkEvent {
@@ -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 { AvatarDecorationData, RawAvatarDecorationData, RawUser, User } from "./user";
7
+ import type { AvatarDecorationData, Collectibles, RawAvatarDecorationData, RawCollectibles, 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;
@@ -102,6 +102,7 @@ export interface RawGuildMember {
102
102
  communication_disabled_until?: timestamp | null;
103
103
  unusual_dm_activity_until?: timestamp | null;
104
104
  avatar_decoration_data?: RawAvatarDecorationData | null;
105
+ collectibles?: RawCollectibles | null;
105
106
  }
106
107
  /** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
107
108
  export interface RawIntegration {
@@ -286,6 +287,7 @@ export interface GuildMember {
286
287
  communicationDisabledUntil?: timestamp | null;
287
288
  unusualDMActivityUntil?: timestamp | null;
288
289
  avatarDecorationData?: AvatarDecorationData | null;
290
+ collectibles?: Collectibles | null;
289
291
  }
290
292
  /** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
291
293
  export interface Integration {
@@ -22,7 +22,7 @@ export interface RawInvite {
22
22
  stage_instance?: RawInviteStageInstance;
23
23
  guild_scheduled_event?: RawGuildScheduledEvent;
24
24
  flags?: GuildInviteFlags;
25
- roles?: Array<RawRole>;
25
+ roles?: Array<Pick<RawRole, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicode_emoji">>;
26
26
  }
27
27
  /** https://discord.com/developers/docs/resources/invite#invite-metadata-object-invite-metadata-structure */
28
28
  export interface RawInviteMetadata {
@@ -55,7 +55,7 @@ export interface Invite {
55
55
  stageInstance?: InviteStageInstance;
56
56
  guildScheduledEvent?: GuildScheduledEvent;
57
57
  flags?: GuildInviteFlags;
58
- roles?: Array<Role>;
58
+ roles?: Array<Pick<Role, "id" | "name" | "position" | "color" | "colors" | "icon" | "unicodeEmoji">>;
59
59
  }
60
60
  /** https://discord.com/developers/docs/resources/invite#invite-metadata-object-invite-metadata-structure */
61
61
  export interface InviteMetadata {
@@ -1,4 +1,4 @@
1
- import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes } from "../constants";
1
+ import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes, BaseThemeTypes } from "../constants";
2
2
  import type { Application, RawApplication } from "./application";
3
3
  import type { Channel, RawChannel } from "./channel";
4
4
  import type { snowflake, timestamp } from "./common";
@@ -46,6 +46,7 @@ export interface RawMessage {
46
46
  resolved?: RawResolvedData;
47
47
  poll?: RawPoll;
48
48
  call?: RawMessageCall;
49
+ shared_client_theme?: RawSharedClientTheme;
49
50
  }
50
51
  /** https://discord.com/developers/docs/resources/message#message-object-message-activity-structure */
51
52
  export interface RawMessageActivity {
@@ -208,6 +209,14 @@ export interface RawMessagePin {
208
209
  pinnet_at: timestamp;
209
210
  message: RawMessage;
210
211
  }
212
+ /** https://docs.discord.com/developers/resources/message#shared-client-theme-object */
213
+ export interface RawSharedClientTheme {
214
+ colors: Array<string>;
215
+ gradient_angle: number;
216
+ base_mix: number;
217
+ base_theme?: BaseThemeTypes | null;
218
+ }
219
+ /** https://discord.com/developers/docs/resources/message#message-object-message-structure */
211
220
  export interface Message {
212
221
  id: snowflake;
213
222
  channelId: snowflake;
@@ -245,11 +254,14 @@ export interface Message {
245
254
  resolved?: ResolvedData;
246
255
  poll?: Poll;
247
256
  call?: MessageCall;
257
+ sharedClientTheme?: SharedClientTheme;
248
258
  }
259
+ /** https://discord.com/developers/docs/resources/message#message-object-message-activity-structure */
249
260
  export interface MessageActivity {
250
261
  type: MessageActivityTypes;
251
262
  partyId?: string;
252
263
  }
264
+ /** https://discord.com/developers/docs/resources/message#message-interaction-metadata-object-message-interaction-metadata-structure */
253
265
  export interface MessageInteractionMetadata {
254
266
  id: snowflake;
255
267
  type: InteractionType;
@@ -259,10 +271,12 @@ export interface MessageInteractionMetadata {
259
271
  interactedMessageId?: snowflake;
260
272
  triggeringInteractionMetadata?: MessageInteractionMetadata;
261
273
  }
274
+ /** https://discord.com/developers/docs/resources/message#message-call-object-message-call-object-structure */
262
275
  export interface MessageCall {
263
276
  partecipants: Array<snowflake>;
264
277
  endedTimestamp?: timestamp | null;
265
278
  }
279
+ /** https://discord.com/developers/docs/resources/message#message-reference-object-message-reference-structure */
266
280
  export interface MessageReference {
267
281
  type?: MessageReferenceTypes;
268
282
  messageId?: snowflake;
@@ -270,9 +284,11 @@ export interface MessageReference {
270
284
  guildId?: snowflake;
271
285
  failIfNotExists?: boolean;
272
286
  }
287
+ /** https://discord.com/developers/docs/resources/message#message-snapshot-object-message-snapshot-structure */
273
288
  export interface MessageSnapshot {
274
289
  message: Pick<Message, "type" | "content" | "embeds" | "attachments" | "timestamp" | "editedTimestamp" | "flags" | "mentions" | "mentionRoles" | "stickers" | "stickerItems" | "components">;
275
290
  }
291
+ /** https://discord.com/developers/docs/resources/message#reaction-object-reaction-structure */
276
292
  export interface Reaction {
277
293
  count: number;
278
294
  countDetails: ReactionCountDetails;
@@ -281,10 +297,12 @@ export interface Reaction {
281
297
  emoji: Emoji;
282
298
  burstColors: Array<string>;
283
299
  }
300
+ /** https://discord.com/developers/docs/resources/message#reaction-count-details-object-reaction-count-details-structure */
284
301
  export interface ReactionCountDetails {
285
302
  burst: number;
286
303
  normal: number;
287
304
  }
305
+ /** https://discord.com/developers/docs/resources/message#embed-object-embed-structure */
288
306
  export interface Embed {
289
307
  title?: string;
290
308
  type?: EmbedTypes;
@@ -300,44 +318,52 @@ export interface Embed {
300
318
  author?: EmbedAuthor;
301
319
  fields?: Array<EmbedField>;
302
320
  }
321
+ /** https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure */
303
322
  export interface EmbedThumbnail {
304
323
  url: string;
305
324
  proxyURL?: string;
306
325
  height?: number;
307
326
  width?: number;
308
327
  }
328
+ /** https://discord.com/developers/docs/resources/message#embed-object-embed-video-structure */
309
329
  export interface EmbedVideo {
310
330
  url?: string;
311
331
  proxyURL?: string;
312
332
  height?: number;
313
333
  width?: number;
314
334
  }
335
+ /** https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure */
315
336
  export interface EmbedImage {
316
337
  url: string;
317
338
  proxyURL?: string;
318
339
  height?: number;
319
340
  width?: number;
320
341
  }
342
+ /** https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure */
321
343
  export interface EmbedProvider {
322
344
  name?: string;
323
345
  url?: string;
324
346
  }
347
+ /** https://discord.com/developers/docs/resources/message#embed-object-embed-author-structure */
325
348
  export interface EmbedAuthor {
326
349
  name: string;
327
350
  url?: string;
328
351
  iconURL?: string;
329
352
  proxyIconURL?: string;
330
353
  }
354
+ /** https://discord.com/developers/docs/resources/message#embed-object-embed-footer-structure */
331
355
  export interface EmbedFooter {
332
356
  text: string;
333
357
  iconURL?: string;
334
358
  proxyIconURL?: string;
335
359
  }
360
+ /** https://discord.com/developers/docs/resources/message#embed-object-embed-field-structure */
336
361
  export interface EmbedField {
337
362
  name: string;
338
363
  value: string;
339
364
  inline?: boolean;
340
365
  }
366
+ /** https://discord.com/developers/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields */
341
367
  export interface PollResultEmbedFields {
342
368
  pollQuestionText: string;
343
369
  victorAnswerVotes: Array<number>;
@@ -348,6 +374,7 @@ export interface PollResultEmbedFields {
348
374
  victorAnswerEmojiName?: string;
349
375
  victorAnswerEmojiAnimated?: boolean;
350
376
  }
377
+ /** https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */
351
378
  export interface Attachment {
352
379
  id: snowflake;
353
380
  filename: string;
@@ -364,12 +391,14 @@ export interface Attachment {
364
391
  waveform?: boolean;
365
392
  flags?: AttachmentFlags;
366
393
  }
394
+ /** https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure */
367
395
  export interface ChannelMention {
368
396
  id: snowflake;
369
397
  guildId: snowflake;
370
398
  type: ChannelTypes;
371
399
  name: string;
372
400
  }
401
+ /** https://discord.com/developers/docs/resources/message#allowed-mentions-object-allowed-mentions-structure */
373
402
  export interface AllowedMentions {
374
403
  parse?: Array<AllowedMentionTypes>;
375
404
  roles?: Array<snowflake>;
@@ -383,7 +412,15 @@ export interface RoleSubscriptionData {
383
412
  totalMonthsSubscribed: number;
384
413
  isRenewal: boolean;
385
414
  }
415
+ /** https://discord.com/developers/docs/resources/message#message-pin-object-message-pin-structure */
386
416
  export interface MessagePin {
387
417
  pinnetAt: timestamp;
388
418
  message: Message;
389
419
  }
420
+ /** https://docs.discord.com/developers/resources/message#shared-client-theme-object */
421
+ export interface SharedClientTheme {
422
+ colors: Array<string>;
423
+ gradientAngle: number;
424
+ baseMix: number;
425
+ baseTheme?: BaseThemeTypes | null;
426
+ }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "3.0.1-dev.24a02ed",
3
+ "version": "3.0.1-dev.59674f9",
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": "3.0.1-dev.24a02ed",
3
+ "version": "3.0.1-dev.59674f9",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",