disgroove 2.2.4-dev.e509559 → 2.2.5-dev.3beface

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 (39) hide show
  1. package/README.md +1 -0
  2. package/dist/lib/Client.d.ts +76 -9
  3. package/dist/lib/Client.js +248 -77
  4. package/dist/lib/constants.d.ts +78 -10
  5. package/dist/lib/constants.js +79 -6
  6. package/dist/lib/gateway/Shard.d.ts +3 -1
  7. package/dist/lib/gateway/Shard.js +51 -0
  8. package/dist/lib/rest/Endpoints.d.ts +9 -1
  9. package/dist/lib/rest/Endpoints.js +24 -4
  10. package/dist/lib/transformers/ApplicationCommands.js +2 -0
  11. package/dist/lib/transformers/Applications.js +2 -0
  12. package/dist/lib/transformers/Interactions.d.ts +3 -1
  13. package/dist/lib/transformers/Interactions.js +42 -0
  14. package/dist/lib/transformers/Soundboards.d.ts +5 -0
  15. package/dist/lib/transformers/Soundboards.js +31 -0
  16. package/dist/lib/transformers/Stickers.js +0 -2
  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-command.d.ts +3 -1
  22. package/dist/lib/types/application.d.ts +31 -1
  23. package/dist/lib/types/entitlements.d.ts +1 -1
  24. package/dist/lib/types/gateway-events.d.ts +43 -1
  25. package/dist/lib/types/guild.d.ts +2 -0
  26. package/dist/lib/types/interaction.d.ts +44 -0
  27. package/dist/lib/types/message.d.ts +26 -5
  28. package/dist/lib/types/sku.d.ts +1 -1
  29. package/dist/lib/types/soundboard.d.ts +23 -0
  30. package/dist/lib/types/soundboard.js +2 -0
  31. package/dist/lib/types/sticker.d.ts +0 -2
  32. package/dist/lib/types/subscription.d.ts +25 -0
  33. package/dist/lib/types/subscription.js +2 -0
  34. package/dist/lib/utils/CDN.d.ts +1 -0
  35. package/dist/lib/utils/CDN.js +3 -1
  36. package/dist/lib/utils/formatters.d.ts +2 -2
  37. package/dist/lib/utils/formatters.js +5 -2
  38. package/dist/package.json +4 -4
  39. package/package.json +35 -35
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)
@@ -1,9 +1,10 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="node" />
2
3
  import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, type MFALevel, type ReactionTypes, type ApplicationCommandTypes, type EventTypes, type TriggerTypes, type ChannelTypes, type VideoQualityModes, type SortOrderTypes, type ForumLayoutTypes, type InviteTargetTypes, type VerificationLevel, type DefaultMessageNotificationLevel, type ExplicitContentFilterLevel, type SystemChannelFlags, type ApplicationFlags, type ApplicationIntegrationTypes, type ChannelFlags, type GuildFeatures, type GuildScheduledEventEntityTypes, type GuildScheduledEventPrivacyLevel, type GuildScheduledEventStatus, type MessageFlags, type OnboardingMode, type PrivacyLevel, type GuildMemberFlags, type InteractionContextTypes } from "./constants";
3
4
  import { RequestManager, type File } from "./rest";
4
5
  import EventEmitter from "node:events";
5
6
  import { Shard } from "./gateway";
6
- import type { Application, ApplicationIntegrationTypeConfiguration, InstallParams } from "./types/application";
7
+ import type { ActivityInstance, Application, ApplicationIntegrationTypeConfiguration, InstallParams } from "./types/application";
7
8
  import type { ApplicationCommand, GuildApplicationCommandPermissions, ApplicationCommandOption, ApplicationCommandPermission } from "./types/application-command";
8
9
  import type { ApplicationRoleConnectionMetadata } from "./types/application-role-connection-metadata";
9
10
  import type { AuditLog, AuditLogEntry } from "./types/audit-log";
