disgroove 2.2.2-dev.bd3875c → 2.2.2

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 (80) hide show
  1. package/README.md +2 -6
  2. package/dist/lib/Client.d.ts +47 -49
  3. package/dist/lib/Client.js +170 -182
  4. package/dist/lib/constants.d.ts +19 -4
  5. package/dist/lib/constants.js +22 -5
  6. package/dist/lib/gateway/Shard.js +59 -58
  7. package/dist/lib/index.d.ts +1 -0
  8. package/dist/lib/index.js +1 -0
  9. package/dist/lib/rest/Endpoints.d.ts +6 -6
  10. package/dist/lib/rest/Endpoints.js +13 -13
  11. package/dist/lib/rest/RequestManager.d.ts +1 -1
  12. package/dist/lib/rest/index.d.ts +0 -1
  13. package/dist/lib/rest/index.js +1 -2
  14. package/dist/lib/transformers/Applications.d.ts +8 -0
  15. package/dist/lib/transformers/Applications.js +211 -0
  16. package/dist/lib/transformers/AuditLogs.d.ts +7 -0
  17. package/dist/lib/transformers/AuditLogs.js +97 -0
  18. package/dist/lib/transformers/AutoModeration.d.ts +5 -0
  19. package/dist/lib/transformers/AutoModeration.js +64 -0
  20. package/dist/lib/transformers/Channels.d.ts +16 -0
  21. package/dist/lib/transformers/Channels.js +676 -0
  22. package/dist/lib/transformers/Emojis.d.ts +5 -0
  23. package/dist/lib/transformers/Emojis.js +31 -0
  24. package/dist/lib/transformers/Entitlements.d.ts +7 -0
  25. package/dist/lib/transformers/Entitlements.js +58 -0
  26. package/dist/lib/transformers/GuildScheduledEvents.d.ts +5 -0
  27. package/dist/lib/transformers/GuildScheduledEvents.js +51 -0
  28. package/dist/lib/transformers/GuildTemplates.d.ts +5 -0
  29. package/dist/lib/transformers/GuildTemplates.js +38 -0
  30. package/dist/lib/transformers/Guilds.d.ts +12 -0
  31. package/dist/lib/transformers/Guilds.js +248 -0
  32. package/dist/lib/transformers/Interactions.d.ts +10 -0
  33. package/dist/lib/transformers/Interactions.js +273 -0
  34. package/dist/lib/transformers/Invites.d.ts +5 -0
  35. package/dist/lib/transformers/Invites.js +79 -0
  36. package/dist/lib/transformers/Polls.d.ts +5 -0
  37. package/dist/lib/transformers/Polls.js +50 -0
  38. package/dist/lib/transformers/Presences.d.ts +8 -0
  39. package/dist/lib/transformers/Presences.js +108 -0
  40. package/dist/lib/transformers/Roles.d.ts +5 -0
  41. package/dist/lib/transformers/Roles.js +56 -0
  42. package/dist/lib/transformers/SKUs.d.ts +5 -0
  43. package/dist/lib/transformers/SKUs.js +26 -0
  44. package/dist/lib/transformers/StageInstances.d.ts +5 -0
  45. package/dist/lib/transformers/StageInstances.js +28 -0
  46. package/dist/lib/transformers/Stickers.d.ts +5 -0
  47. package/dist/lib/transformers/Stickers.js +41 -0
  48. package/dist/lib/transformers/Teams.d.ts +5 -0
  49. package/dist/lib/transformers/Teams.js +35 -0
  50. package/dist/lib/transformers/Users.d.ts +5 -0
  51. package/dist/lib/transformers/Users.js +48 -0
  52. package/dist/lib/transformers/Voice.d.ts +5 -0
  53. package/dist/lib/transformers/Voice.js +45 -0
  54. package/dist/lib/transformers/Webhooks.d.ts +5 -0
  55. package/dist/lib/transformers/Webhooks.js +51 -0
  56. package/dist/lib/transformers/index.d.ts +21 -0
  57. package/dist/lib/transformers/index.js +37 -0
  58. package/dist/lib/types/entitlements.d.ts +0 -6
  59. package/dist/lib/types/interaction.d.ts +2 -2
  60. package/dist/lib/types/sku.d.ts +0 -12
  61. package/dist/lib/utils/CDN.d.ts +24 -0
  62. package/dist/lib/utils/CDN.js +49 -0
  63. package/dist/lib/utils/Util.d.ts +1 -93
  64. package/dist/lib/utils/Util.js +2 -2211
  65. package/dist/lib/utils/formatters.d.ts +9 -0
  66. package/dist/lib/utils/formatters.js +38 -0
  67. package/dist/lib/utils/index.d.ts +2 -0
  68. package/dist/lib/utils/index.js +15 -0
  69. package/dist/package.json +3 -3
  70. package/package.json +3 -3
  71. package/dist/lib/rest/CDN.d.ts +0 -22
  72. package/dist/lib/rest/CDN.js +0 -45
  73. package/dist/lib/types/voice-connections.d.ts +0 -64
  74. package/dist/lib/types/voice-connections.js +0 -2
  75. package/dist/lib/voice/VoiceConnection.d.ts +0 -57
  76. package/dist/lib/voice/VoiceConnection.js +0 -150
  77. package/dist/lib/voice/VoiceConnectionManager.d.ts +0 -19
  78. package/dist/lib/voice/VoiceConnectionManager.js +0 -66
  79. package/dist/lib/voice/index.d.ts +0 -2
  80. package/dist/lib/voice/index.js +0 -18
