disgroove 2.2.4-dev.e509559 → 2.2.4

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
@@ -54,3 +54,4 @@ client.connect();
54
54
  ```
55
55
 
56
56
  More examples on the [GitHub repository](https://github.com/XenKys/disgroove/tree/main/examples)
57
+ For support and more join the [Discord server](https://discord.gg/kunfRQgRyD)
@@ -3,7 +3,7 @@ import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetSt
3
3
  import { RequestManager, type File } from "./rest";
4
4
  import EventEmitter from "node:events";
5
5
  import { Shard } from "./gateway";
6
- import type { Application, ApplicationIntegrationTypeConfiguration, InstallParams } from "./types/application";
6
+ import type { ActivityInstance, Application, ApplicationIntegrationTypeConfiguration, InstallParams } from "./types/application";
7
7
  import type { ApplicationCommand, GuildApplicationCommandPermissions, ApplicationCommandOption, ApplicationCommandPermission } from "./types/application-command";
8
8
  import type { ApplicationRoleConnectionMetadata } from "./types/application-role-connection-metadata";
9
9
  import type { AuditLog, AuditLogEntry } from "./types/audit-log";
@@ -12,7 +12,7 @@ import type { Channel, FollowedChannel, ThreadMember, Overwrite, DefaultReaction
12
12
  import type { LocaleMap, snowflake, timestamp } from "./types/common";
13
13
  import type { Emoji } from "./types/emoji";
14
14
  import type { Entitlement } from "./types/entitlements";
15
- import type { AutoModerationActionExecutionEventFields, ChannelPinsUpdateEventFields, ThreadListSyncEventFields, ThreadMemberUpdateEventExtraFields, ThreadMembersUpdateEventFields, GuildCreateEventExtraFields, GuildAuditLogEntryCreateExtraFields, GuildBanAddEventFields, GuildBanRemoveEventFields, GuildMemberAddEventExtraFields, GuildMemberRemoveEventFields, GuildMemberUpdateEventFields, GuildMembersChunkEventFields, IntegrationCreateEventExtraFields, IntegrationUpdateEventExtraFields, IntegrationDeleteEventFields, InviteCreateEventFields, InviteDeleteEventFields, MessageCreateEventExtraFields, MessageDeleteEventFields, MessageDeleteBulkEventFields, MessageReactionAddEventFields, MessageReactionRemoveEventFields, MessageReactionRemoveAllEventFields, MessageReactionRemoveEmojiEventFields, PresenceUpdateEventFields, TypingStartEventFields, VoiceServerUpdateEventFields, MessagePollVoteAddFields, MessagePollVoteRemoveFields, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties } from "./types/gateway-events";
15
+ import type { AutoModerationActionExecutionEventFields, ChannelPinsUpdateEventFields, ThreadListSyncEventFields, ThreadMemberUpdateEventExtraFields, ThreadMembersUpdateEventFields, GuildCreateEventExtraFields, GuildAuditLogEntryCreateExtraFields, GuildBanAddEventFields, GuildBanRemoveEventFields, GuildMemberAddEventExtraFields, GuildMemberRemoveEventFields, GuildMemberUpdateEventFields, GuildMembersChunkEventFields, IntegrationCreateEventExtraFields, IntegrationUpdateEventExtraFields, IntegrationDeleteEventFields, InviteCreateEventFields, InviteDeleteEventFields, MessageCreateEventExtraFields, MessageDeleteEventFields, MessageDeleteBulkEventFields, MessageReactionAddEventFields, MessageReactionRemoveEventFields, MessageReactionRemoveAllEventFields, MessageReactionRemoveEmojiEventFields, PresenceUpdateEventFields, TypingStartEventFields, VoiceServerUpdateEventFields, MessagePollVoteAddFields, MessagePollVoteRemoveFields, GatewayPresenceUpdate, RawPayload, IdentifyConnectionProperties, VoiceChannelEffectSendEventFields } from "./types/gateway-events";
16
16
  import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel } from "./types/guild";
17
17
  import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata, GuildScheduledEventRecurrenceRule } from "./types/guild-scheduled-event";
18
18
  import type { GuildTemplate } from "./types/guild-template";
@@ -29,6 +29,7 @@ import type { VoiceRegion, VoiceState } from "./types/voice";
29
29
  import type { Webhook } from "./types/webhook";
30
30
  import type { ClientOptions as WebSocketOptions } from "ws";
31
31
  import type { Embed, AllowedMentions, Attachment, Message, MessageReference } from "./types/message";
32
+ import { Subscription } from "./types/subscription";
32
33
  export interface GatewayOptions {
33
34
  properties?: IdentifyConnectionProperties;
34
35
  compress?: boolean;
@@ -124,7 +125,7 @@ export declare class Client extends EventEmitter {
124
125
  }>): Promise<Array<ApplicationCommand>>;
125
126
  /** https://discord.com/developers/docs/topics/gateway#connections */
126
127
  connect(): Promise<void>;
127
- /** https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement */
128
+ /** https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement */
128
129
  consumeEntitlement(applicationID: snowflake, entitlementID: snowflake): void;
129
130
  /** https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */
130
131
  createAutoModerationRule(guildID: snowflake, options: {
@@ -331,7 +332,7 @@ export declare class Client extends EventEmitter {
331
332
  sendStartNotifications?: boolean;
332
333
  guildScheduledEventID?: snowflake;
333
334
  }, reason?: string): Promise<StageInstance>;
334
- /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
335
+ /** https://discord.com/developers/docs/resources/entitlement#create-test-entitlement */
335
336
  createTestEntitlement(applicationID: snowflake, options: {
336
337
  skuID: snowflake;
337
338
  ownerID: snowflake;
@@ -608,7 +609,7 @@ export declare class Client extends EventEmitter {
608
609
  entityType?: GuildScheduledEventEntityTypes;
609
610
  status?: GuildScheduledEventStatus;
610
611
  image?: string;
611
- recurrenceRule?: GuildScheduledEventRecurrenceRule;
612
+ recurrenceRule?: GuildScheduledEventRecurrenceRule | null;
612
613
  }, reason?: string): Promise<GuildScheduledEvent>;
613
614
  /** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
614
615
  editGuildSticker(guildID: snowflake, stickerID: snowflake, options: {
@@ -752,6 +753,8 @@ export declare class Client extends EventEmitter {
752
753
  getAutoModerationRule(guildID: snowflake, ruleID: snowflake): Promise<AutoModerationRule>;
753
754
  /** https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild */
754
755
  getAutoModerationRules(guildID: snowflake): Promise<Array<AutoModerationRule>>;
756
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-activity-instance */
757
+ getApplicationActivityInstance(applicationID: snowflake, instanceID: string): Promise<ActivityInstance>;
755
758
  /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
756
759
  getApplicationCommandPermissions(applicationID: snowflake, guildID: snowflake, commandID: snowflake): Promise<GuildApplicationCommandPermissions>;
757
760
  /** https://discord.com/developers/docs/resources/emoji#get-application-emoji */
@@ -780,7 +783,7 @@ export declare class Client extends EventEmitter {
780
783
  getCurrentUserConnections(): Promise<Array<Connection>>;
781
784
  /** https://discord.com/developers/docs/resources/voice#get-current-user-voice-state */
782
785
  getCurrentUserVoiceState(guildID: snowflake): Promise<VoiceState>;
783
- /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
786
+ /** https://discord.com/developers/docs/resources/entitlement#list-entitlements */
784
787
  getEntitlements(applicationID: snowflake, options?: {
785
788
  userID?: snowflake;
786
789
  skuIDs?: Array<snowflake>;
@@ -861,6 +864,8 @@ export declare class Client extends EventEmitter {
861
864
  }): Promise<{
862
865
  pruned: number;
863
866
  }>;
867
+ /** https://discord.com/developers/docs/resources/guild#get-guild-role */
868
+ getGuildRole(guildID: snowflake, roleID: snowflake): Promise<Role>;
864
869
  /** https://discord.com/developers/docs/resources/guild#get-guild-roles */
865
870
  getGuildRoles(guildID: snowflake): Promise<Array<Role>>;
866
871
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild */
@@ -955,10 +960,21 @@ export declare class Client extends EventEmitter {
955
960
  }): Promise<{
956
961
  users: Array<User>;
957
962
  }>;
958
- /** https://discord.com/developers/docs/monetization/skus#list-skus */
963
+ /** https://discord.com/developers/docs/resources/sku#list-skus */
959
964
  getSKUs(applicationID: snowflake): Promise<Array<SKU>>;
965
+ /** https://discord.com/developers/docs/resources/subscription#get-sku-subscription */
966
+ getSKUSubscription(skuID: snowflake, subscriptionID: snowflake): Promise<Subscription>;
967
+ /** https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions */
968
+ getSKUSubscriptions(skuID: snowflake, options: {
969
+ before?: snowflake;
970
+ after?: snowflake;
971
+ limit?: number;
972
+ userID?: snowflake;
973
+ }): Promise<Array<Subscription>>;
960
974
  /** https://discord.com/developers/docs/resources/stage-instance#get-stage-instance */
961
975
  getStageInstance(channelID: snowflake): Promise<StageInstance>;
976
+ /** https://discord.com/developers/docs/resources/sticker#get-sticker-pack */
977
+ getStickerPack(packID: snowflake): Promise<StickerPack>;
962
978
  /** https://discord.com/developers/docs/resources/sticker#list-sticker-packs */
963
979
  getStickerPacks(): Promise<{
964
980
  stickerPacks: Array<StickerPack>;
@@ -1133,8 +1149,12 @@ export interface ClientEvents {
1133
1149
  stageInstanceCreate: [stageInstance: StageInstance];
1134
1150
  stageInstanceUpdate: [stageInstance: StageInstance];
1135
1151
  stageInstanceDelete: [stageInstance: StageInstance];
1152
+ subscriptionCreate: [subscription: Subscription];
1153
+ subscriptionUpdate: [subscription: Subscription];
1154
+ subscriptionDelete: [subscription: Subscription];
1136
1155
  typingStart: [typing: TypingStartEventFields];
1137
1156
  userUpdate: [user: User];
1157
+ voiceChannelEffectSend: [voiceEffect: VoiceChannelEffectSendEventFields];
1138
1158
  voiceStateUpdate: [voiceState: VoiceState];
1139
1159
  voiceServerUpdate: [voiceServer: VoiceServerUpdateEventFields];
1140
1160
  webhooksUpdate: [channelID: snowflake, guildID: snowflake];
@@ -160,7 +160,7 @@ class Client extends node_events_1.default {
160
160
  this.shards.set(i, new gateway_1.Shard(i, this));
161
161
  this.shards.forEach((shard) => shard.connect());
162
162
  }
163
- /** https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement */
163
+ /** https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement */
164
164
  consumeEntitlement(applicationID, entitlementID) {
165
165
  this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEntitlementConsume(applicationID, entitlementID));
166
166
  }
@@ -636,7 +636,7 @@ class Client extends node_events_1.default {
636
636
  });
637
637
  return transformers_1.StageInstances.stageInstanceFromRaw(response);
638
638
  }
639
- /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
639
+ /** https://discord.com/developers/docs/resources/entitlement#create-test-entitlement */
640
640
  async createTestEntitlement(applicationID, options) {
641
641
  const response = await this.rest.request(rest_1.RESTMethods.Post, rest_1.Endpoints.applicationEntitlements(applicationID), {
642
642
  json: {
@@ -1159,7 +1159,9 @@ class Client extends node_events_1.default {
1159
1159
  status: options.status,
1160
1160
  image: options.image,
1161
1161
  recurrence_rule: options.recurrenceRule !== undefined
1162
- ? transformers_1.GuildScheduledEvents.guildScheduledEventRecurrenceRuleToRaw(options.recurrenceRule)
1162
+ ? options.recurrenceRule !== null
1163
+ ? transformers_1.GuildScheduledEvents.guildScheduledEventRecurrenceRuleToRaw(options.recurrenceRule)
1164
+ : null
1163
1165
  : undefined,
1164
1166
  },
1165
1167
  reason,
@@ -1565,6 +1567,22 @@ class Client extends node_events_1.default {
1565
1567
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildAutoModerationRules(guildID));
1566
1568
  return response.map((autoModerationRule) => transformers_1.AutoModeration.autoModerationRuleFromRaw(autoModerationRule));
1567
1569
  }
1570
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-activity-instance */
1571
+ async getApplicationActivityInstance(applicationID, instanceID) {
1572
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationActivityInstance(applicationID, instanceID));
1573
+ return {
1574
+ applicationID: response.application_id,
1575
+ instanceID: response.instance_id,
1576
+ launchID: response.launch_id,
1577
+ location: {
1578
+ id: response.location.id,
1579
+ kind: response.location.kind,
1580
+ channelID: response.location.channel_id,
1581
+ guildID: response.location.guild_id,
1582
+ },
1583
+ users: response.users,
1584
+ };
1585
+ }
1568
1586
  /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
1569
1587
  async getApplicationCommandPermissions(applicationID, guildID, commandID) {
1570
1588
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationCommandPermissions(applicationID, guildID, commandID));
@@ -1647,7 +1665,7 @@ class Client extends node_events_1.default {
1647
1665
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildVoiceState(guildID));
1648
1666
  return transformers_1.Voice.voiceStateFromRaw(response);
1649
1667
  }
1650
- /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
1668
+ /** https://discord.com/developers/docs/resources/entitlement#list-entitlements */
1651
1669
  async getEntitlements(applicationID, options) {
1652
1670
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationEntitlements(applicationID), {
1653
1671
  query: {
@@ -1853,6 +1871,11 @@ class Client extends node_events_1.default {
1853
1871
  },
1854
1872
  });
1855
1873
  }
1874
+ /** https://discord.com/developers/docs/resources/guild#get-guild-role */
1875
+ async getGuildRole(guildID, roleID) {
1876
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRole(guildID, roleID));
1877
+ return transformers_1.Roles.roleFromRaw(response);
1878
+ }
1856
1879
  /** https://discord.com/developers/docs/resources/guild#get-guild-roles */
1857
1880
  async getGuildRoles(guildID) {
1858
1881
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.guildRoles(guildID));
@@ -2066,16 +2089,46 @@ class Client extends node_events_1.default {
2066
2089
  users: response.users.map((user) => transformers_1.Users.userFromRaw(user)),
2067
2090
  };
2068
2091
  }
2069
- /** https://discord.com/developers/docs/monetization/skus#list-skus */
2092
+ /** https://discord.com/developers/docs/resources/sku#list-skus */
2070
2093
  async getSKUs(applicationID) {
2071
2094
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.applicationSKUs(applicationID));
2072
2095
  return response.map((sku) => transformers_1.SKUs.skuFromRaw(sku));
2073
2096
  }
2097
+ /** https://discord.com/developers/docs/resources/subscription#get-sku-subscription */
2098
+ async getSKUSubscription(skuID, subscriptionID) {
2099
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.skuSubscription(skuID, subscriptionID));
2100
+ return transformers_1.Subscriptions.subscriptionFromRaw(response);
2101
+ }
2102
+ /** https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions */
2103
+ async getSKUSubscriptions(skuID, options) {
2104
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.skuSubscriptions(skuID), {
2105
+ query: {
2106
+ before: options.before,
2107
+ after: options.after,
2108
+ limit: options.limit,
2109
+ user_id: options.userID,
2110
+ },
2111
+ });
2112
+ return response.map((subscription) => transformers_1.Subscriptions.subscriptionFromRaw(subscription));
2113
+ }
2074
2114
  /** https://discord.com/developers/docs/resources/stage-instance#get-stage-instance */
2075
2115
  async getStageInstance(channelID) {
2076
2116
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stageInstance(channelID));
2077
2117
  return transformers_1.StageInstances.stageInstanceFromRaw(response);
2078
2118
  }
2119
+ /** https://discord.com/developers/docs/resources/sticker#get-sticker-pack */
2120
+ async getStickerPack(packID) {
2121
+ const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPack(packID));
2122
+ return {
2123
+ id: response.id,
2124
+ stickers: response.stickers.map((sticker) => transformers_1.Stickers.stickerFromRaw(sticker)),
2125
+ name: response.name,
2126
+ skuID: response.sku_id,
2127
+ coverStickerID: response.cover_sticker_id,
2128
+ description: response.description,
2129
+ bannerAssetID: response.banner_asset_id,
2130
+ };
2131
+ }
2079
2132
  /** https://discord.com/developers/docs/resources/sticker#list-sticker-packs */
2080
2133
  async getStickerPacks() {
2081
2134
  const response = await this.rest.request(rest_1.RESTMethods.Get, rest_1.Endpoints.stickerPacks());
@@ -152,6 +152,11 @@ export declare enum ApplicationFlags {
152
152
  GatewayMessageContentLimited = 524288,
153
153
  ApplicationCommandBadge = 8388608
154
154
  }
155
+ /** https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-kind-enum */
156
+ export declare enum ActivityLocationKind {
157
+ GuildChannel = "gc",
158
+ PrivateChannel = "pc"
159
+ }
155
160
  /** https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type */
156
161
  export declare enum ApplicationRoleConnectionMetadataType {
157
162
  IntegerLessThanOrEqual = 1,
@@ -382,7 +387,12 @@ export declare enum GuildMemberFlags {
382
387
  DidRejoin = 1,
383
388
  CompletedOnboarding = 2,
384
389
  BypassesVerification = 4,
385
- StartedOnboarding = 8
390
+ StartedOnboarding = 8,
391
+ IsGuest = 16,
392
+ StartedHomeActions = 32,
393
+ CompletedHomeActions = 64,
394
+ AutomodQuarantinedUsername = 128,
395
+ DMSettingsUpsellAckownledge = 512
386
396
  }
387
397
  /** https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors */
388
398
  export declare enum IntegrationExpireBehaviors {
@@ -504,7 +514,8 @@ export declare enum MessageTypes {
504
514
  GuildIncidentAlertModeDisabled = 37,
505
515
  GuildIncidentReportRaid = 38,
506
516
  GuildIncidentReportFalseAlarm = 39,
507
- PurchaseNotification = 44
517
+ PurchaseNotification = 44,
518
+ PollResult = 46
508
519
  }
509
520
  /** https://discord.com/developers/docs/resources/message#message-object-message-activity-types */
510
521
  export declare enum MessageActivityTypes {
@@ -532,6 +543,16 @@ export declare enum MessageReferenceTypes {
532
543
  Default = 0,
533
544
  Forward = 1
534
545
  }
546
+ /** https://discord.com/developers/docs/resources/message#embed-object-embed-types */
547
+ export declare enum EmbedTypes {
548
+ Rich = "rich",
549
+ Image = "image",
550
+ Video = "video",
551
+ Gifv = "gifv",
552
+ Article = "article",
553
+ Link = "link",
554
+ PollResult = "poll_result"
555
+ }
535
556
  /** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
536
557
  export declare enum AttachmentFlags {
537
558
  IsRemix = 4
@@ -621,6 +642,12 @@ export declare enum VisibilityTypes {
621
642
  None = 0,
622
643
  Everyone = 1
623
644
  }
645
+ /** https://discord.com/developers/docs/resources/subscription#subscription-statuses */
646
+ export declare enum SubscriptionStatuses {
647
+ Active = 0,
648
+ Ending = 1,
649
+ Inactive = 2
650
+ }
624
651
  /** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types */
625
652
  export declare enum WebhookTypes {
626
653
  Incoming = 1,
@@ -729,8 +756,12 @@ export declare enum GatewayEvents {
729
756
  StageInstanceCreate = "STAGE_INSTANCE_CREATE",
730
757
  StageInstanceUpdate = "STAGE_INSTANCE_UPDATE",
731
758
  StageInstanceDelete = "STAGE_INSTANCE_DELETE",
759
+ SubscriptionCreate = "SUBSCRIPTION_CREATE",
760
+ SubscriptionUpdate = "SUBSCRIPTION_UPDATE",
761
+ SubscriptionDelete = "SUBSCRIPTION_DELETE",
732
762
  TypingStart = "TYPING_START",
733
763
  UserUpdate = "USER_UPDATE",
764
+ VoiceChannelEffectSend = "VOICE_CHANNEL_EFFECT_SEND",
734
765
  VoiceStateUpdate = "VOICE_STATE_UPDATE",
735
766
  VoiceServerUpdate = "VOICE_SERVER_UPDATE",
736
767
  WebhooksUpdate = "WEBHOOKS_UPDATE",
@@ -758,6 +789,11 @@ export declare enum ActivityFlags {
758
789
  PartyPrivacyVoiceChannel = 128,
759
790
  Embedded = 256
760
791
  }
792
+ /** https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types */
793
+ export declare enum AnimationTypes {
794
+ Premium = 0,
795
+ Basic = 1
796
+ }
761
797
  /** https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes */
762
798
  export declare enum OAuth2Scopes {
763
799
  ActivitiesRead = "activities.read",
@@ -898,6 +934,7 @@ export declare enum JSONErrorCodes {
898
934
  UnknownGuildTemplate = 10057,
899
935
  UnknownDiscoverableServerCategory = 10059,
900
936
  UnknownSticker = 10060,
937
+ UnknownStickerPack = 10061,
901
938
  UnknownInteraction = 10062,
902
939
  UnknownApplicationCommand = 10063,
903
940
  UnknownVoiceState = 10065,
@@ -1174,20 +1211,20 @@ export declare enum MembershipState {
1174
1211
  Invited = 1,
1175
1212
  Accepted = 2
1176
1213
  }
1177
- /** https://discord.com/developers/docs/monetization/skus#sku-object-sku-types */
1214
+ /** https://discord.com/developers/docs/resources/sku#sku-object-sku-types */
1178
1215
  export declare enum SKUTypes {
1179
1216
  Durable = 2,
1180
1217
  Consumable = 3,
1181
1218
  Subscription = 5,
1182
1219
  SubscriptionGroup = 6
1183
1220
  }
1184
- /** https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags */
1221
+ /** https://discord.com/developers/docs/resources/sku#sku-object-sku-flags */
1185
1222
  export declare enum SKUFlags {
1186
1223
  Available = 4,
1187
1224
  GuildSubscription = 128,
1188
1225
  UserSubscription = 256
1189
1226
  }
1190
- /** https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types */
1227
+ /** https://discord.com/developers/docs/resources/entitlement#entitlement-object-entitlement-types */
1191
1228
  export declare enum EntitlementTypes {
1192
1229
  Purchase = 1,
1193
1230
  PremiumSubscription = 2,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MessageActivityTypes = exports.MessageTypes = exports.InviteTargetTypes = exports.InviteTypes = exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.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.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.MessageReferenceTypes = exports.MessageFlags = void 0;
3
+ exports.MessageTypes = exports.InviteTargetTypes = exports.InviteTypes = exports.GuildScheduledEventRecurrenceRuleMonth = exports.GuildScheduledEventRecurrenceRuleWeekday = exports.GuildScheduledEventRecurrenceRuleFrequency = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ActivityLocationKind = exports.ApplicationFlags = exports.ApplicationIntegrationTypes = exports.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.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.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 = void 0;
5
5
  /** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
6
6
  var TimestampStyles;
7
7
  (function (TimestampStyles) {
@@ -171,6 +171,12 @@ var ApplicationFlags;
171
171
  ApplicationFlags[ApplicationFlags["GatewayMessageContentLimited"] = 524288] = "GatewayMessageContentLimited";
172
172
  ApplicationFlags[ApplicationFlags["ApplicationCommandBadge"] = 8388608] = "ApplicationCommandBadge";
173
173
  })(ApplicationFlags || (exports.ApplicationFlags = ApplicationFlags = {}));
174
+ /** https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-kind-enum */
175
+ var ActivityLocationKind;
176
+ (function (ActivityLocationKind) {
177
+ ActivityLocationKind["GuildChannel"] = "gc";
178
+ ActivityLocationKind["PrivateChannel"] = "pc";
179
+ })(ActivityLocationKind || (exports.ActivityLocationKind = ActivityLocationKind = {}));
174
180
  /** https://discord.com/developers/docs/resources/application-role-connection-metadata#application-role-connection-metadata-object-application-role-connection-metadata-type */
175
181
  var ApplicationRoleConnectionMetadataType;
176
182
  (function (ApplicationRoleConnectionMetadataType) {
@@ -423,6 +429,11 @@ var GuildMemberFlags;
423
429
  GuildMemberFlags[GuildMemberFlags["CompletedOnboarding"] = 2] = "CompletedOnboarding";
424
430
  GuildMemberFlags[GuildMemberFlags["BypassesVerification"] = 4] = "BypassesVerification";
425
431
  GuildMemberFlags[GuildMemberFlags["StartedOnboarding"] = 8] = "StartedOnboarding";
432
+ GuildMemberFlags[GuildMemberFlags["IsGuest"] = 16] = "IsGuest";
433
+ GuildMemberFlags[GuildMemberFlags["StartedHomeActions"] = 32] = "StartedHomeActions";
434
+ GuildMemberFlags[GuildMemberFlags["CompletedHomeActions"] = 64] = "CompletedHomeActions";
435
+ GuildMemberFlags[GuildMemberFlags["AutomodQuarantinedUsername"] = 128] = "AutomodQuarantinedUsername";
436
+ GuildMemberFlags[GuildMemberFlags["DMSettingsUpsellAckownledge"] = 512] = "DMSettingsUpsellAckownledge";
426
437
  })(GuildMemberFlags || (exports.GuildMemberFlags = GuildMemberFlags = {}));
427
438
  /** https://discord.com/developers/docs/resources/guild#integration-object-integration-expire-behaviors */
428
439
  var IntegrationExpireBehaviors;
@@ -558,6 +569,7 @@ var MessageTypes;
558
569
  MessageTypes[MessageTypes["GuildIncidentReportRaid"] = 38] = "GuildIncidentReportRaid";
559
570
  MessageTypes[MessageTypes["GuildIncidentReportFalseAlarm"] = 39] = "GuildIncidentReportFalseAlarm";
560
571
  MessageTypes[MessageTypes["PurchaseNotification"] = 44] = "PurchaseNotification";
572
+ MessageTypes[MessageTypes["PollResult"] = 46] = "PollResult";
561
573
  })(MessageTypes || (exports.MessageTypes = MessageTypes = {}));
562
574
  /** https://discord.com/developers/docs/resources/message#message-object-message-activity-types */
563
575
  var MessageActivityTypes;
@@ -588,6 +600,17 @@ var MessageReferenceTypes;
588
600
  MessageReferenceTypes[MessageReferenceTypes["Default"] = 0] = "Default";
589
601
  MessageReferenceTypes[MessageReferenceTypes["Forward"] = 1] = "Forward";
590
602
  })(MessageReferenceTypes || (exports.MessageReferenceTypes = MessageReferenceTypes = {}));
603
+ /** https://discord.com/developers/docs/resources/message#embed-object-embed-types */
604
+ var EmbedTypes;
605
+ (function (EmbedTypes) {
606
+ EmbedTypes["Rich"] = "rich";
607
+ EmbedTypes["Image"] = "image";
608
+ EmbedTypes["Video"] = "video";
609
+ EmbedTypes["Gifv"] = "gifv";
610
+ EmbedTypes["Article"] = "article";
611
+ EmbedTypes["Link"] = "link";
612
+ EmbedTypes["PollResult"] = "poll_result";
613
+ })(EmbedTypes || (exports.EmbedTypes = EmbedTypes = {}));
591
614
  /** https://discord.com/developers/docs/resources/message#attachment-object-attachment-flags */
592
615
  var AttachmentFlags;
593
616
  (function (AttachmentFlags) {
@@ -688,6 +711,13 @@ var VisibilityTypes;
688
711
  VisibilityTypes[VisibilityTypes["None"] = 0] = "None";
689
712
  VisibilityTypes[VisibilityTypes["Everyone"] = 1] = "Everyone";
690
713
  })(VisibilityTypes || (exports.VisibilityTypes = VisibilityTypes = {}));
714
+ /** https://discord.com/developers/docs/resources/subscription#subscription-statuses */
715
+ var SubscriptionStatuses;
716
+ (function (SubscriptionStatuses) {
717
+ SubscriptionStatuses[SubscriptionStatuses["Active"] = 0] = "Active";
718
+ SubscriptionStatuses[SubscriptionStatuses["Ending"] = 1] = "Ending";
719
+ SubscriptionStatuses[SubscriptionStatuses["Inactive"] = 2] = "Inactive";
720
+ })(SubscriptionStatuses || (exports.SubscriptionStatuses = SubscriptionStatuses = {}));
691
721
  /** https://discord.com/developers/docs/resources/webhook#webhook-object-webhook-types */
692
722
  var WebhookTypes;
693
723
  (function (WebhookTypes) {
@@ -801,8 +831,12 @@ var GatewayEvents;
801
831
  GatewayEvents["StageInstanceCreate"] = "STAGE_INSTANCE_CREATE";
802
832
  GatewayEvents["StageInstanceUpdate"] = "STAGE_INSTANCE_UPDATE";
803
833
  GatewayEvents["StageInstanceDelete"] = "STAGE_INSTANCE_DELETE";
834
+ GatewayEvents["SubscriptionCreate"] = "SUBSCRIPTION_CREATE";
835
+ GatewayEvents["SubscriptionUpdate"] = "SUBSCRIPTION_UPDATE";
836
+ GatewayEvents["SubscriptionDelete"] = "SUBSCRIPTION_DELETE";
804
837
  GatewayEvents["TypingStart"] = "TYPING_START";
805
838
  GatewayEvents["UserUpdate"] = "USER_UPDATE";
839
+ GatewayEvents["VoiceChannelEffectSend"] = "VOICE_CHANNEL_EFFECT_SEND";
806
840
  GatewayEvents["VoiceStateUpdate"] = "VOICE_STATE_UPDATE";
807
841
  GatewayEvents["VoiceServerUpdate"] = "VOICE_SERVER_UPDATE";
808
842
  GatewayEvents["WebhooksUpdate"] = "WEBHOOKS_UPDATE";
@@ -832,6 +866,12 @@ var ActivityFlags;
832
866
  ActivityFlags[ActivityFlags["PartyPrivacyVoiceChannel"] = 128] = "PartyPrivacyVoiceChannel";
833
867
  ActivityFlags[ActivityFlags["Embedded"] = 256] = "Embedded";
834
868
  })(ActivityFlags || (exports.ActivityFlags = ActivityFlags = {}));
869
+ /** https://discord.com/developers/docs/topics/gateway-events#voice-channel-effect-send-animation-types */
870
+ var AnimationTypes;
871
+ (function (AnimationTypes) {
872
+ AnimationTypes[AnimationTypes["Premium"] = 0] = "Premium";
873
+ AnimationTypes[AnimationTypes["Basic"] = 1] = "Basic";
874
+ })(AnimationTypes || (exports.AnimationTypes = AnimationTypes = {}));
835
875
  /** https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes */
836
876
  var OAuth2Scopes;
837
877
  (function (OAuth2Scopes) {
@@ -979,6 +1019,7 @@ var JSONErrorCodes;
979
1019
  JSONErrorCodes[JSONErrorCodes["UnknownGuildTemplate"] = 10057] = "UnknownGuildTemplate";
980
1020
  JSONErrorCodes[JSONErrorCodes["UnknownDiscoverableServerCategory"] = 10059] = "UnknownDiscoverableServerCategory";
981
1021
  JSONErrorCodes[JSONErrorCodes["UnknownSticker"] = 10060] = "UnknownSticker";
1022
+ JSONErrorCodes[JSONErrorCodes["UnknownStickerPack"] = 10061] = "UnknownStickerPack";
982
1023
  JSONErrorCodes[JSONErrorCodes["UnknownInteraction"] = 10062] = "UnknownInteraction";
983
1024
  JSONErrorCodes[JSONErrorCodes["UnknownApplicationCommand"] = 10063] = "UnknownApplicationCommand";
984
1025
  JSONErrorCodes[JSONErrorCodes["UnknownVoiceState"] = 10065] = "UnknownVoiceState";
@@ -1260,7 +1301,7 @@ var MembershipState;
1260
1301
  MembershipState[MembershipState["Invited"] = 1] = "Invited";
1261
1302
  MembershipState[MembershipState["Accepted"] = 2] = "Accepted";
1262
1303
  })(MembershipState || (exports.MembershipState = MembershipState = {}));
1263
- /** https://discord.com/developers/docs/monetization/skus#sku-object-sku-types */
1304
+ /** https://discord.com/developers/docs/resources/sku#sku-object-sku-types */
1264
1305
  var SKUTypes;
1265
1306
  (function (SKUTypes) {
1266
1307
  SKUTypes[SKUTypes["Durable"] = 2] = "Durable";
@@ -1268,14 +1309,14 @@ var SKUTypes;
1268
1309
  SKUTypes[SKUTypes["Subscription"] = 5] = "Subscription";
1269
1310
  SKUTypes[SKUTypes["SubscriptionGroup"] = 6] = "SubscriptionGroup";
1270
1311
  })(SKUTypes || (exports.SKUTypes = SKUTypes = {}));
1271
- /** https://discord.com/developers/docs/monetization/skus#sku-object-sku-flags */
1312
+ /** https://discord.com/developers/docs/resources/sku#sku-object-sku-flags */
1272
1313
  var SKUFlags;
1273
1314
  (function (SKUFlags) {
1274
1315
  SKUFlags[SKUFlags["Available"] = 4] = "Available";
1275
1316
  SKUFlags[SKUFlags["GuildSubscription"] = 128] = "GuildSubscription";
1276
1317
  SKUFlags[SKUFlags["UserSubscription"] = 256] = "UserSubscription";
1277
1318
  })(SKUFlags || (exports.SKUFlags = SKUFlags = {}));
1278
- /** https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-types */
1319
+ /** https://discord.com/developers/docs/resources/entitlement#entitlement-object-entitlement-types */
1279
1320
  var EntitlementTypes;
1280
1321
  (function (EntitlementTypes) {
1281
1322
  EntitlementTypes[EntitlementTypes["Purchase"] = 1] = "Purchase";
@@ -464,6 +464,20 @@ class Shard {
464
464
  case constants_1.GatewayEvents.UserUpdate:
465
465
  this.client.emit("userUpdate", transformers_1.Users.userFromRaw(packet.d));
466
466
  break;
467
+ case constants_1.GatewayEvents.VoiceChannelEffectSend:
468
+ this.client.emit("voiceChannelEffectSend", {
469
+ channelID: packet.d.channel_id,
470
+ guildID: packet.d.guild_id,
471
+ userID: packet.d.user_id,
472
+ emoji: packet.d.emoji !== null
473
+ ? transformers_1.Emojis.emojiFromRaw(packet.d.emoji)
474
+ : null,
475
+ animationType: packet.d.animation_type,
476
+ animationID: packet.d.animation_id,
477
+ soundID: packet.d.sound_id,
478
+ soundVolume: packet.d.sound_volume,
479
+ });
480
+ break;
467
481
  case constants_1.GatewayEvents.VoiceStateUpdate:
468
482
  this.client.emit("voiceStateUpdate", transformers_1.Voice.voiceStateFromRaw(packet.d));
469
483
  break;
@@ -479,6 +493,15 @@ class Shard {
479
493
  case constants_1.GatewayEvents.WebhooksUpdate:
480
494
  this.client.emit("webhooksUpdate", packet.d.channel_id, packet.d.guild_id);
481
495
  break;
496
+ case constants_1.GatewayEvents.SubscriptionCreate:
497
+ this.client.emit("subscriptionCreate", transformers_1.Subscriptions.subscriptionFromRaw(packet.d));
498
+ break;
499
+ case constants_1.GatewayEvents.SubscriptionUpdate:
500
+ this.client.emit("subscriptionUpdate", transformers_1.Subscriptions.subscriptionFromRaw(packet.d));
501
+ break;
502
+ case constants_1.GatewayEvents.SubscriptionDelete:
503
+ this.client.emit("subscriptionDelete", transformers_1.Subscriptions.subscriptionFromRaw(packet.d));
504
+ break;
482
505
  case constants_1.GatewayEvents.MessagePollVoteAdd:
483
506
  this.client.emit("messagePollVoteAdd", {
484
507
  userID: packet.d.user_id,
@@ -68,6 +68,7 @@ export declare const userChannels: () => "users/@me/channels";
68
68
  export declare const userConnections: () => "users/@me/connections";
69
69
  export declare const userGuild: (guildID: snowflake) => `users/@me/guilds/${string}`;
70
70
  export declare const userGuilds: () => "users/@me/guilds";
71
+ export declare const applicationActivityInstance: (applicationID: snowflake, instanceID: string) => string;
71
72
  export declare const applicationCommand: (applicationID: snowflake, commandID: snowflake) => `applications/${string}/commands/${string}`;
72
73
  export declare const applicationCommands: (applicationID: snowflake) => `applications/${string}/commands`;
73
74
  export declare const applicationCommandPermissions: (applicationID: snowflake, guildID: snowflake, commandID: snowflake) => `applications/${string}/guilds/${string}/commands/${string}/permissions`;
@@ -85,6 +86,10 @@ export declare const guildApplicationCommandsPermissions: (applicationID: snowfl
85
86
  export declare const webhook: (webhookID: snowflake, webhookToken?: string) => `webhooks/${string}`;
86
87
  export declare const webhookMessage: (webhookID: snowflake, webhookToken: string, messageID?: snowflake | "@original") => `webhooks/${string}/${string}/messages/${string}`;
87
88
  export declare const webhookPlatform: (webhookID: snowflake, webhookToken: string, platform: "github" | "slack") => `webhooks/${string}/${string}/github` | `webhooks/${string}/${string}/slack`;
89
+ export declare const stickerPack: (packID: snowflake) => `sticker-packs/${string}`;
90
+ export declare const stickerPacks: () => "sticker-packs";
91
+ export declare const skuSubscription: (skuID: snowflake, subscriptionID: snowflake) => `skus/${string}/subscriptions/${string}`;
92
+ export declare const skuSubscriptions: (skuID: snowflake) => `skus/${string}/subscriptions`;
88
93
  export declare const gateway: () => "gateway";
89
94
  export declare const gatewayBot: () => "gateway/bot";
90
95
  export declare const oauth2Authorize: () => "oauth2/authorize";
@@ -97,5 +102,4 @@ export declare const invite: (code: string) => `invites/${string}`;
97
102
  export declare const stageInstance: (channelID: snowflake) => `stage-instances/${string}`;
98
103
  export declare const stageInstances: () => "stage-instances";
99
104
  export declare const sticker: (stickerID: snowflake) => `stickers/${string}`;
100
- export declare const stickerPacks: () => "sticker-packs";
101
105
  export declare const voiceRegions: () => "voice/regions";
@@ -1,7 +1,8 @@
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.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;
4
+ exports.invite = exports.interactionCallback = exports.oauth2TokenRevocation = exports.oauth2TokenExchange = exports.oauth2Authorization = exports.oauth2Application = exports.oauth2Authorize = exports.gatewayBot = exports.gateway = 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 = void 0;
5
+ exports.voiceRegions = exports.sticker = exports.stageInstances = exports.stageInstance = void 0;
5
6
  // Guilds
6
7
  const guild = (guildID) => `guilds/${guildID}`;
7
8
  exports.guild = guild;
@@ -152,6 +153,8 @@ exports.userGuild = userGuild;
152
153
  const userGuilds = () => "users/@me/guilds";
153
154
  exports.userGuilds = userGuilds;
154
155
  // Applications
156
+ const applicationActivityInstance = (applicationID, instanceID) => `applications/${applicationID}/activity-instances/${instanceID}`;
157
+ exports.applicationActivityInstance = applicationActivityInstance;
155
158
  const applicationCommand = (applicationID, commandID) => `applications/${applicationID}/commands/${commandID}`;
156
159
  exports.applicationCommand = applicationCommand;
157
160
  const applicationCommands = (applicationID) => `applications/${applicationID}/commands`;
@@ -189,6 +192,16 @@ const webhookMessage = (webhookID, webhookToken, messageID = "@original") => `we
189
192
  exports.webhookMessage = webhookMessage;
190
193
  const webhookPlatform = (webhookID, webhookToken, platform) => `webhooks/${webhookID}/${webhookToken}/${platform}`;
191
194
  exports.webhookPlatform = webhookPlatform;
195
+ // Sticker packs
196
+ const stickerPack = (packID) => `sticker-packs/${packID}`;
197
+ exports.stickerPack = stickerPack;
198
+ const stickerPacks = () => "sticker-packs";
199
+ exports.stickerPacks = stickerPacks;
200
+ // Subscriptions
201
+ const skuSubscription = (skuID, subscriptionID) => `skus/${skuID}/subscriptions/${subscriptionID}`;
202
+ exports.skuSubscription = skuSubscription;
203
+ const skuSubscriptions = (skuID) => `skus/${skuID}/subscriptions`;
204
+ exports.skuSubscriptions = skuSubscriptions;
192
205
  // Gateway
193
206
  const gateway = () => "gateway";
194
207
  exports.gateway = gateway;
@@ -216,7 +229,5 @@ const stageInstances = () => "stage-instances";
216
229
  exports.stageInstances = stageInstances;
217
230
  const sticker = (stickerID) => `stickers/${stickerID}`;
218
231
  exports.sticker = sticker;
219
- const stickerPacks = () => "sticker-packs";
220
- exports.stickerPacks = stickerPacks;
221
232
  const voiceRegions = () => "voice/regions";
