disgroove 2.2.3-dev.10e8e97 → 2.2.3-dev.7806bb2

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.
@@ -136,6 +136,11 @@ export declare class Client extends EventEmitter {
136
136
  exemptRoles?: Array<snowflake>;
137
137
  exemptChannels?: Array<snowflake>;
138
138
  }, reason?: string): Promise<AutoModerationRule>;
139
+ /** https://discord.com/developers/docs/resources/emoji#create-application-emoji */
140
+ createApplicationEmoji(applicationID: snowflake, options: {
141
+ name: string;
142
+ image: string;
143
+ }): Promise<Emoji>;
139
144
  /** https://discord.com/developers/docs/resources/guild#create-guild-channel */
140
145
  createChannel(guildID: snowflake, options: {
141
146
  name: string;
@@ -367,6 +372,8 @@ export declare class Client extends EventEmitter {
367
372
  deleteAllMessageReactions(channelID: snowflake, messageID: snowflake, emoji?: string): void;
368
373
  /** https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule */
369
374
  deleteAutoModerationRule(guildID: snowflake, autoModerationRuleID: snowflake, reason?: string): void;
375
+ /** https://discord.com/developers/docs/resources/emoji#delete-application-emoji */
376
+ deleteApplicationEmoji(applicationID: snowflake, emojiID: snowflake): void;
370
377
  /** https://discord.com/developers/docs/resources/channel#deleteclose-channel */
371
378
  deleteChannel(channelID: snowflake, reason?: string): Promise<Channel>;
372
379
  /** https://discord.com/developers/docs/resources/channel#delete-channel-permission */
@@ -427,6 +434,10 @@ export declare class Client extends EventEmitter {
427
434
  editApplicationCommandPermissions(applicationID: snowflake, guildID: snowflake, commandID: snowflake, options: {
428
435
  permissions: Array<ApplicationCommandPermission>;
429
436
  }): Promise<GuildApplicationCommandPermissions>;
437
+ /** https://discord.com/developers/docs/resources/emoji#modify-application-emoji */
438
+ editApplicationEmoji(applicationID: snowflake, emojiID: snowflake, options: {
439
+ name: string;
440
+ }): Promise<Emoji>;
430
441
  /** https://discord.com/developers/docs/resources/channel#modify-channel */
431
442
  editChannel(channelID: snowflake, options: {
432
443
  name?: string;
@@ -740,6 +751,12 @@ export declare class Client extends EventEmitter {
740
751
  getAutoModerationRules(guildID: snowflake): Promise<Array<AutoModerationRule>>;
741
752
  /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
742
753
  getApplicationCommandPermissions(applicationID: snowflake, guildID: snowflake, commandID: snowflake): Promise<GuildApplicationCommandPermissions>;
754
+ /** https://discord.com/developers/docs/resources/emoji#get-application-emoji */
755
+ getApplicationEmoji(applicationID: snowflake, emojiID: snowflake): Promise<Emoji>;
756
+ /** https://discord.com/developers/docs/resources/emoji#list-application-emojis */
757
+ getApplicationEmojis(applicationID: snowflake): Promise<{
758
+ items: Array<Emoji>;
759
+ }>;
743
760
  /** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
744
761
  getApplicationRoleConnectionMetadataRecords(applicationID: snowflake): Promise<Array<ApplicationRoleConnectionMetadata>>;
745
762
  /** https://discord.com/developers/docs/resources/channel#get-channel */
@@ -799,7 +816,7 @@ export declare class Client extends EventEmitter {
799
816
  after?: snowflake;
800
817
  limit?: number;
801
818
  withCounts?: boolean;
802
- }): Promise<Array<Pick<Guild, "id" | "name" | "icon" | "owner" | "permissions" | "features" | "approximateMemberCount" | "approximatePresenceCount">>>;
819
+ }): Promise<Array<Pick<Guild, "id" | "name" | "icon" | "banner" | "owner" | "permissions" | "features" | "approximateMemberCount" | "approximatePresenceCount">>>;
803
820
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
804
821
  getGuildApplicationCommand(applicationID: snowflake, guildID: snowflake, commandID: snowflake): Promise<ApplicationCommand>;
805
822
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
@@ -183,6 +183,13 @@ class Client extends node_events_1.default {
183
183
  });
184
184
  return transformers_1.AutoModeration.autoModerationRuleFromRaw(response);
185
185
  }
186
+ /** https://discord.com/developers/docs/resources/emoji#create-application-emoji */
187
+ async createApplicationEmoji(applicationID, options) {
188
+ const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEmojis(applicationID), {
189
+ json: options,
190
+ });
191
+ return transformers_1.Emojis.emojiFromRaw(response);
192
+ }
186
193
  /** https://discord.com/developers/docs/resources/guild#create-guild-channel */
187
194
  async createChannel(guildID, options, reason) {
188
195
  const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.guildChannels(guildID), {
@@ -707,6 +714,10 @@ class Client extends node_events_1.default {
707
714
  reason,
708
715
  });
709
716
  }
717
+ /** https://discord.com/developers/docs/resources/emoji#delete-application-emoji */
718
+ deleteApplicationEmoji(applicationID, emojiID) {
719
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.applicationEmoji(applicationID, emojiID));
720
+ }
710
721
  /** https://discord.com/developers/docs/resources/channel#deleteclose-channel */
711
722
  async deleteChannel(channelID, reason) {
712
723
  const response = await this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.channel(channelID), {
@@ -856,6 +867,13 @@ class Client extends node_events_1.default {
856
867
  });
857
868
  return transformers_1.Guilds.guildApplicationCommandPermissionsFromRaw(response);
858
869
  }
870
+ /** https://discord.com/developers/docs/resources/emoji#modify-application-emoji */
871
+ async editApplicationEmoji(applicationID, emojiID, options) {
872
+ const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.applicationEmoji(applicationID, emojiID), {
873
+ json: options,
874
+ });
875
+ return transformers_1.Emojis.emojiFromRaw(response);
876
+ }
859
877
  /** https://discord.com/developers/docs/resources/channel#modify-channel */
860
878
  async editChannel(channelID, options, reason) {
861
879
  const response = await this.rest.request(rest_1.RESTMethods.Patch, rest_1.Endpoints.channel(channelID), {
@@ -1546,6 +1564,18 @@ class Client extends node_events_1.default {
1546
1564
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommandPermissions(applicationID, guildID, commandID));
1547
1565
  return transformers_1.Guilds.guildApplicationCommandPermissionsFromRaw(response);
1548
1566
  }
1567
+ /** https://discord.com/developers/docs/resources/emoji#get-application-emoji */
1568
+ async getApplicationEmoji(applicationID, emojiID) {
1569
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEmoji(applicationID, emojiID));
1570
+ return transformers_1.Emojis.emojiFromRaw(response);
1571
+ }
1572
+ /** https://discord.com/developers/docs/resources/emoji#list-application-emojis */
1573
+ async getApplicationEmojis(applicationID) {
1574
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEmojis(applicationID));
1575
+ return {
1576
+ items: response.items.map((emoji) => transformers_1.Emojis.emojiFromRaw(emoji)),
1577
+ };
1578
+ }
1549
1579
  /** https://discord.com/developers/docs/resources/application-role-connection-metadata#get-application-role-connection-metadata-records */