package/README.md CHANGED
@@ -25,18 +25,14 @@ const {
25
25
  InteractionCallbackType,
26
26
  MessageFlags,
27
27
  } = require("disgroove");
28
- const client = new Client("B0t.T0k3N", {
29
- gateway: {
30
- intents: GatewayIntents.All,
31
- },
32
- });
28
+ const client = new Client("B0t.T0k3N");
33
29
 
34
30
  client.once("ready", () => {
35
31
  console.log("Logged in as", client.user.username);
36
32
 
37
33
  client.createGlobalApplicationCommand(client.application.id, {
38
34
  name: "ping",
39
- description: "Responds with Pong! 🏓",
35
+ description: "Pong!",
40
36
  });
41
37
  });
42
38
 
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, InteractionCallbackType, 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 } from "./constants";
2
+ 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
3
  import { Util } from "./utils";
4
4
  import { RequestManager, type File } from "./rest";
5
5
  import EventEmitter from "node:events";
@@ -17,7 +17,7 @@ import type { AutoModerationActionExecutionEventFields, ChannelPinsUpdateEventFi
17
17
  import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel } from "./types/guild";
18
18
  import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata } from "./types/guild-scheduled-event";
19
19
  import type { GuildTemplate } from "./types/guild-template";
20
- import type { Interaction, InteractionCallbackData } from "./types/interaction";
20
+ import type { Interaction, InteractionResponse } from "./types/interaction";
21
21
  import type { Invite } from "./types/invite";
22
22
  import type { ActionRow } from "./types/message-components";
23
23
  import type { PollCreateParams } from "./types/poll";
@@ -99,12 +99,13 @@ export declare class Client extends EventEmitter {
99
99
  id?: snowflake;
100
100
  name: string;
101
101
  nameLocalizations?: LocaleMap | null;
102
- description?: string;
102
+ description: string;
103
103
  descriptionLocalizations?: LocaleMap | null;
104
104
  options?: Array<ApplicationCommandOption>;
105
105
  defaultMemberPermissions?: string | null;
106
- dmPermission?: boolean;
107
106
  defaultPermission?: boolean | null;
107
+ integrationTypes: Array<ApplicationIntegrationTypes>;
108
+ contexts: Array<InteractionContextTypes>;
108
109
  type?: ApplicationCommandTypes;
109
110
  nsfw?: boolean;
110
111
  }>): Promise<Array<ApplicationCommand>>;
@@ -113,13 +114,12 @@ export declare class Client extends EventEmitter {
113
114
  id?: snowflake;
114
115
  name: string;
115
116
  nameLocalizations?: LocaleMap | null;
116
- description?: string;
117
+ description: string;
117
118
  descriptionLocalizations?: LocaleMap | null;
118
119
  options?: Array<ApplicationCommandOption>;
119
120
  defaultMemberPermissions?: string | null;
120
- dmPermission?: boolean;
121
121
  defaultPermission?: boolean | null;
122
- type: ApplicationCommandTypes;
122
+ type?: ApplicationCommandTypes;
123
123
  nsfw?: boolean;
124
124
  }>): Promise<Array<ApplicationCommand>>;
