disgroove 2.1.0-dev.118f285 → 2.1.0-dev.4618ea0

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.
@@ -51,6 +51,8 @@ export declare class Client extends EventEmitter {
51
51
  bulkEditGuildApplicationCommands(applicationId: string, guildId: string, commands: BulkEditGuildApplicationCommandsParams): Promise<Array<ApplicationCommand>>;
52
52
  /** https://discord.com/developers/docs/topics/gateway#connections */
53
53
  connect(): Promise<void>;
54
+ /** https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement */
55
+ consumeEntitlement(applicationId: string, entitlementId: string): void;
54
56
  /** https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */
55
57
  createAutoModerationRule(guildId: string, options: CreateAutoModerationRuleParams, reason?: string): Promise<AutoModerationRule>;
56
58
  /** https://discord.com/developers/docs/resources/guild#create-guild-channel */
@@ -247,6 +249,8 @@ export declare class Client extends EventEmitter {
247
249
  }): Promise<Message>;
248
250
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token */
249
251
  editWebhookWithToken(webhookId: string, webhookToken: string, options: Omit<EditWebhookParams, "channelId">, reason?: string): Promise<Webhook>;
252
+ /** https://discord.com/developers/docs/resources/poll#end-poll */
253
+ endPoll(channelId: string, messageId: string): Promise<Message>;
250
254
  /** https://discord.com/developers/docs/resources/webhook#execute-webhook */
251
255
  executeWebhook(webhookId: string, webhookToken: string, options: ExecuteWebhookParams & {
252
256
  wait: boolean;
@@ -261,7 +265,6 @@ export declare class Client extends EventEmitter {
261
265
  threadId?: string;
262
266
  wait?: boolean;
263
267
  }): Promise<Message | null>;
264
- expirePoll(channelId: string, messageId: string): Promise<Message>;
265
268
  /** https://discord.com/developers/docs/resources/channel#follow-announcement-channel */
266
269
  followChannel(channelId: string, options: {
267
270
  webhookChannelId: string;
@@ -479,6 +482,7 @@ export declare class Client extends EventEmitter {
479
482
  }>;
480
483
  /** https://discord.com/developers/docs/resources/channel#get-pinned-messages */
481
484
  getPinnedMessages(channelId: string): Promise<Array<Message>>;
485
+ /** https://discord.com/developers/docs/resources/poll#get-answer-voters */
482
486
  getPollAnswerVoters(channelId: string, messageId: string, answerId: string, options?: {
483
487
  after?: string;
484
488
  limit?: number;
@@ -131,6 +131,10 @@ class Client extends node_events_1.default {
131
131
  this.shards.set(i, new gateway_1.Shard(i, this));
132
132
  this.shards.connect();
133
133
  }
134
+ /** https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement */
135
+ consumeEntitlement(applicationId, entitlementId) {
136
+ this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEntitlementConsume(applicationId, entitlementId));
137
+ }
134
138
  /** https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */
135
139
  createAutoModerationRule(guildId, options, reason) {
136
140
  return this.rest
@@ -1244,6 +1248,12 @@ class Client extends node_events_1.default {
1244
1248
  })
1245
1249
  .then((response) => this.util.toCamelCase(response));
1246
1250
  }
1251
+ /** https://discord.com/developers/docs/resources/poll#end-poll */
1252
+ endPoll(channelId, messageId) {
1253
+ return this.rest
1254
+ .request(rest_1.RESTMethods.Post, rest_1.Endpoints.pollExpire(channelId, messageId))
1255
+ .then((response) => this.util.toCamelCase(response));
1256
+ }
1247
1257
  /** https://discord.com/developers/docs/resources/webhook#execute-webhook */
1248
1258
  executeWebhook(webhookId, webhookToken, options) {
1249
1259
  return this.rest
@@ -1300,11 +1310,6 @@ class Client extends node_events_1.default {
1300
1310
  })
1301
1311
  .then((response) => response !== null ? this.util.toCamelCase(response) : null);
1302
1312
  }
1303
- expirePoll(channelId, messageId) {
1304
- return this.rest
1305
- .request(rest_1.RESTMethods.Post, rest_1.Endpoints.pollExpire(channelId, messageId))
1306
- .then((response) => this.util.toCamelCase(response));
1307
- }
1308
1313
  /** https://discord.com/developers/docs/resources/channel#follow-announcement-channel */
1309
1314
  followChannel(channelId, options) {
1310
1315
  return this.rest
@@ -1762,6 +1767,7 @@ class Client extends node_events_1.default {
1762
1767
  .request(rest_1.RESTMethods.Get, rest_1.Endpoints.channelPins(channelId))
1763
1768
  .then((response) => response.map((message) => this.util.toCamelCase(message)));
1764
1769
  }
1770
+ /** https://discord.com/developers/docs/resources/poll#get-answer-voters */
1765
1771
  getPollAnswerVoters(channelId, messageId, answerId, options) {
1766
1772
  return this.rest
1767
1773
  .request(rest_1.RESTMethods.Get, rest_1.Endpoints.pollAnswerVoters(channelId, messageId, answerId), {
@@ -321,6 +321,10 @@ export declare enum MessageFlags {
321
321
  SuppressNotifications = 4096,
322
322
  IsVoiceMessage = 8192
323
323
  }
324
+ export declare enum MessageReferenceTypes {
325
+ Default = 0,
326
+ Forward = 1
327
+ }
324
328
  /** https://discord.com/developers/docs/resources/channel#attachment-object-attachment-flags */
325
329
  export declare enum AttachmentFlags {
326
330
  IsRemix = 4
@@ -467,6 +471,7 @@ export declare enum InviteTargetTypes {
467
471
  Stream = 1,
468
472
  EmbeddedApplication = 2
469
473
  }
474
+ /** https://discord.com/developers/docs/resources/poll#layout-type */
470
475
  export declare enum LayoutType {
471
476
  Default = 1
472
477
  }
@@ -572,9 +577,11 @@ export declare enum GatewayIntents {
572
577
  GuildScheduledEvents = 65536,
573
578
  AutoModerationConfiguration = 1048576,
574
579
  AutoModerationActionExecution = 2097152,
575
- AllNonPrivileged = 3243773,
580
+ GuildMessagePolls = 16777216,
581
+ DirectMessagePolls = 33554432,
582
+ AllNonPrivileged = 53575421,
576
583
  AllPrivileged = 33026,
577
- All = 3276799
584
+ All = 53608447
578
585
  }
579
586
  /** https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types */
580
587
  export declare enum StatusTypes {
@@ -1074,6 +1081,7 @@ export declare const BitwisePermissionFlags: {
1074
1081
  readonly CreateEvents: bigint;
1075
1082
  readonly UseExternalSounds: bigint;
1076
1083
  readonly SendVoiceMessages: bigint;
1084
+ readonly SendPolls: bigint;
1077
1085
  };
1078
1086
  /** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
1079
1087
  export declare enum RoleFlags {
@@ -1093,6 +1101,8 @@ export declare enum MembershipState {
1093
1101
  }
1094
1102
  /** https://discord.com/developers/docs/monetization/skus#sku-object-sku-types */
1095
1103
  export declare enum SkuTypes {
1104
+ Durable = 2,
1105
+ Consumable = 3,
1096
1106
  Subscription = 5,
1097
1107
  SubscriptionGroup = 6
1098
1108
  }
@@ -1104,5 +1114,12 @@ export declare enum SkuFlags {
1104
1114
  }
1105
1115
  /** https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types */
1106
1116
  export declare enum EntitlementTypes {
1117
+ Purchase = 1,
1118
+ PremiumSubscription = 2,
1119
+ DeveloperGift = 3,
1120
+ TestModePurchase = 4,
1121
+ FreePurchase = 5,
1122
+ UserGift = 6,
1123
+ PremiumPurchase = 7,
1107
1124
  ApplicationSubscription = 8
1108
1125
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.InviteTargetTypes = 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.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.InterationContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = 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 = void 0;
3
+ exports.PrivacyLevel = exports.LayoutType = exports.InviteTargetTypes = 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.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.InterationContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = 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 = void 0;
5
5
  /** https://discord.com/developers/docs/reference#image-formatting-image-formats */
6
6
  var ImageFormats;
7
7
  (function (ImageFormats) {
@@ -352,6 +352,11 @@ var MessageFlags;
352
352
  MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications";
353
353
  MessageFlags[MessageFlags["IsVoiceMessage"] = 8192] = "IsVoiceMessage";
354
354
  })(MessageFlags || (exports.MessageFlags = MessageFlags = {}));
355
+ var MessageReferenceTypes;
356
+ (function (MessageReferenceTypes) {
357
+ MessageReferenceTypes[MessageReferenceTypes["Default"] = 0] = "Default";
358
+ MessageReferenceTypes[MessageReferenceTypes["Forward"] = 1] = "Forward";
359
+ })(MessageReferenceTypes || (exports.MessageReferenceTypes = MessageReferenceTypes = {}));
355
360
  /** https://discord.com/developers/docs/resources/channel#attachment-object-attachment-flags */
356
361
  var AttachmentFlags;
357
362
  (function (AttachmentFlags) {
@@ -518,6 +523,7 @@ var InviteTargetTypes;
518
523
  InviteTargetTypes[InviteTargetTypes["Stream"] = 1] = "Stream";
519
524
  InviteTargetTypes[InviteTargetTypes["EmbeddedApplication"] = 2] = "EmbeddedApplication";
520
525
  })(InviteTargetTypes || (exports.InviteTargetTypes = InviteTargetTypes = {}));
526
+ /** https://discord.com/developers/docs/resources/poll#layout-type */
521
527
  var LayoutType;
522
528
  (function (LayoutType) {
523
529
  LayoutType[LayoutType["Default"] = 1] = "Default";
@@ -634,9 +640,11 @@ var GatewayIntents;
634
640
  GatewayIntents[GatewayIntents["GuildScheduledEvents"] = 65536] = "GuildScheduledEvents";
635
641
  GatewayIntents[GatewayIntents["AutoModerationConfiguration"] = 1048576] = "AutoModerationConfiguration";
636
642
  GatewayIntents[GatewayIntents["AutoModerationActionExecution"] = 2097152] = "AutoModerationActionExecution";
637
- GatewayIntents[GatewayIntents["AllNonPrivileged"] = 3243773] = "AllNonPrivileged";
643
+ GatewayIntents[GatewayIntents["GuildMessagePolls"] = 16777216] = "GuildMessagePolls";
644
+ GatewayIntents[GatewayIntents["DirectMessagePolls"] = 33554432] = "DirectMessagePolls";
645
+ GatewayIntents[GatewayIntents["AllNonPrivileged"] = 53575421] = "AllNonPrivileged";
638
646
  GatewayIntents[GatewayIntents["AllPrivileged"] = 33026] = "AllPrivileged";
639
- GatewayIntents[GatewayIntents["All"] = 3276799] = "All";
647
+ GatewayIntents[GatewayIntents["All"] = 53608447] = "All";
640
648
  })(GatewayIntents || (exports.GatewayIntents = GatewayIntents = {}));
641
649
  /** https://discord.com/developers/docs/topics/gateway-events#update-presence-status-types */
642
650
  var StatusTypes;
@@ -1149,6 +1157,7 @@ exports.BitwisePermissionFlags = {
1149
1157
  CreateEvents: 1n << 44n,
1150
1158
  UseExternalSounds: 1n << 45n,
1151
1159
  SendVoiceMessages: 1n << 46n,
1160
+ SendPolls: 1n << 49n,
1152
1161
  };
1153
1162
  /** https://discord.com/developers/docs/topics/permissions#role-object-role-flags */
1154
1163
  var RoleFlags;
@@ -1172,6 +1181,8 @@ var MembershipState;
1172
1181
  /** https://discord.com/developers/docs/monetization/skus#sku-object-sku-types */
1173
1182
  var SkuTypes;
1174
1183
  (function (SkuTypes) {
1184
+ SkuTypes[SkuTypes["Durable"] = 2] = "Durable";
1185
+ SkuTypes[SkuTypes["Consumable"] = 3] = "Consumable";
1175
1186
  SkuTypes[SkuTypes["Subscription"] = 5] = "Subscription";
1176
1187
  SkuTypes[SkuTypes["SubscriptionGroup"] = 6] = "SubscriptionGroup";
1177
1188
  })(SkuTypes || (exports.SkuTypes = SkuTypes = {}));
@@ -1185,5 +1196,12 @@ var SkuFlags;
1185
1196
  /** https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types */
1186
1197
  var EntitlementTypes;
1187
1198
  (function (EntitlementTypes) {
1199
+ EntitlementTypes[EntitlementTypes["Purchase"] = 1] = "Purchase";
1200
+ EntitlementTypes[EntitlementTypes["PremiumSubscription"] = 2] = "PremiumSubscription";
1201
+ EntitlementTypes[EntitlementTypes["DeveloperGift"] = 3] = "DeveloperGift";
1202
+ EntitlementTypes[EntitlementTypes["TestModePurchase"] = 4] = "TestModePurchase";
1203
+ EntitlementTypes[EntitlementTypes["FreePurchase"] = 5] = "FreePurchase";
1204
+ EntitlementTypes[EntitlementTypes["UserGift"] = 6] = "UserGift";
1205
+ EntitlementTypes[EntitlementTypes["PremiumPurchase"] = 7] = "PremiumPurchase";
1188
1206
  EntitlementTypes[EntitlementTypes["ApplicationSubscription"] = 8] = "ApplicationSubscription";
1189
1207
  })(EntitlementTypes || (exports.EntitlementTypes = EntitlementTypes = {}));
@@ -72,6 +72,7 @@ export declare const applicationCommands: (applicationId: string) => `applicatio
72
72
  export declare const applicationCommandPermissions: (applicationId: string, guildId: string, commandId: string) => `applications/${string}/guilds/${string}/commands/${string}/permissions`;
73
73
  export declare const applicationCurrentUser: () => "applications/@me";
74
74
  export declare const applicationEntitlement: (applicationId: string, entitlementId: string) => `applications/${string}/entitlements/${string}`;
75
+ export declare const applicationEntitlementConsume: (applicationId: string, entitlementId: string) => `applications/${string}/entitlements/${string}/consume`;
75
76
  export declare const applicationEntitlements: (applicationId: string) => `applications/${string}/entitlements`;
76
77
  export declare const applicationGuildCommand: (applicationId: string, guildId: string, commandId: string) => `applications/${string}/guilds/${string}/commands/${string}`;
77
78
  export declare const applicationGuildCommands: (applicationId: string, guildId: string) => `applications/${string}/guilds/${string}/commands`;
@@ -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.guildCurrentMemberNickname = exports.guildChannels = exports.guildBans = exports.guildBan = exports.guildAutoModerationRules = exports.guildAutoModerationRule = exports.guildAuditLog = exports.guildActiveThreads = exports.guilds = exports.guild = exports.bulkGuildBan = void 0;
4
- exports.voiceRegions = exports.stickerPacks = exports.sticker = exports.stageInstances = exports.stageInstance = exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2CurrentAuthorization = exports.oauth2CurrentApplication = exports.oauth2Authorization = exports.gatewayBot = exports.gateway = exports.webhookPlatform = exports.webhookMessage = exports.webhook = exports.guildApplicationCommandsPermissions = exports.applicationSkus = exports.applicationRoleConnectionMetadata = exports.applicationGuildCommands = exports.applicationGuildCommand = exports.applicationEntitlements = exports.applicationEntitlement = exports.applicationCurrentUser = 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.oauth2CurrentAuthorization = exports.oauth2CurrentApplication = exports.oauth2Authorization = 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.applicationCurrentUser = 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 bulkGuildBan = (guildId) => `guilds/${guildId}/bulk-ban`;
7
7
  exports.bulkGuildBan = bulkGuildBan;
@@ -162,6 +162,8 @@ const applicationCurrentUser = () => "applications/@me";
162
162
  exports.applicationCurrentUser = applicationCurrentUser;
163
163
  const applicationEntitlement = (applicationId, entitlementId) => `applications/${applicationId}/entitlements/${entitlementId}`;
164
164
  exports.applicationEntitlement = applicationEntitlement;
165
+ const applicationEntitlementConsume = (applicationId, entitlementId) => `applications/${applicationId}/entitlements/${entitlementId}/consume`;
166
+ exports.applicationEntitlementConsume = applicationEntitlementConsume;
165
167
  const applicationEntitlements = (applicationId) => `applications/${applicationId}/entitlements`;
166
168
  exports.applicationEntitlements = applicationEntitlements;
167
169
  const applicationGuildCommand = (applicationId, guildId, commandId) => `applications/${applicationId}/guilds/${guildId}/commands/${commandId}`;
@@ -1,4 +1,4 @@
1
- import type { AllowedMentionTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InviteTargetTypes, MessageActivityTypes, MessageFlags, MessageTypes, SortOrderTypes, VideoQualityModes } from "../constants";
1
+ import type { AllowedMentionTypes, ApplicationIntegrationTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InteractionType, InviteTargetTypes, MessageActivityTypes, MessageFlags, MessageReferenceTypes, MessageTypes, SortOrderTypes, VideoQualityModes } from "../constants";
2
2
  import type { RawApplication, RawGuildMember, RawUser, RawEmoji, RawSticker, RawStickerItem, RawMessageInteraction, MessageInteraction, StickerItem, Sticker, Emoji, User, Application, GuildMember, RawActionRow, ActionRow, RawResolvedData, ResolvedData, RawPollCreateParams, PollCreateParams } from ".";
3
3
  import type { File } from "../rest";
4
4
  /** https://discord.com/developers/docs/resources/channel#channel-object-channel-structure */
@@ -65,6 +65,7 @@ export interface RawMessage {
65
65
  message_reference?: RawMessageReference;
66
66
  flags?: MessageFlags;
67
67
  referenced_message?: RawMessage | null;
68
+ interaction_metadata?: RawMessageInteractionMetadata;
68
69
  interaction?: RawMessageInteraction;
69
70
  thread?: RawChannel;
70
71
  components?: Array<RawActionRow>;
@@ -80,13 +81,28 @@ export interface RawMessageActivity {
80
81
  type: MessageActivityTypes;
81
82
  party_id?: string;
82
83
  }
84
+ /** https://discord.com/developers/docs/resources/channel#message-interaction-metadata-object-message-interaction-metadata-structure */
85
+ export interface RawMessageInteractionMetadata {
86
+ id: string;
87
+ type: InteractionType;
88
+ user: RawUser;
89
+ authorizing_integration_owners: Record<ApplicationIntegrationTypes, string>;
90
+ original_response_message_id?: string;
91
+ interacted_message_id?: string;
92
+ triggering_interaction_metadata?: RawMessageInteractionMetadata;
93
+ }
83
94
  /** https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure */
84
95
  export interface RawMessageReference {
96
+ type?: MessageReferenceTypes;
85
97
  message_id?: string;
86
98
  channel_id?: string;
87
99
  guild_id?: string;
88
100
  fail_if_not_exists?: boolean;
89
101
  }
102
+ export interface RawMessageSnapshot {
103
+ message: RawMessage;
104
+ guild_id?: string;
105
+ }
90
106
  /** https://discord.com/developers/docs/resources/channel#followed-channel-object-followed-channel-structure */
91
107
  export interface RawFollowedChannel {
92
108
  channel_id: string;
@@ -303,6 +319,7 @@ export interface Message {
303
319
  messageReference?: MessageReference;
304
320
  flags?: MessageFlags;
305
321
  referencedMessage?: Message | null;
322
+ interactionMetadata?: MessageInteractionMetadata;
306
323
  interaction?: MessageInteraction;
307
324
  thread?: Channel;
308
325
  components?: Array<ActionRow>;
@@ -317,12 +334,25 @@ export interface MessageActivity {
317
334
  type: MessageActivityTypes;
318
335
  partyId?: string;
319
336
  }
337
+ export interface MessageInteractionMetadata {
338
+ id: string;
339
+ type: InteractionType;
340
+ user: User;
341
+ authorizingIntegrationOwners: Record<ApplicationIntegrationTypes, string>;
342
+ originalResponseMessageId?: string;
343
+ interactedMessageId?: string;
344
+ }
320
345
  export interface MessageReference {
346
+ type?: MessageReferenceTypes;
321
347
  messageId?: string;
322
348
  channelId?: string;
323
349
  guildId?: string;
324
350
  failIfNotExists?: boolean;
325
351
  }
352
+ export interface MessageSnapshot {
353
+ message: Message;
354
+ guildId?: string;
355
+ }
326
356
  export interface FollowedChannel {
327
357
  channelId: string;
328
358
  webhookId: string;
@@ -257,6 +257,7 @@ export interface RawVoiceServerUpdateEventFields {
257
257
  guild_id: string;
258
258
  endpoint: string | null;
259
259
  }
260
+ /** https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-add-message-poll-vote-add-fields */
260
261
  export interface RawMessagePollVoteAddFields {
261
262
  user_id: string;
262
263
  channel_id: string;
@@ -264,6 +265,7 @@ export interface RawMessagePollVoteAddFields {
264
265
  guild_id?: string;
265
266
  answer_id: number;
266
267
  }
268
+ /** https://discord.com/developers/docs/topics/gateway-events#message-poll-vote-remove */
267
269
  export interface RawMessagePollVoteRemoveFields {
268
270
  user_id: string;
269
271
  channel_id: string;
@@ -1,44 +1,57 @@
1
1
  import type { LayoutType } from "../constants";
2
2
  import type { Emoji, RawEmoji } from "./emoji";
3
+ /** https://discord.com/developers/docs/resources/poll#poll-object-poll-object-structure */
3
4
  export interface RawPoll {
4
5
  question: RawPollMedia;
5
6
  answers: Array<RawPollAnswer>;
6
- expiry: string;
7
+ expiry: string | null;
7
8
  allow_multiselect: boolean;
8
9
  layout_type: LayoutType;
9
- results: RawPollResults;
10
+ results?: RawPollResults;
10
11
  }
12
+ /** https://discord.com/developers/docs/resources/poll#poll-create-request-object-poll-create-request-object-structure */
13
+ export interface RawPollCreateParams {
14
+ question: RawPollMedia;
15
+ answers: Array<RawPollAnswer>;
16
+ duration: number;
17
+ allow_multiselect: boolean;
18
+ layout_type?: LayoutType;
19
+ }
20
+ /** https://discord.com/developers/docs/resources/poll#poll-media-object-poll-media-object-structure */
11
21
  export interface RawPollMedia {
12
22
  text?: string;
13
23
  emoji?: Pick<RawEmoji, "id" | "name">;
14
24
  }
25
+ /** https://discord.com/developers/docs/resources/poll#poll-answer-object-poll-answer-object-structure */
15
26
  export interface RawPollAnswer {
16
27
  answer_id: number;
17
28
  poll_media: RawPollMedia;
18
29
  }
30
+ /** https://discord.com/developers/docs/resources/poll#poll-results-object-poll-results-object-structure */
19
31
  export interface RawPollResults {
20
32
  is_finalized: boolean;
21
33
  answer_counts: Array<RawPollAnswerCount>;
22
34
  }
35
+ /** https://discord.com/developers/docs/resources/poll#poll-results-object-poll-answer-count-object-structure */
23
36
  export interface RawPollAnswerCount {
24
37
  id: number;
25
38
  count: number;
26
39
  me_voted: boolean;
27
40
  }
28
- export interface RawPollCreateParams {
29
- question: RawPollMedia;
30
- answers: Array<RawPollAnswer>;
31
- duration: number;
32
- allow_multiselect: boolean;
33
- layout_type?: LayoutType;
34
- }
35
41
  export interface Poll {
36
42
  question: PollMedia;
37
43
  answers: Array<PollAnswer>;
38
- expiry: string;
44
+ expiry: string | null;
39
45
  allowMultiselect: boolean;
40
46
  layoutType: LayoutType;
41
- results: PollResults;
47
+ results?: PollResults;
48
+ }
49
+ export interface PollCreateParams {
50
+ question: PollMedia;
51
+ answers: Array<PollAnswer>;
52
+ duration: number;
53
+ allowMultiselect: boolean;
54
+ layoutType?: LayoutType;
42
55
  }
43
56
  export interface PollMedia {
44
57
  text?: string;
@@ -57,10 +70,3 @@ export interface PollAnswerCount {
57
70
  count: number;
58
71
  meVoted: boolean;
59
72
  }
60
- export interface PollCreateParams {
61
- question: PollMedia;
62
- answers: Array<PollAnswer>;
63
- duration: number;
64
- allowMultiselect: boolean;
65
- layoutType?: LayoutType;
66
- }
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.1.0-dev.118f285",
3
+ "version": "2.1.0-dev.4618ea0",
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.1.0-dev.118f285",
3
+ "version": "2.1.0-dev.4618ea0",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",