@@ -12,11 +13,11 @@ import type { Channel, FollowedChannel, ThreadMember, Overwrite, DefaultReaction
12
13
  import type { LocaleMap, snowflake, timestamp } from "./types/common";
13
14
  import type { Emoji } from "./types/emoji";
14
15
  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";
16
+ 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, GuildSoundboardSoundDeleteEventFields } from "./types/gateway-events";
16
17
  import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel } from "./types/guild";
17
18
  import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata, GuildScheduledEventRecurrenceRule } from "./types/guild-scheduled-event";
18
19
  import type { GuildTemplate } from "./types/guild-template";
19
- import type { Interaction, InteractionResponse } from "./types/interaction";
20
+ import type { Interaction, InteractionCallbackResponse, InteractionResponse } from "./types/interaction";
20
21
  import type { Invite } from "./types/invite";
21
22
  import type { ActionRow } from "./types/message-components";
22
23
  import type { PollCreateParams } from "./types/poll";
@@ -29,6 +30,8 @@ import type { VoiceRegion, VoiceState } from "./types/voice";
29
30
  import type { Webhook } from "./types/webhook";
30
31
  import type { ClientOptions as WebSocketOptions } from "ws";
31
32
  import type { Embed, AllowedMentions, Attachment, Message, MessageReference } from "./types/message";
33
+ import type { Subscription } from "./types/subscription";
34
+ import type { SoundboardSound } from "./types/soundboard";
32
35
  export interface GatewayOptions {
33
36
  properties?: IdentifyConnectionProperties;
34
37
  compress?: boolean;
@@ -124,7 +127,7 @@ export declare class Client extends EventEmitter {
124
127
  }>): Promise<Array<ApplicationCommand>>;
125
128
  /** https://discord.com/developers/docs/topics/gateway#connections */
126
129
  connect(): Promise<void>;
127
- /** https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement */
130
+ /** https://discord.com/developers/docs/resources/entitlement#consume-an-entitlement */
128
131
  consumeEntitlement(applicationID: snowflake, entitlementID: snowflake): void;
129
132
  /** https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule */
130
133
  createAutoModerationRule(guildID: snowflake, options: {
@@ -284,6 +287,14 @@ export declare class Client extends EventEmitter {
284
287
  tags: string;
285
288
  file: File;
286
289
  }, reason?: string): Promise<Sticker>;
290
+ /** https://discord.com/developers/docs/resources/soundboard#create-guild-soundboard-sound */
291
+ createGuildSoundboardSound(guildID: snowflake, options: {
292
+ name: string;
293
+ sound: Buffer;
294
+ volume?: number | null;
295
+ emojiID?: snowflake | null;
296
+ emojiName?: snowflake | null;
297
+ }, reason?: string): Promise<SoundboardSound>;
287
298
  /** https://discord.com/developers/docs/resources/guild-template#create-guild-template */
288
299
  createGuildTemplate(guildID: snowflake, options: {
289
300
  name: string;
@@ -304,7 +315,9 @@ export declare class Client extends EventEmitter {
304
315
  poll?: PollCreateParams;
305
316
  }): Promise<Message>;
306
317
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response */
307
- createInteractionResponse(interactionID: snowflake, interactionToken: string, options: InteractionResponse): void;
318
+ createInteractionResponse(interactionID: snowflake, interactionToken: string, options: InteractionResponse & {
319
+ withResponse?: boolean;
320
+ }): Promise<void | InteractionCallbackResponse>;
308
321
  /** https://discord.com/developers/docs/resources/message#create-message */
309
322
  createMessage(channelID: snowflake, options: {
310
323
  content?: string;
@@ -331,7 +344,7 @@ export declare class Client extends EventEmitter {
331
344
  sendStartNotifications?: boolean;
332
345
  guildScheduledEventID?: snowflake;
333
346
  }, reason?: string): Promise<StageInstance>;
334
- /** https://discord.com/developers/docs/monetization/entitlements#create-test-entitlement */
347
+ /** https://discord.com/developers/docs/resources/entitlement#create-test-entitlement */
335
348
  createTestEntitlement(applicationID: snowflake, options: {
336
349
  skuID: snowflake;
337
350
  ownerID: snowflake;
@@ -396,6 +409,8 @@ export declare class Client extends EventEmitter {
396
409
  deleteGuildScheduledEvent(guildID: snowflake, guildScheduledEventID: snowflake): void;
397
410
  /** https://discord.com/developers/docs/resources/sticker#delete-guild-sticker */
398
411
  deleteGuildSticker(guildID: snowflake, stickerID: snowflake, reason?: string): void;
412
+ /** https://discord.com/developers/docs/resources/soundboard#delete-guild-soundboard-sound */
413
+ deleteGuildSoundboardSound(guildID: snowflake, soundID: snowflake, reason?: string): void;
399
414
  /** https://discord.com/developers/docs/resources/guild-template#delete-guild-template */
400
415
  deleteGuildTemplate(guildID: snowflake, code: string): Promise<GuildTemplate>;
401
416
  /** https://discord.com/developers/docs/resources/invite#delete-invite */
@@ -608,7 +623,7 @@ export declare class Client extends EventEmitter {
608
623
  entityType?: GuildScheduledEventEntityTypes;
609
624
  status?: GuildScheduledEventStatus;
610
625
  image?: string;
611
- recurrenceRule?: GuildScheduledEventRecurrenceRule;
626
+ recurrenceRule?: GuildScheduledEventRecurrenceRule | null;
612
627
  }, reason?: string): Promise<GuildScheduledEvent>;
613
628
  /** https://discord.com/developers/docs/resources/sticker#modify-guild-sticker */
614
629
  editGuildSticker(guildID: snowflake, stickerID: snowflake, options: {
@@ -616,6 +631,13 @@ export declare class Client extends EventEmitter {
616
631
  description?: string | null;
617
632
  tags?: string;
618
633
  }, reason?: string): Promise<Sticker>;
634
+ /** https://discord.com/developers/docs/resources/soundboard#edit-guild-soundboard-sound */
635
+ editGuildSoundboardSound(guildID: snowflake, soundID: snowflake, options: {
636
+ name?: string;
637
+ volume?: number | null;
638
+ emojiID?: snowflake | null;
639
+ emojiName?: snowflake | null;
640
+ }, reason?: string): Promise<SoundboardSound>;
619
641
  /** https://discord.com/developers/docs/resources/guild-template#modify-guild-template */
620
642
  editGuildTemplate(guildID: snowflake, code: string, options: {
621
643
  name?: string;
@@ -655,6 +677,7 @@ export declare class Client extends EventEmitter {
655
677
  components?: Array<ActionRow> | null;
656
678
  files?: Array<File> | null;
657
679
  attachments?: Array<Partial<Attachment>> | null;
680
+ poll?: PollCreateParams | null;
658
681
  threadID?: snowflake;
659
682
  }): Promise<Message>;
660
683
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response */
@@ -665,6 +688,7 @@ export declare class Client extends EventEmitter {
665
688
  components?: Array<ActionRow> | null;
666
689
  files?: Array<File> | null;
667
690
  attachments?: Array<Partial<Attachment>> | null;
691
+ poll?: PollCreateParams | null;
668
692
  threadID?: snowflake;
669
693
  }): Promise<Message>;
670
694
  /** https://discord.com/developers/docs/resources/guild#modify-user-voice-state */
@@ -686,6 +710,7 @@ export declare class Client extends EventEmitter {
686
710
  components?: Array<ActionRow> | null;
687
711
  files?: Array<File> | null;
688
712
  attachments?: Array<Partial<Attachment>> | null;
713
+ poll?: PollCreateParams | null;
689
714
  threadID?: snowflake;
690
715
  }): Promise<Message>;
691
716
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token */
@@ -752,6 +777,8 @@ export declare class Client extends EventEmitter {
752
777
  getAutoModerationRule(guildID: snowflake, ruleID: snowflake): Promise<AutoModerationRule>;
753
778
  /** https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild */
754
779
  getAutoModerationRules(guildID: snowflake): Promise<Array<AutoModerationRule>>;
780
+ /** https://discord.com/developers/docs/interactions/application-commands#get-application-activity-instance */
781
+ getApplicationActivityInstance(applicationID: snowflake, instanceID: string): Promise<ActivityInstance>;
755
782
  /** https://discord.com/developers/docs/interactions/application-commands#get-application-command-permissions */
756
783
  getApplicationCommandPermissions(applicationID: snowflake, guildID: snowflake, commandID: snowflake): Promise<GuildApplicationCommandPermissions>;
757
784
  /** https://discord.com/developers/docs/resources/emoji#get-application-emoji */
@@ -780,7 +807,11 @@ export declare class Client extends EventEmitter {
780
807
  getCurrentUserConnections(): Promise<Array<Connection>>;
781
808
  /** https://discord.com/developers/docs/resources/voice#get-current-user-voice-state */
782
809
  getCurrentUserVoiceState(guildID: snowflake): Promise<VoiceState>;
783
- /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
810
+ /** https://discord.com/developers/docs/resources/soundboard#list-default-soundboard-sounds */
811
+ getDefaultSoundboardSounds(): Promise<Array<SoundboardSound>>;
812
+ /** https://discord.com/developers/docs/resources/entitlement#get-entitlement */
813
+ getEntitlement(applicationID: snowflake, entitlementID: snowflake): Promise<Entitlement>;
814
+ /** https://discord.com/developers/docs/resources/entitlement#list-entitlements */
784
815
  getEntitlements(applicationID: snowflake, options?: {
785
816
  userID?: snowflake;
786
817
  skuIDs?: Array<snowflake>;
@@ -789,6 +820,7 @@ export declare class Client extends EventEmitter {
789
820
  limit?: number;
790
821
  guildID?: snowflake;
791
822
  excludeEnded?: boolean;
823
+ excludeDeleted?: boolean;
792
824
  }): Promise<Array<Entitlement>>;
793
825
  /** https://discord.com/developers/docs/topics/gateway#get-gateway */
794
826
  getGateway(): Promise<{
@@ -861,6 +893,8 @@ export declare class Client extends EventEmitter {
861
893
  }): Promise<{
862
894
  pruned: number;
863
895
  }>;
896
+ /** https://discord.com/developers/docs/resources/guild#get-guild-role */
897
+ getGuildRole(guildID: snowflake, roleID: snowflake): Promise<Role>;
864
898
  /** https://discord.com/developers/docs/resources/guild#get-guild-roles */
865
899
  getGuildRoles(guildID: snowflake): Promise<Array<Role>>;
866
900
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild */
@@ -878,6 +912,11 @@ export declare class Client extends EventEmitter {
878
912
  getGuildSticker(guildID: snowflake, stickerID: snowflake): Promise<Sticker>;
879
913
  /** https://discord.com/developers/docs/resources/sticker#list-guild-stickers */
880
914
  getGuildStickers(guildID: snowflake): Promise<Array<Sticker>>;
915
+ /** https://discord.com/developers/docs/resources/soundboard#get-guild-soundboard-sound */
916
+ getGuildSoundboardSound(guildID: snowflake, soundID: snowflake): Promise<SoundboardSound>;
917
+ getGuildSoundboardSounds(guildID: snowflake): Promise<{
918
+ items: Array<SoundboardSound>;
919
+ }>;
881
920
  /** https://discord.com/developers/docs/resources/guild-template#get-guild-template */
882
921
  getGuildTemplate(guildID: snowflake, code: string): Promise<GuildTemplate>;
883
922
  /** https://discord.com/developers/docs/resources/guild-template#get-guild-templates */
@@ -955,10 +994,21 @@ export declare class Client extends EventEmitter {
955
994
  }): Promise<{
956
995
  users: Array<User>;
957
996
  }>;
958
- /** https://discord.com/developers/docs/monetization/skus#list-skus */
997
+ /** https://discord.com/developers/docs/resources/sku#list-skus */
959
998
  getSKUs(applicationID: snowflake): Promise<Array<SKU>>;
999
+ /** https://discord.com/developers/docs/resources/subscription#get-sku-subscription */
1000
+ getSKUSubscription(skuID: snowflake, subscriptionID: snowflake): Promise<Subscription>;
1001
+ /** https://discord.com/developers/docs/resources/subscription#list-sku-subscriptions */
1002
+ getSKUSubscriptions(skuID: snowflake, options: {
1003
+ before?: snowflake;
1004
+ after?: snowflake;
1005
+ limit?: number;
1006
+ userID?: snowflake;
1007
+ }): Promise<Array<Subscription>>;
960
1008
  /** https://discord.com/developers/docs/resources/stage-instance#get-stage-instance */
961
1009
  getStageInstance(channelID: snowflake): Promise<StageInstance>;
1010
+ /** https://discord.com/developers/docs/resources/sticker#get-sticker-pack */
1011
+ getStickerPack(packID: snowflake): Promise<StickerPack>;
962
1012
  /** https://discord.com/developers/docs/resources/sticker#list-sticker-packs */
963
1013
  getStickerPacks(): Promise<{
964
1014
  stickerPacks: Array<StickerPack>;
@@ -1015,6 +1065,11 @@ export declare class Client extends EventEmitter {
1015
1065
  query: string;
1016
1066
  limit?: number;
1017
1067
  }): Promise<Array<GuildMember>>;
1068
+ /** https://discord.com/developers/docs/resources/soundboard#send-soundboard-sound */
1069
+ sendSoundboardSound(channelID: snowflake, options: {
1070
+ soundID: snowflake;
1071
+ sourceGuildID?: snowflake;
1072
+ }): void;
1018
1073
  /** https://discord.com/developers/docs/topics/gateway-events#update-presence */
1019
1074
  setPresence(options: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>): void;
1020
1075
  /** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
@@ -1111,6 +1166,14 @@ export interface ClientEvents {
1111
1166
  guildScheduledEventID: snowflake,
1112
1167
  guildID: snowflake
1113
1168
  ];
1169
+ guildSoundboardSoundCreate: [sound: SoundboardSound];
1170
+ guildSoundboardSoundUpdate: [sound: SoundboardSound];
1171
+ guildSoundboardSoundDelete: [sound: GuildSoundboardSoundDeleteEventFields];
1172
+ guildSoundboardSoundsUpdate: [
1173
+ sounds: Array<SoundboardSound>,
1174
+ guildID: snowflake
1175
+ ];
1176
+ soundboardSounds: [sounds: Array<SoundboardSound>, guildID: snowflake];
1114
1177
  integrationCreate: [
1115
1178
  integration: Integration & IntegrationCreateEventExtraFields
1116
1179
  ];
@@ -1133,8 +1196,12 @@ export interface ClientEvents {
1133
1196
  stageInstanceCreate: [stageInstance: StageInstance];
1134
1197
  stageInstanceUpdate: [stageInstance: StageInstance];
1135
1198
  stageInstanceDelete: [stageInstance: StageInstance];
1199
+ subscriptionCreate: [subscription: Subscription];
1200
+ subscriptionUpdate: [subscription: Subscription];
1201
+ subscriptionDelete: [subscription: Subscription];
1136
1202
  typingStart: [typing: TypingStartEventFields];
1137
1203
  userUpdate: [user: User];
1204
+ voiceChannelEffectSend: [voiceEffect: VoiceChannelEffectSendEventFields];
1138
1205
  voiceStateUpdate: [voiceState: VoiceState];
1139
1206
  voiceServerUpdate: [voiceServer: VoiceServerUpdateEventFields];
1140
1207
  webhooksUpdate: [channelID: snowflake, guildID: snowflake];