125
125
  /** https://discord.com/developers/docs/topics/gateway#connections */
@@ -139,24 +139,24 @@ export declare class Client extends EventEmitter {
139
139
  }, reason?: string): Promise<AutoModerationRule>;
140
140
  /** https://discord.com/developers/docs/resources/guild#create-guild-channel */
141
141
  createChannel(guildID: snowflake, options: {
142
- name: string | null;
143
- type?: ChannelTypes;
142
+ name: string;
143
+ type?: ChannelTypes | null;
144
144
  topic?: string | null;
145
- bitrate?: number;
146
- userLimit?: number;
147
- rateLimitPerUser?: number;
148
- position?: number;
145
+ bitrate?: number | null;
146
+ userLimit?: number | null;
147
+ rateLimitPerUser?: number | null;
148
+ position?: number | null;
149
149
  permissionOverwrites?: Array<Overwrite>;
150
150
  parentID?: snowflake | null;
151
- nsfw?: boolean;
151
+ nsfw?: boolean | null;
152
152
  rtcRegion?: string | null;
153
- videoQualityMode?: VideoQualityModes;
154
- defaultAutoArchiveDuration?: number;
153
+ videoQualityMode?: VideoQualityModes | null;
154
+ defaultAutoArchiveDuration?: number | null;
155
155
  defaultReactionEmoji?: DefaultReaction | null;
156
- availableTags?: Array<ForumTag>;
156
+ availableTags?: Array<ForumTag> | null;
157
157
  defaultSortOrder?: SortOrderTypes | null;
158
- defaultForumLayout?: ForumLayoutTypes;
159
- defaultThreadRateLimitPerUser?: number;
158
+ defaultForumLayout?: ForumLayoutTypes | null;
159
+ defaultThreadRateLimitPerUser?: number | null;
160
160
  }, reason?: string): Promise<Channel>;
161
161
  /** https://discord.com/developers/docs/resources/channel#create-channel-invite */