222
233
  exports.voiceRegions = voiceRegions;
@@ -30,6 +30,7 @@ class Applications {
30
30
  coverImage: application.cover_image,
31
31
  flags: application.flags,
32
32
  approximateGuildCount: application.approximate_guild_count,
33
+ approximateUserInstallCount: application.approximate_user_install_count,
33
34
  redirectURIs: application.redirect_uris,
34
35
  interactionsEndpointURL: application.interactions_endpoint_url,
35
36
  roleConnectionsVerificationURL: application.role_connections_verification_url,
@@ -75,6 +76,7 @@ class Applications {
75
76
  cover_image: application.coverImage,
76
77
  flags: application.flags,
77
78
  approximate_guild_count: application.approximateGuildCount,
79
+ approximate_user_install_count: application.approximateUserInstallCount,
78
80
  redirect_uris: application.redirectURIs,
79
81
  interactions_endpoint_url: application.interactionsEndpointURL,
80
82
  role_connections_verification_url: application.roleConnectionsVerificationURL,
@@ -10,7 +10,6 @@ class Stickers {
10
10
  name: sticker.name,
11
11
  description: sticker.description,
12
12
  tags: sticker.tags,
13
- asset: sticker.asset,
14
13
  type: sticker.type,
15
14
  formatType: sticker.format_type,
16
15
  available: sticker.available,
@@ -28,7 +27,6 @@ class Stickers {
28
27
  name: sticker.name,
29
28
  description: sticker.description,
30
29
  tags: sticker.tags,
31
- asset: sticker.asset,
32
30
  type: sticker.type,
33
31
  format_type: sticker.formatType,
34
32
  available: sticker.available,
@@ -0,0 +1,5 @@
1
+ import type { RawSubscription, Subscription } from "../types/subscription";
2
+ export declare class Subscriptions {
3
+ static subscriptionFromRaw(subscription: RawSubscription): Subscription;
4
+ static subscriptionToRaw(subscription: Subscription): RawSubscription;
5
+ }
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Subscriptions = void 0;
4
+ class Subscriptions {
5
+ static subscriptionFromRaw(subscription) {
6
+ return {
7
+ id: subscription.id,
8
+ userID: subscription.user_id,
9
+ skuIDs: subscription.sku_ids,
10
+ entitlementIDs: subscription.entitlement_ids,
11
+ currentPeriodStart: subscription.current_period_start,
12
+ currentPeriodEnd: subscription.current_period_end,
13
+ status: subscription.status,
14
+ canceledAt: subscription.canceled_at,
15
+ country: subscription.country,
16
+ };
17
+ }
18
+ static subscriptionToRaw(subscription) {
19
+ return {
20
+ id: subscription.id,
21
+ user_id: subscription.userID,
22
+ sku_ids: subscription.skuIDs,
23
+ entitlement_ids: subscription.entitlementIDs,
24
+ current_period_start: subscription.currentPeriodStart,
25
+ current_period_end: subscription.currentPeriodEnd,
26
+ status: subscription.status,
27
+ canceled_at: subscription.canceledAt,
28
+ country: subscription.country,
29
+ };
30
+ }
31
+ }
32
+ exports.Subscriptions = Subscriptions;
@@ -18,6 +18,7 @@ export * from "./Roles";
18
18
  export * from "./SKUs";
19
19
  export * from "./StageInstances";
20
20
  export * from "./Stickers";
21
+ export * from "./Subscriptions";
21
22
  export * from "./Teams";
22
23
  export * from "./Users";
23
24
  export * from "./Voice";
@@ -34,6 +34,7 @@ __exportStar(require("./Roles"), exports);
34
34
  __exportStar(require("./SKUs"), exports);
35
35
  __exportStar(require("./StageInstances"), exports);
36
36
  __exportStar(require("./Stickers"), exports);
37
+ __exportStar(require("./Subscriptions"), exports);
37
38
  __exportStar(require("./Teams"), exports);
38
39
  __exportStar(require("./Users"), exports);
39
40
  __exportStar(require("./Voice"), exports);
@@ -1,4 +1,4 @@
1
- import type { ApplicationFlags, ApplicationIntegrationTypes, OAuth2Scopes } from "../constants";
1
+ import type { ActivityLocationKind, ApplicationFlags, ApplicationIntegrationTypes, OAuth2Scopes } from "../constants";
2
2
  import type { snowflake } from "./common";
3
3
  import type { RawGuild, Guild } from "./guild";
4
4
  import type { RawTeam, Team } from "./team";
@@ -24,6 +24,7 @@ export interface RawApplication {
24
24
  cover_image?: string;
25
25
  flags?: ApplicationFlags;
26
26
  approximate_guild_count?: number;
27
+ approximate_user_install_count?: number;
27
28
  redirect_uris?: Array<string>;
28
29
  interactions_endpoint_url?: string;
29
30
  role_connections_verification_url?: string;
@@ -41,6 +42,21 @@ export interface RawInstallParams {
41
42
  scopes: Array<OAuth2Scopes>;
42
43
  permissions: string;
43
44
  }
45
+ /** https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-instance-object */
46
+ export interface RawActivityInstance {
47
+ application_id: snowflake;
48
+ instance_id: string;
49
+ launch_id: snowflake;
50
+ location: RawActivityLocation;
51
+ users: Array<snowflake>;
52
+ }
53
+ /** https://discord.com/developers/docs/resources/application#get-application-activity-instance-activity-location-object */
54
+ export interface RawActivityLocation {
55
+ id: string;
56
+ kind: ActivityLocationKind;
57
+ channel_id: snowflake;
58
+ guild_id?: snowflake | null;
59
+ }
44
60
  export interface Application {
45
61
  id: snowflake;
46
62
  name: string;
@@ -61,6 +77,7 @@ export interface Application {
61
77
  coverImage?: string;
62
78
  flags?: ApplicationFlags;
63
79
  approximateGuildCount?: number;
80
+ approximateUserInstallCount?: number;
64
81
  redirectURIs?: Array<string>;
65
82
  interactionsEndpointURL?: string;
66
83
  roleConnectionsVerificationURL?: string;
@@ -76,3 +93,16 @@ export interface InstallParams {
76
93
  scopes: Array<OAuth2Scopes>;
77
94
  permissions: string;
78
95
  }
96
+ export interface ActivityInstance {
97
+ applicationID: snowflake;
98
+ instanceID: string;
99
+ launchID: snowflake;
100
+ location: ActivityLocation;
101
+ users: Array<snowflake>;
102
+ }
103
+ export interface ActivityLocation {
104
+ id: string;
105
+ kind: ActivityLocationKind;
106
+ channelID: snowflake;
107
+ guildID?: snowflake | null;
108
+ }
@@ -1,6 +1,6 @@
1
1
  import type { EntitlementTypes } from "../constants";
2
2
  import type { snowflake, timestamp } from "./common";
3
- /** https://discord.com/developers/docs/monetization/entitlements#entitlement-object-entitlement-structure */
3
+ /** https://discord.com/developers/docs/resources/entitlement#entitlement-object-entitlement-structure */
4
4
  export interface RawEntitlement {
5
5
  id: snowflake;
6
6
  sku_id: snowflake;
@@ -1,4 +1,4 @@
1
- import type { ActivityFlags, ActivityType, GatewayEvents, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
1
+ import type { ActivityFlags, ActivityType, AnimationTypes, GatewayEvents, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
2
2
  import type { RawApplication, Application } from "./application";
3
3
  import type { RawAutoModerationAction, AutoModerationAction } from "./auto-moderation";
4
4
  import type { RawChannel, RawThreadMember, Channel, ThreadMember } from "./channel";
@@ -330,6 +330,17 @@ export interface RawTypingStartEventFields {
330
330
  timestamp: timestamp;
331
331
  member?: RawGuildMember;
332
332
  }
333
+ /** https://discord.com/developers/docs/topics/gateway-events#voice-channel-effetc-send-event-fields */
334
+ export interface RawVoiceChannelEffectSendEventFields {
335
+ channel_id: snowflake;
336
+ guild_id: snowflake;
337
+ user_id: snowflake;
338
+ emoji?: RawEmoji | null;
339
+ animation_type?: AnimationTypes | null;
340
+ animation_id?: number;
341
+ sound_id?: snowflake | number;
342
+ sound_volume?: number;
343
+ }
333
344
  /** https://discord.com/developers/docs/topics/gateway-events#voice-server-update-voice-server-update-event-fields */
334
345
  export interface RawVoiceServerUpdateEventFields {
335
346
  token: string;
@@ -630,6 +641,16 @@ export interface TypingStartEventFields {
630
641
  timestamp: timestamp;
631
642
  member?: GuildMember;
632
643
  }
644
+ export interface VoiceChannelEffectSendEventFields {
645
+ channelID: snowflake;
646
+ guildID: snowflake;
647
+ userID: snowflake;
648
+ emoji?: Emoji | null;
649
+ animationType?: AnimationTypes | null;
650
+ animationID?: number;
651
+ soundID?: snowflake | number;
652
+ soundVolume?: number;
653
+ }
633
654
  export interface VoiceServerUpdateEventFields {
634
655
  token: string;
635
656
  guildID: snowflake;
@@ -1,4 +1,4 @@
1
- import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes } from "../constants";
1
+ import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes } from "../constants";
2
2
  import type { Application, RawApplication } from "./application";
3
3
  import type { Channel, RawChannel, RawRoleSubscriptionData, RoleSubscriptionData } from "./channel";
4
4
  import type { snowflake, timestamp } from "./common";
@@ -77,7 +77,7 @@ export interface RawMessageReference {
77
77
  }
78
78
  /** https://discord.com/developers/docs/resources/message#message-snapshot-object-message-snapshot-structure */
79
79
  export interface RawMessageSnapshot {
80
- message: Pick<RawMessage, "type" | "content" | "embeds" | "attachments" | "timestamp" | "edited_timestamp" | "flags" | "mentions" | "mention_roles">;
80
+ message: Pick<RawMessage, "type" | "content" | "embeds" | "attachments" | "timestamp" | "edited_timestamp" | "flags" | "mentions" | "mention_roles" | "stickers" | "sticker_items" | "components">;
81
81
  }
82
82
  /** https://discord.com/developers/docs/resources/message#reaction-object-reaction-structure */
83
83
  export interface RawReaction {
@@ -96,7 +96,7 @@ export interface RawReactionCountDetails {
96
96
  /** https://discord.com/developers/docs/resources/message#embed-object-embed-structure */
97
97
  export interface RawEmbed {
98
98
  title?: string;
99
- type?: string;
99
+ type?: EmbedTypes;
100
100
  description?: string;
101
101
  url?: string;
102
102
  timestamp?: timestamp;
@@ -154,6 +154,17 @@ export interface RawEmbedField {
154
154
  value: string;
155
155
  inline?: boolean;
156
156
  }
157
+ /** https://discord.com/developers/docs/resources/message#embed-fields-by-embed-type-poll-result-embed-fields */
158
+ export interface RawPollResultEmbedFields {
159
+ poll_question_text: string;
160
+ victor_answer_votes: Array<number>;
161
+ total_votes: number;
162
+ victor_answer_id?: snowflake;
163
+ victor_answer_text?: string;
164
+ victor_answer_emoji_id?: snowflake;
165
+ victor_answer_emoji_name?: string;
166
+ victor_answer_emoji_animated?: boolean;
167
+ }
157
168
  /** https://discord.com/developers/docs/resources/message#attachment-object-attachment-structure */
158
169
  export interface RawAttachment {
159
170
  id: snowflake;
@@ -248,7 +259,7 @@ export interface MessageReference {
248
259
  failIfNotExists?: boolean;
249
260
  }
250
261
  export interface MessageSnapshot {
251
- message: Pick<Message, "type" | "content" | "embeds" | "attachments" | "timestamp" | "editedTimestamp" | "flags" | "mentions" | "mentionRoles">;
262
+ message: Pick<Message, "type" | "content" | "embeds" | "attachments" | "timestamp" | "editedTimestamp" | "flags" | "mentions" | "mentionRoles" | "stickers" | "stickerItems" | "components">;
252
263
  }
253
264
  export interface Reaction {
254
265
  count: number;
@@ -264,7 +275,7 @@ export interface ReactionCountDetails {
264
275
  }
265
276
  export interface Embed {
266
277
  title?: string;
267
- type?: string;
278
+ type?: EmbedTypes;
268
279
  description?: string;
269
280
  url?: string;
270
281
  timestamp?: timestamp;
@@ -315,6 +326,16 @@ export interface EmbedField {
315
326
  value: string;
316
327
  inline?: boolean;
317
328
  }
329
+ export interface PollResultEmbedFields {
330
+ pollQuestionText: string;
331
+ victorAnswerVotes: Array<number>;
332
+ totalVotes: number;
333
+ victorAnswerID?: snowflake;
334
+ victorAnswerText?: string;
335
+ victorAnswerEmojiID?: snowflake;
336
+ victorAnswerEmojiName?: string;
337
+ victorAnswerEmojiAnimated?: boolean;
338
+ }
318
339
  export interface Attachment {
319
340
  id: snowflake;
320
341
  filename: string;
@@ -1,6 +1,6 @@
1
1
  import type { SKUFlags, SKUTypes } from "../constants";
2
2
  import type { snowflake } from "./common";
3
- /** https://discord.com/developers/docs/monetization/skus#sku-object-sku-structure */
3
+ /** https://discord.com/developers/docs/resources/sku#sku-object-sku-structure */
4
4
  export interface RawSKU {
5
5
  id: snowflake;
6
6
  type: SKUTypes;
@@ -8,7 +8,6 @@ export interface RawSticker {
8
8
  name: string;
9
9
  description: string | null;
10
10
  tags: string;
11
- asset?: string;
12
11
  type: StickerTypes;
13
12
  format_type: StickerFormatTypes;
14
13
  available?: boolean;
@@ -38,7 +37,6 @@ export interface Sticker {
38
37
  name: string;
39
38
  description: string | null;
40
39
  tags: string;
41
- asset?: string;
42
40
  type: StickerTypes;
43
41
  formatType: StickerFormatTypes;
44
42
  available?: boolean;
@@ -0,0 +1,25 @@
1
+ import type { SubscriptionStatuses } from "../constants";
2
+ import type { snowflake, timestamp } from "./common";
3
+ /** https://discord.com/developers/docs/resources/subscription#subscription-object */
4
+ export interface RawSubscription {
5
+ id: snowflake;
6
+ user_id: snowflake;
7
+ sku_ids: Array<snowflake>;
8
+ entitlement_ids: Array<snowflake>;
9
+ current_period_start: timestamp;
10
+ current_period_end: timestamp;
11
+ status: SubscriptionStatuses;
12
+ canceled_at: timestamp | null;
13
+ country?: string;
14
+ }
15
+ export interface Subscription {
16
+ id: snowflake;
17
+ userID: snowflake;
18
+ skuIDs: Array<snowflake>;
19
+ entitlementIDs: Array<snowflake>;
20
+ currentPeriodStart: timestamp;
21
+ currentPeriodEnd: timestamp;
22
+ status: SubscriptionStatuses;
23
+ canceledAt: timestamp | null;
24
+ country?: string;
25
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.2.4-dev.e509559",
3
+ "version": "2.2.4",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "homepage": "https://github.com/XenKys/disgroove#readme",
27
27
  "devDependencies": {
28
- "@types/node": "^20.14.10",
29
- "@types/ws": "^8.5.10",
30
- "typescript": "^5.5.3"
28
+ "@types/node": "^22.5.3",
29
+ "@types/ws": "^8.5.12",
30
+ "typescript": "^5.5.4"
31
31
  },
32
32
  "dependencies": {
33
33
  "ws": "^8.18.0"
package/package.json CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "name": "disgroove",
3
- "version": "2.2.4-dev.e509559",
4
- "description": "A module to interface with Discord",
5
- "main": "./dist/lib/index.js",
6
- "types": "./dist/lib/index.d.ts",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/XenKys/disgroove.git"
10
- },
11
- "keywords": [
12
- "api",
13
- "bot",
14
- "discord",
15
- "gateway",
16
- "http",
17
- "https",
18
- "rest",
19
- "wrapper"
20
- ],
21
- "author": "XenKys",
22
- "license": "MIT",
23
- "bugs": {
24
- "url": "https://github.com/XenKys/disgroove/issues"
25
- },
26
- "homepage": "https://github.com/XenKys/disgroove#readme",
27
- "devDependencies": {
28
- "@types/node": "^20.14.10",
29
- "@types/ws": "^8.5.10",
30
- "typescript": "^5.5.3"
31
- },
32
- "dependencies": {
33
- "ws": "^8.18.0"
34
- }
35
- }
1
+ {
2
+ "name": "disgroove",
3
+ "version": "2.2.4",
4
+ "description": "A module to interface with Discord",
5
+ "main": "./dist/lib/index.js",
6
+ "types": "./dist/lib/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/XenKys/disgroove.git"
10
+ },
11
+ "keywords": [
12
+ "api",
13
+ "bot",
14
+ "discord",
15
+ "gateway",
16
+ "http",
17
+ "https",
18
+ "rest",
19
+ "wrapper"
20
+ ],
21
+ "author": "XenKys",
22
+ "license": "MIT",
23
+ "bugs": {
24
+ "url": "https://github.com/XenKys/disgroove/issues"
25
+ },
26
+ "homepage": "https://github.com/XenKys/disgroove#readme",
27
+ "devDependencies": {
28
+ "@types/node": "^22.5.3",
29
+ "@types/ws": "^8.5.12",
30
+ "typescript": "^5.5.4"
31
+ },
32
+ "dependencies": {
33
+ "ws": "^8.18.0"
34
+ }
35
+ }