1550
1580
  async getApplicationRoleConnectionMetadataRecords(applicationID) {
1551
1581
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationRoleConnectionMetadata(applicationID));
@@ -1675,6 +1705,7 @@ class Client extends node_events_1.default {
1675
1705
  return response.map((guild) => ({
1676
1706
  id: guild.id,
1677
1707
  name: guild.name,
1708
+ banner: guild.banner,
1678
1709
  icon: guild.icon,
1679
1710
  owner: guild.owner,
1680
1711
  permissions: guild.permissions,
@@ -353,6 +353,11 @@ export declare enum MessageFlags {
353
353
  SuppressNotifications = 4096,
354
354
  IsVoiceMessage = 8192
355
355
  }
356
+ /** https://discord.com/developers/docs/resources/channel#message-object-message-reference-types */
357
+ export declare enum MessageReferenceTypes {
358
+ Default = 0,
359
+ Forward = 1
360
+ }
356
361
  /** https://discord.com/developers/docs/resources/channel#attachment-object-attachment-flags */
357
362
  export declare enum AttachmentFlags {
358
363
  IsRemix = 4
@@ -569,6 +574,7 @@ export declare enum Services {
569
574
  Playstation = "playstation",
570
575
  Reddit = "reddit",
571
576
  RiotGames = "riotgames",
577
+ Roblox = "roblox",
572
578
  Spotify = "spotify",
573
579
  Skype = "skype",
574
580
  Steam = "steam",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InviteTypes = 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.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = exports.ApplicationIntegrationTypes = exports.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.ComponentTypes = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = 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.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.InviteTargetTypes = void 0;
3
+ 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.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = exports.ApplicationIntegrationTypes = exports.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.ComponentTypes = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = 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.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = 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) {
@@ -386,6 +386,12 @@ var MessageFlags;
386
386
  MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications";
387
387
  MessageFlags[MessageFlags["IsVoiceMessage"] = 8192] = "IsVoiceMessage";
388
388
  })(MessageFlags || (exports.MessageFlags = MessageFlags = {}));
389
+ /** https://discord.com/developers/docs/resources/channel#message-object-message-reference-types */
390
+ var MessageReferenceTypes;
391
+ (function (MessageReferenceTypes) {
392
+ MessageReferenceTypes[MessageReferenceTypes["Default"] = 0] = "Default";
393
+ MessageReferenceTypes[MessageReferenceTypes["Forward"] = 1] = "Forward";
394
+ })(MessageReferenceTypes || (exports.MessageReferenceTypes = MessageReferenceTypes = {}));
389
395
  /** https://discord.com/developers/docs/resources/channel#attachment-object-attachment-flags */
390
396
  var AttachmentFlags;
391
397
  (function (AttachmentFlags) {
@@ -631,6 +637,7 @@ var Services;
631
637
  Services["Playstation"] = "playstation";
632
638
  Services["Reddit"] = "reddit";
633
639
  Services["RiotGames"] = "riotgames";
640
+ Services["Roblox"] = "roblox";
634
641
  Services["Spotify"] = "spotify";
635
642
  Services["Skype"] = "skype";
636
643
  Services["Steam"] = "steam";
@@ -72,6 +72,8 @@ export declare const applicationCommand: (applicationID: snowflake, commandID: s
72
72
  export declare const applicationCommands: (applicationID: snowflake) => `applications/${string}/commands`;
73
73
  export declare const applicationCommandPermissions: (applicationID: snowflake, guildID: snowflake, commandID: snowflake) => `applications/${string}/guilds/${string}/commands/${string}/permissions`;
74
74
  export declare const applicationUser: () => "applications/@me";
75
+ export declare const applicationEmoji: (applicationID: snowflake, emojiID: snowflake) => `applications/${string}/emojis/${string}`;
76
+ export declare const applicationEmojis: (applicationID: snowflake) => `applications/${string}/emojis`;
75
77
  export declare const applicationEntitlement: (applicationID: snowflake, entitlementID: snowflake) => `applications/${string}/entitlements/${string}`;
76
78
  export declare const applicationEntitlementConsume: (applicationID: snowflake, entitlementID: snowflake) => `applications/${string}/entitlements/${string}/consume`;
77
79
  export declare const applicationEntitlements: (applicationID: snowflake) => `applications/${string}/entitlements`;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.channelMessageCrosspost = exports.channelMessageAllReactions = exports.channelMessage = exports.channelInvites = 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.guildScheduledEventUsers = exports.guildScheduledEvents = exports.guildScheduledEvent = exports.guildRoles = 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.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.voiceRegions = exports.stickerPacks = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSKUs = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlementConsume = exports.applicationEntitlement = exports.applicationUser = exports.applicationCommandPermissions = exports.applicationCommands = exports.applicationCommand = 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 = void 0;
4
+ exports.voiceRegions = exports.stickerPacks = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = 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.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 = void 0;
5
5
  // Guilds
6
6
  const guild = (guildID) => `guilds/${guildID}`;
7
7
  exports.guild = guild;
@@ -160,6 +160,10 @@ const applicationCommandPermissions = (applicationID, guildID, commandID) => `ap
160
160
  exports.applicationCommandPermissions = applicationCommandPermissions;
161
161
  const applicationUser = () => "applications/@me";
162
162
  exports.applicationUser = applicationUser;
163
+ const applicationEmoji = (applicationID, emojiID) => `applications/${applicationID}/emojis/${emojiID}`;
164
+ exports.applicationEmoji = applicationEmoji;
165
+ const applicationEmojis = (applicationID) => `applications/${applicationID}/emojis`;
166
+ exports.applicationEmojis = applicationEmojis;
163
167
  const applicationEntitlement = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}`;
164
168
  exports.applicationEntitlement = applicationEntitlement;
165
169
  const applicationEntitlementConsume = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}/consume`;
@@ -499,6 +499,7 @@ class Channels {
499
499
  ? Applications_1.Applications.applicationFromRaw(message.application)
500
500
  : undefined,
501
501
  applicationID: message.application_id,
502
+ flags: message.flags,
502
503
  messageReference: message.message_reference !== undefined
503
504
  ? {
504
505
  messageID: message.message_reference.message_id,
@@ -507,7 +508,19 @@ class Channels {
507
508
  failIfNotExists: message.message_reference.fail_if_not_exists,
508
509
  }
509
510
  : undefined,
510
- flags: message.flags,
511
+ messageSnapshots: message.message_snapshots?.map((messageSnapshot) => ({
512
+ message: {
513
+ type: messageSnapshot.message.type,
514
+ content: messageSnapshot.message.content,
515
+ embeds: messageSnapshot.message.embeds.map((embed) => this.embedFromRaw(embed)),
516
+ attachments: messageSnapshot.message.attachments.map((attachment) => this.attachmentFromRaw(attachment)),
517
+ timestamp: messageSnapshot.message.timestamp,
518
+ editedTimestamp: messageSnapshot.message.edited_timestamp,
519
+ flags: messageSnapshot.message.flags,
520
+ mentions: messageSnapshot.message.mentions.map((user) => Users_1.Users.userFromRaw(user)),
521
+ mentionRoles: messageSnapshot.message.mention_roles,
522
+ },
523
+ })),
511
524
  referencedMessage: message.referenced_message !== undefined
512
525
  ? message.referenced_message !== null
513
526
  ? Channels.messageFromRaw(message.referenced_message)
@@ -594,6 +607,7 @@ class Channels {
594
607
  ? Applications_1.Applications.applicationToRaw(message.application)
595
608
  : undefined,
596
609
  application_id: message.applicationID,
610
+ flags: message.flags,
597
611
  message_reference: message.messageReference !== undefined
598
612
  ? {
599
613
  message_id: message.messageReference.messageID,
@@ -602,7 +616,19 @@ class Channels {
602
616
  fail_if_not_exists: message.messageReference.failIfNotExists,
603
617
  }
604
618
  : undefined,
605
- flags: message.flags,
619
+ message_snapshots: message.messageSnapshots?.map((messageSnapshot) => ({
620
+ message: {
621
+ type: messageSnapshot.message.type,
622
+ content: messageSnapshot.message.content,
623
+ embeds: messageSnapshot.message.embeds.map((embed) => this.embedToRaw(embed)),
624
+ attachments: messageSnapshot.message.attachments.map((attachment) => this.attachmentToRaw(attachment)),
625
+ timestamp: messageSnapshot.message.timestamp,
626
+ edited_timestamp: messageSnapshot.message.editedTimestamp,
627
+ flags: messageSnapshot.message.flags,
628
+ mentions: messageSnapshot.message.mentions.map((user) => Users_1.Users.userToRaw(user)),
629
+ mention_roles: messageSnapshot.message.mentionRoles,
630
+ },
631
+ })),
606
632
  referenced_message: message.referencedMessage !== undefined
607
633
  ? message.referencedMessage !== null
608
634
  ? Channels.messageToRaw(message.referencedMessage)
@@ -1,4 +1,4 @@
1
- import type { AllowedMentionTypes, ApplicationIntegrationTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InteractionType, MessageActivityTypes, MessageFlags, MessageTypes, SortOrderTypes, VideoQualityModes } from "../constants";
1
+ import type { AllowedMentionTypes, ApplicationIntegrationTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InteractionType, MessageActivityTypes, MessageFlags, MessageReferenceTypes, MessageTypes, SortOrderTypes, VideoQualityModes } from "../constants";
2
2
  import type { RawApplication, Application } from "./application";
3
3
  import type { snowflake, timestamp } from "./common";
4
4
  import type { RawEmoji, Emoji } from "./emoji";
@@ -69,8 +69,9 @@ export interface RawMessage {
69
69
  activity?: RawMessageActivity;
70
70
  application?: RawApplication;
71
71
  application_id?: snowflake;
72
- message_reference?: RawMessageReference;
73
72
  flags?: MessageFlags;
73
+ message_reference?: RawMessageReference;
74
+ message_snapshots?: Array<RawMessageSnapshot>;
74
75
  referenced_message?: RawMessage | null;
75
76
  interaction_metadata?: RawMessageInteractionMetadata;
76
77
  interaction?: RawMessageInteraction;
@@ -106,11 +107,16 @@ export interface RawMessageCall {
106
107
  }
107
108
  /** https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure */
108
109
  export interface RawMessageReference {
110
+ type?: MessageReferenceTypes;
109
111
  message_id?: snowflake;
110
112
  channel_id?: snowflake;
111
113
  guild_id?: snowflake;
112
114
  fail_if_not_exists?: boolean;
113
115
  }
116
+ /** https://discord.com/developers/docs/resources/channel#message-snapshot-object-message-snapshot-structure */
117
+ export interface RawMessageSnapshot {
118
+ message: Pick<RawMessage, "type" | "content" | "embeds" | "attachments" | "timestamp" | "edited_timestamp" | "flags" | "mentions" | "mention_roles">;
119
+ }
114
120
  /** https://discord.com/developers/docs/resources/channel#followed-channel-object-followed-channel-structure */
115
121
  export interface RawFollowedChannel {
116
122
  channel_id: snowflake;
@@ -325,8 +331,9 @@ export interface Message {
325
331
  activity?: MessageActivity;
326
332
  application?: Application;
327
333
  applicationID?: snowflake;
328
- messageReference?: MessageReference;
329
334
  flags?: MessageFlags;
335
+ messageReference?: MessageReference;
336
+ messageSnapshots?: Array<MessageSnapshot>;
330
337
  referencedMessage?: Message | null;
331
338
  interactionMetadata?: MessageInteractionMetadata;
332
339
  interaction?: MessageInteraction;
@@ -358,11 +365,15 @@ export interface MessageCall {
358
365
  endedTimestamp?: timestamp | null;
359
366
  }
360
367
  export interface MessageReference {
368
+ type?: MessageReferenceTypes;
361
369
  messageID?: snowflake;
362
370
  channelID?: snowflake;
363
371
  guildID?: snowflake;
364
372
  failIfNotExists?: boolean;
365
373
  }
374
+ export interface MessageSnapshot {
375
+ message: Pick<Message, "type" | "content" | "embeds" | "attachments" | "timestamp" | "editedTimestamp" | "flags" | "mentions" | "mentionRoles">;
376
+ }
366
377
  export interface FollowedChannel {
367
378
  channelID: snowflake;
368
379
  webhookID: snowflake;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.2.3-dev.10e8e97",
3
+ "version": "2.2.3-dev.7806bb2",
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.3-dev.10e8e97",
3
+ "version": "2.2.3-dev.7806bb2",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",