162
162
  createChannelInvite(channelID: snowflake, options: {
@@ -185,8 +185,9 @@ export declare class Client extends EventEmitter {
185
185
  descriptionLocalizations?: LocaleMap | null;
186
186
  options?: Array<ApplicationCommandOption>;
187
187
  defaultMemberPermissions?: string | null;
188
- dmPermission?: boolean;
189
188
  defaultPermission?: boolean | null;
189
+ integrationTypes?: Array<ApplicationIntegrationTypes>;
190
+ contexts?: Array<InteractionContextTypes>;
190
191
  type?: ApplicationCommandTypes;
191
192
  nsfw?: boolean;
192
193
  }): Promise<ApplicationCommand>;
@@ -198,7 +199,6 @@ export declare class Client extends EventEmitter {
198
199
  /** https://discord.com/developers/docs/resources/guild#create-guild */
199
200
  createGuild(options: {
200
201
  name: string;
201
- region?: string | null;
202
202
  icon?: string;
203
203
  verificationLevel?: VerificationLevel;
204
204
  defaultMessageNotifications?: DefaultMessageNotificationLevel;
@@ -263,13 +263,13 @@ export declare class Client extends EventEmitter {
263
263
  }, reason?: string): Promise<Role>;
264
264
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event */
265
265
  createGuildScheduledEvent(guildID: snowflake, options: {
266
- channelID?: snowflake | null;
267
- entityMetadata?: GuildScheduledEventEntityMetadata | null;
266
+ channelID?: snowflake;
267
+ entityMetadata?: GuildScheduledEventEntityMetadata;
268
268
  name: string;
269
269
  privacyLevel: GuildScheduledEventPrivacyLevel;
270
270
  scheduledStartTime: string;
271
- scheduledEndTime?: string | null;
272
- description?: string | null;
271
+ scheduledEndTime?: string;
272
+ description?: string;
273
273
  entityType: GuildScheduledEventEntityTypes;
274
274
  image?: string;
275
275
  }, reason?: string): Promise<GuildScheduledEvent>;
@@ -287,23 +287,20 @@ export declare class Client extends EventEmitter {
287
287
  }): Promise<GuildTemplate>;
288
288
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message */
289
289
  createInteractionFollowupMessage(applicationID: snowflake, interactionToken: string, options: {
290
- content?: string | null;
290
+ content?: string;
291
291
  tts?: boolean;
292
- embeds?: Array<Embed> | null;
293
- allowedMentions?: AllowedMentions | null;
294
- components?: Array<ActionRow> | null;
292
+ embeds?: Array<Embed>;
293
+ allowedMentions?: AllowedMentions;
294
+ components?: Array<ActionRow>;
295
295
  files?: Array<File> | null;
296
- attachments?: Array<Attachment> | null;
297
- flags?: MessageFlags | null;
296
+ attachments?: Array<Pick<Attachment, "filename" | "description">>;
297
+ flags?: MessageFlags;
298
298
  threadName?: string;
299
299
  appliedTags?: Array<string>;
300
300
  poll?: PollCreateParams;
301
301
  }): Promise<Message>;
302
302
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#create-interaction-response */
303
- createInteractionResponse(interactionID: snowflake, interactionToken: string, options: {
304
- type: InteractionCallbackType;
305
- data?: InteractionCallbackData;
306
- }): void;
303
+ createInteractionResponse(interactionID: snowflake, interactionToken: string, options: InteractionResponse): void;
307
304
  /** https://discord.com/developers/docs/resources/channel#create-message */
308
305
  createMessage(channelID: snowflake, options: {
309
306
  content?: string;
@@ -315,7 +312,7 @@ export declare class Client extends EventEmitter {
315
312
  components?: Array<ActionRow>;
316
313
  stickersIDs?: Array<snowflake>;
317
314
  files?: Array<File>;
318
- attachments?: Array<Attachment>;
315
+ attachments?: Array<Pick<Attachment, "filename" | "description">>;
319
316
  flags?: MessageFlags;
320
317
  enforceNonce?: boolean;
321
318
  poll?: PollCreateParams;
@@ -497,8 +494,8 @@ export declare class Client extends EventEmitter {
497
494
  installParams?: InstallParams;
498
495
  integrationTypesConfig?: Record<ApplicationIntegrationTypes, ApplicationIntegrationTypeConfiguration>;
499
496
  flags?: ApplicationFlags;
500
- icon?: string;
501
- coverImage?: string;
497
+ icon?: string | null;
498
+ coverImage?: string | null;
502
499
  interactionsEndpointURL?: string;
503
500
  tags?: Array<string>;
504
501
  }): Promise<Application>;
@@ -511,7 +508,8 @@ export declare class Client extends EventEmitter {
511
508
  options?: Array<ApplicationCommandOption>;
512
509
  defaultMemberPermissions?: string | null;
513
510
  defaultPermission?: boolean | null;
514
- dmPermission?: boolean;
511
+ integrationTypes?: Array<ApplicationIntegrationTypes>;
512
+ contexts?: Array<InteractionContextTypes>;
515
513
  nsfw?: boolean;
516
514
  }): Promise<ApplicationCommand>;
517
515
  /** https://discord.com/developers/docs/resources/guild#modify-guild */
@@ -694,21 +692,21 @@ export declare class Client extends EventEmitter {
694
692
  endPoll(channelID: snowflake, messageID: snowflake): Promise<Message>;
695
693
  /** https://discord.com/developers/docs/resources/webhook#execute-webhook */
696
694
  executeWebhook(webhookID: snowflake, webhookToken: string, options: {
697
- content?: string | null;
695
+ content?: string;
698
696
  username?: string;
699
697
  avatarURL?: string;
700
698
  tts?: boolean;
701
- embeds?: Array<Embed> | null;
702
- allowedMentions?: AllowedMentions | null;
703
- components?: Array<ActionRow> | null;
704
- files?: Array<File> | null;
705
- attachments?: Array<Attachment> | null;
706
- flags?: MessageFlags | null;
699
+ embeds?: Array<Embed>;
700
+ allowedMentions?: AllowedMentions;
701
+ components?: Array<ActionRow>;
702
+ files?: Array<File>;
703
+ attachments?: Array<Pick<Attachment, "filename" | "description">>;
704
+ flags?: MessageFlags;
707
705
  threadName?: string;
708
- appliedTags?: Array<string>;
706
+ appliedTags?: Array<snowflake>;
709
707
  poll?: PollCreateParams;
710
- wait: boolean;
711
- threadID: snowflake;
708
+ wait?: boolean;
709
+ threadID?: snowflake;
712
710
  }): Promise<Message | null>;
713
711
  /**
714
712
  * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook