disgroove 2.2.3-dev.f471c4a → 2.2.4-dev.141283b

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.
Files changed (33) hide show
  1. package/dist/lib/Client.d.ts +64 -22
  2. package/dist/lib/Client.js +149 -50
  3. package/dist/lib/constants.d.ts +148 -79
  4. package/dist/lib/constants.js +164 -87
  5. package/dist/lib/gateway/Shard.js +25 -2
  6. package/dist/lib/rest/Endpoints.d.ts +7 -1
  7. package/dist/lib/rest/Endpoints.js +18 -3
  8. package/dist/lib/transformers/Applications.js +2 -0
  9. package/dist/lib/transformers/Channels.d.ts +1 -10
  10. package/dist/lib/transformers/Channels.js +0 -510
  11. package/dist/lib/transformers/GuildScheduledEvents.d.ts +3 -1
  12. package/dist/lib/transformers/GuildScheduledEvents.js +34 -0
  13. package/dist/lib/transformers/Interactions.d.ts +1 -1
  14. package/dist/lib/transformers/Interactions.js +7 -6
  15. package/dist/lib/transformers/Messages.d.ts +12 -0
  16. package/dist/lib/transformers/Messages.js +545 -0
  17. package/dist/lib/transformers/Subscriptions.d.ts +5 -0
  18. package/dist/lib/transformers/Subscriptions.js +32 -0
  19. package/dist/lib/transformers/index.d.ts +2 -0
  20. package/dist/lib/transformers/index.js +2 -0
  21. package/dist/lib/types/application.d.ts +31 -1
  22. package/dist/lib/types/channel.d.ts +1 -331
  23. package/dist/lib/types/entitlements.d.ts +1 -1
  24. package/dist/lib/types/gateway-events.d.ts +22 -1
  25. package/dist/lib/types/guild-scheduled-event.d.ts +37 -1
  26. package/dist/lib/types/interaction.d.ts +2 -1
  27. package/dist/lib/types/message.d.ts +366 -0
  28. package/dist/lib/types/message.js +2 -0
  29. package/dist/lib/types/sku.d.ts +1 -1
  30. package/dist/lib/types/subscription.d.ts +25 -0
  31. package/dist/lib/types/subscription.js +2 -0
  32. package/dist/package.json +1 -1
  33. package/package.json +1 -1
@@ -371,7 +371,7 @@ class Shard {
371
371
  break;
372
372
  case constants_1.GatewayEvents.MessageCreate:
373
373
  this.client.emit("messageCreate", {
374
- ...transformers_1.Channels.messageFromRaw(packet.d),
374
+ ...transformers_1.Messages.messageFromRaw(packet.d),
375
375
  guildID: packet.d.guild_id,
376
376
  member: packet.d.member !== undefined
377
377
  ? transformers_1.Guilds.guildMemberFromRaw(packet.d.member)
@@ -380,7 +380,7 @@ class Shard {
380
380
  });
381
381
  break;
382
382
  case constants_1.GatewayEvents.MessageUpdate:
383
- this.client.emit("messageUpdate", transformers_1.Channels.messageFromRaw(packet.d));
383
+ this.client.emit("messageUpdate", transformers_1.Messages.messageFromRaw(packet.d));
384
384
  break;
385
385
  case constants_1.GatewayEvents.MessageDelete:
386
386
  this.client.emit("messageDelete", {
@@ -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,10 +68,13 @@ 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`;
74
75
  export declare const applicationUser: () => "applications/@me";
76
+ export declare const applicationEmoji: (applicationID: snowflake, emojiID: snowflake) => `applications/${string}/emojis/${string}`;
77
+ export declare const applicationEmojis: (applicationID: snowflake) => `applications/${string}/emojis`;
75
78
  export declare const applicationEntitlement: (applicationID: snowflake, entitlementID: snowflake) => `applications/${string}/entitlements/${string}`;
76
79
  export declare const applicationEntitlementConsume: (applicationID: snowflake, entitlementID: snowflake) => `applications/${string}/entitlements/${string}/consume`;
77
80
  export declare const applicationEntitlements: (applicationID: snowflake) => `applications/${string}/entitlements`;
@@ -83,6 +86,10 @@ export declare const guildApplicationCommandsPermissions: (applicationID: snowfl
83
86
  export declare const webhook: (webhookID: snowflake, webhookToken?: string) => `webhooks/${string}`;
84
87
  export declare const webhookMessage: (webhookID: snowflake, webhookToken: string, messageID?: snowflake | "@original") => `webhooks/${string}/${string}/messages/${string}`;
85
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`;
86
93
  export declare const gateway: () => "gateway";
87
94
  export declare const gatewayBot: () => "gateway/bot";
88
95
  export declare const oauth2Authorize: () => "oauth2/authorize";
@@ -95,5 +102,4 @@ export declare const invite: (code: string) => `invites/${string}`;
95
102
  export declare const stageInstance: (channelID: snowflake) => `stage-instances/${string}`;
96
103
  export declare const stageInstances: () => "stage-instances";
97
104
  export declare const sticker: (stickerID: snowflake) => `stickers/${string}`;
98
- export declare const stickerPacks: () => "sticker-packs";
99
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.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`;
@@ -160,6 +163,10 @@ const applicationCommandPermissions = (applicationID, guildID, commandID) => `ap
160
163
  exports.applicationCommandPermissions = applicationCommandPermissions;
161
164
  const applicationUser = () => "applications/@me";
162
165
  exports.applicationUser = applicationUser;
166
+ const applicationEmoji = (applicationID, emojiID) => `applications/${applicationID}/emojis/${emojiID}`;
167
+ exports.applicationEmoji = applicationEmoji;
168
+ const applicationEmojis = (applicationID) => `applications/${applicationID}/emojis`;
169
+ exports.applicationEmojis = applicationEmojis;
163
170
  const applicationEntitlement = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}`;
164
171
  exports.applicationEntitlement = applicationEntitlement;
165
172
  const applicationEntitlementConsume = (applicationID, entitlementID) => `applications/${applicationID}/entitlements/${entitlementID}/consume`;
@@ -185,6 +192,16 @@ const webhookMessage = (webhookID, webhookToken, messageID = "@original") => `we
185
192
  exports.webhookMessage = webhookMessage;
186
193
  const webhookPlatform = (webhookID, webhookToken, platform) => `webhooks/${webhookID}/${webhookToken}/${platform}`;
187
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;
188
205
  // Gateway
189
206
  const gateway = () => "gateway";
190
207
  exports.gateway = gateway;
@@ -212,7 +229,5 @@ const stageInstances = () => "stage-instances";
212
229
  exports.stageInstances = stageInstances;
213
230
  const sticker = (stickerID) => `stickers/${stickerID}`;
214
231
  exports.sticker = sticker;
215
- const stickerPacks = () => "sticker-packs";
216
- exports.stickerPacks = stickerPacks;
217
232
  const voiceRegions = () => "voice/regions";
218
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,
@@ -1,16 +1,7 @@
1
- import type { RawAttachment, Attachment, RawChannel, Channel, RawEmbed, Embed, RawMessage, Message, RawThreadMember, ThreadMember } from "../types/channel";
2
- import type { RawActionRow, ActionRow } from "../types/message-components";
1
+ import type { RawChannel, Channel, RawThreadMember, ThreadMember } from "../types/channel";
3
2
  export declare class Channels {
4
- static attachmentFromRaw(attachment: RawAttachment): Attachment;
5
- static attachmentToRaw(attachment: Attachment): RawAttachment;
6
3
  static channelFromRaw(channel: RawChannel): Channel;
7
4
  static channelToRaw(channel: Channel): RawChannel;
8
- static componentsFromRaw(components: Array<RawActionRow>): Array<ActionRow>;
9
- static componentsToRaw(components: Array<ActionRow>): Array<RawActionRow>;
10
- static embedFromRaw(embed: RawEmbed): Embed;
11
- static embedToRaw(embed: Embed): RawEmbed;
12
- static messageFromRaw(message: RawMessage): Message;
13
- static messageToRaw(message: Message): RawMessage;
14
5
  static threadMemberFromRaw(threadMember: RawThreadMember): ThreadMember;
15
6
  static threadMemberToRaw(threadMember: ThreadMember): RawThreadMember;
16
7
  }