disgroove 2.2.2-dev.db6cb16 → 2.2.3-dev.933ac5e

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 (88) hide show
  1. package/README.md +5 -9
  2. package/dist/lib/Client.d.ts +113 -118
  3. package/dist/lib/Client.js +377 -250
  4. package/dist/lib/constants.d.ts +85 -74
  5. package/dist/lib/constants.js +88 -75
  6. package/dist/lib/gateway/Shard.js +188 -170
  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/RequestManager.js +1 -1
  13. package/dist/lib/rest/index.d.ts +0 -1
  14. package/dist/lib/rest/index.js +1 -2
  15. package/dist/lib/transformers/ApplicationCommands.d.ts +7 -0
  16. package/dist/lib/transformers/ApplicationCommands.js +90 -0
  17. package/dist/lib/transformers/ApplicationRoleConnectionMetadatas.d.ts +5 -0
  18. package/dist/lib/transformers/ApplicationRoleConnectionMetadatas.js +26 -0
  19. package/dist/lib/transformers/Applications.d.ts +5 -0
  20. package/dist/lib/transformers/Applications.js +97 -0
  21. package/dist/lib/transformers/AuditLogs.d.ts +7 -0
  22. package/dist/lib/transformers/AuditLogs.js +97 -0
  23. package/dist/lib/transformers/AutoModeration.d.ts +5 -0
  24. package/dist/lib/transformers/AutoModeration.js +64 -0
  25. package/dist/lib/transformers/Channels.d.ts +16 -0
  26. package/dist/lib/transformers/Channels.js +676 -0
  27. package/dist/lib/transformers/Emojis.d.ts +5 -0
  28. package/dist/lib/transformers/Emojis.js +31 -0
  29. package/dist/lib/transformers/Entitlements.d.ts +7 -0
  30. package/dist/lib/transformers/Entitlements.js +58 -0
  31. package/dist/lib/transformers/GuildScheduledEvents.d.ts +5 -0
  32. package/dist/lib/transformers/GuildScheduledEvents.js +51 -0
  33. package/dist/lib/transformers/GuildTemplates.d.ts +5 -0
  34. package/dist/lib/transformers/GuildTemplates.js +38 -0
  35. package/dist/lib/transformers/Guilds.d.ts +12 -0
  36. package/dist/lib/transformers/Guilds.js +248 -0
  37. package/dist/lib/transformers/Interactions.d.ts +10 -0
  38. package/dist/lib/transformers/Interactions.js +273 -0
  39. package/dist/lib/transformers/Invites.d.ts +5 -0
  40. package/dist/lib/transformers/Invites.js +79 -0
  41. package/dist/lib/transformers/Polls.d.ts +5 -0
  42. package/dist/lib/transformers/Polls.js +50 -0
  43. package/dist/lib/transformers/Presences.d.ts +8 -0
  44. package/dist/lib/transformers/Presences.js +108 -0
  45. package/dist/lib/transformers/Roles.d.ts +5 -0
  46. package/dist/lib/transformers/Roles.js +56 -0
  47. package/dist/lib/transformers/SKUs.d.ts +5 -0
  48. package/dist/lib/transformers/SKUs.js +26 -0
  49. package/dist/lib/transformers/StageInstances.d.ts +5 -0
  50. package/dist/lib/transformers/StageInstances.js +28 -0
  51. package/dist/lib/transformers/Stickers.d.ts +5 -0
  52. package/dist/lib/transformers/Stickers.js +41 -0
  53. package/dist/lib/transformers/Teams.d.ts +5 -0
  54. package/dist/lib/transformers/Teams.js +35 -0
  55. package/dist/lib/transformers/Users.d.ts +5 -0
  56. package/dist/lib/transformers/Users.js +48 -0
  57. package/dist/lib/transformers/Voice.d.ts +5 -0
  58. package/dist/lib/transformers/Voice.js +45 -0
  59. package/dist/lib/transformers/Webhooks.d.ts +5 -0
  60. package/dist/lib/transformers/Webhooks.js +51 -0
  61. package/dist/lib/transformers/index.d.ts +23 -0
  62. package/dist/lib/transformers/index.js +39 -0
  63. package/dist/lib/types/entitlements.d.ts +0 -6
  64. package/dist/lib/types/gateway-events.d.ts +21 -8
  65. package/dist/lib/types/interaction.d.ts +2 -2
  66. package/dist/lib/types/sku.d.ts +0 -12
  67. package/dist/lib/utils/CDN.d.ts +24 -0
  68. package/dist/lib/utils/CDN.js +49 -0
  69. package/dist/lib/utils/errors.d.ts +3 -3
  70. package/dist/lib/utils/errors.js +6 -8
  71. package/dist/lib/utils/formatters.d.ts +9 -0
  72. package/dist/lib/utils/formatters.js +38 -0
  73. package/dist/lib/utils/index.d.ts +2 -1
  74. package/dist/lib/utils/index.js +15 -1
  75. package/dist/package.json +3 -3
  76. package/package.json +3 -3
  77. package/dist/lib/rest/CDN.d.ts +0 -22
  78. package/dist/lib/rest/CDN.js +0 -45
  79. package/dist/lib/types/voice-connections.d.ts +0 -64
  80. package/dist/lib/types/voice-connections.js +0 -2
  81. package/dist/lib/utils/Util.d.ts +0 -94
  82. package/dist/lib/utils/Util.js +0 -2228
  83. package/dist/lib/voice/VoiceConnection.d.ts +0 -57
  84. package/dist/lib/voice/VoiceConnection.js +0 -150
  85. package/dist/lib/voice/VoiceConnectionManager.d.ts +0 -19
  86. package/dist/lib/voice/VoiceConnectionManager.js +0 -66
  87. package/dist/lib/voice/index.d.ts +0 -2
  88. package/dist/lib/voice/index.js +0 -18
package/README.md CHANGED
@@ -9,13 +9,13 @@ A module to interface with Discord
9
9
 
10
10
  ## Installation
11
11
 
12
- [**NodeJS v18**](https://nodejs.org) or newer required
12
+ [**Node.js v18**](https://nodejs.org) or newer required
13
13
 
14
14
  ```
15
15
  npm install disgroove
16
16
  ```
17
17
 
18
- #### Example
18
+ ## Example
19
19
 
20
20
  ```js
21
21
  const {
@@ -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
- console.log(`${client.user.username} is now online!`);
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,11 +1,10 @@
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";
3
- import { Util } from "./utils";
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";
4
3
  import { RequestManager, type File } from "./rest";
5
4
  import EventEmitter from "node:events";
6
5
  import { ShardManager } from "./gateway";
7
6
  import type { Application, ApplicationIntegrationTypeConfiguration, InstallParams } from "./types/application";
8
- import type { ApplicationCommand, GuildApplicationCommandPermissions, ApplicationCommandOption } from "./types/application-command";
7
+ import type { ApplicationCommand, GuildApplicationCommandPermissions, ApplicationCommandOption, ApplicationCommandPermission } from "./types/application-command";
9
8
  import type { ApplicationRoleConnectionMetadata } from "./types/application-role-connection-metadata";
10
9
  import type { AuditLog, AuditLogEntry } from "./types/audit-log";
11
10
  import type { AutoModerationRule, TriggerMetadata, AutoModerationAction } from "./types/auto-moderation";
@@ -13,11 +12,11 @@ import type { Channel, Message, FollowedChannel, ThreadMember, Overwrite, Defaul
13
12
  import type { LocaleMap, snowflake, timestamp } from "./types/common";
14
13
  import type { Emoji } from "./types/emoji";
15
14
  import type { Entitlement } from "./types/entitlements";
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 } 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 } from "./types/gateway-events";
17
16
  import type { Guild, GuildMember, WelcomeScreen, GuildWidgetSettings, Ban, Integration, GuildOnboarding, GuildPreview, GuildWidget, UnavailableGuild, OnboardingPrompt, WelcomeScreenChannel } from "./types/guild";
18
17
  import type { GuildScheduledEvent, GuildScheduledEventUser, GuildScheduledEventEntityMetadata } from "./types/guild-scheduled-event";
19
18
  import type { GuildTemplate } from "./types/guild-template";
20
- import type { Interaction, InteractionCallbackData } from "./types/interaction";
19
+ import type { Interaction, InteractionResponse } from "./types/interaction";
21
20
  import type { Invite } from "./types/invite";
22
21
  import type { ActionRow } from "./types/message-components";
23
22
  import type { PollCreateParams } from "./types/poll";
@@ -29,19 +28,22 @@ import type { User, ApplicationRoleConnection, Connection } from "./types/user";
29
28
  import type { VoiceRegion, VoiceState } from "./types/voice";
30
29
  import type { Webhook } from "./types/webhook";
31
30
  import type { ClientOptions as WebSocketOptions } from "ws";
31
+ export interface GatewayOptions {
32
+ properties?: IdentifyConnectionProperties;
33
+ compress?: boolean;
34
+ largeThreshold?: number;
35
+ presence?: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>;
36
+ intents?: number | Array<number>;
37
+ }
32
38
  export interface ClientOptions {
33
39
  shardsCount?: number | "auto";
34
40
  auth?: "Bot" | "Bearer";
35
- gateway?: {
36
- intents?: number | Array<number>;
37
- compress?: boolean;
38
- largeThreshold?: number;
39
- presence?: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>;
40
- };
41
+ gateway?: GatewayOptions;
41
42
  ws?: WebSocketOptions;
42
43
  }
43
44
  export declare class Client extends EventEmitter {
44
45
  token: string;
46
+ properties?: IdentifyConnectionProperties;
45
47
  compress?: boolean;
46
48
  largeThreshold?: number;
47
49
  presence?: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>;
@@ -50,7 +52,6 @@ export declare class Client extends EventEmitter {
50
52
  auth: "Bot" | "Bearer";
51
53
  shards: ShardManager;
52
54
  rest: RequestManager;
53
- util: Util;
54
55
  guildShardMap: Record<string, number>;
55
56
  user: User | null;
56
57
  guilds: Map<string, Guild>;
@@ -99,12 +100,13 @@ export declare class Client extends EventEmitter {
99
100
  id?: snowflake;
100
101
  name: string;
101
102
  nameLocalizations?: LocaleMap | null;
102
- description?: string;
103
+ description: string;
103
104
  descriptionLocalizations?: LocaleMap | null;
104
105
  options?: Array<ApplicationCommandOption>;
105
106
  defaultMemberPermissions?: string | null;
106
- dmPermission?: boolean;
107
107
  defaultPermission?: boolean | null;
108
+ integrationTypes: Array<ApplicationIntegrationTypes>;
109
+ contexts: Array<InteractionContextTypes>;
108
110
  type?: ApplicationCommandTypes;
109
111
  nsfw?: boolean;
110
112
  }>): Promise<Array<ApplicationCommand>>;
@@ -113,13 +115,12 @@ export declare class Client extends EventEmitter {
113
115
  id?: snowflake;
114
116
  name: string;
115
117
  nameLocalizations?: LocaleMap | null;
116
- description?: string;
118
+ description: string;
117
119
  descriptionLocalizations?: LocaleMap | null;
118
120
  options?: Array<ApplicationCommandOption>;
119
121
  defaultMemberPermissions?: string | null;
120
- dmPermission?: boolean;
121
122
  defaultPermission?: boolean | null;
122
- type: ApplicationCommandTypes;
123
+ type?: ApplicationCommandTypes;
123
124
  nsfw?: boolean;
124
125
  }>): Promise<Array<ApplicationCommand>>;
125
126
  /** https://discord.com/developers/docs/topics/gateway#connections */
@@ -134,29 +135,29 @@ export declare class Client extends EventEmitter {
134
135
  triggerMetadata?: TriggerMetadata;
135
136
  actions: Array<AutoModerationAction>;
136
137
  enabled?: boolean;
137
- exemptRoles?: Array<string>;
138
- exemptChannels?: Array<string>;
138
+ exemptRoles?: Array<snowflake>;
139
+ exemptChannels?: Array<snowflake>;
139
140
  }, reason?: string): Promise<AutoModerationRule>;
140
141
  /** https://discord.com/developers/docs/resources/guild#create-guild-channel */
141
142
  createChannel(guildID: snowflake, options: {
142
- name: string | null;
143
- type?: ChannelTypes;
143
+ name: string;
144
+ type?: ChannelTypes | null;
144
145
  topic?: string | null;
145
- bitrate?: number;
146
- userLimit?: number;
147
- rateLimitPerUser?: number;
148
- position?: number;
149
- permissionOverwrites?: Array<Overwrite>;
146
+ bitrate?: number | null;
147
+ userLimit?: number | null;
148
+ rateLimitPerUser?: number | null;
149
+ position?: number | null;
150
+ permissionOverwrites?: Array<Pick<Overwrite, "id" | "type"> & Partial<Overwrite>> | null;
150
151
  parentID?: snowflake | null;
151
- nsfw?: boolean;
152
+ nsfw?: boolean | null;
152
153
  rtcRegion?: string | null;
153
- videoQualityMode?: VideoQualityModes;
154
- defaultAutoArchiveDuration?: number;
154
+ videoQualityMode?: VideoQualityModes | null;
155
+ defaultAutoArchiveDuration?: number | null;
155
156
  defaultReactionEmoji?: DefaultReaction | null;
156
- availableTags?: Array<ForumTag>;
157
+ availableTags?: Array<ForumTag> | null;
157
158
  defaultSortOrder?: SortOrderTypes | null;
158
- defaultForumLayout?: ForumLayoutTypes;
159
- defaultThreadRateLimitPerUser?: number;
159
+ defaultForumLayout?: ForumLayoutTypes | null;
160
+ defaultThreadRateLimitPerUser?: number | null;
160
161
  }, reason?: string): Promise<Channel>;
161
162
  /** https://discord.com/developers/docs/resources/channel#create-channel-invite */
162
163
  createChannelInvite(channelID: snowflake, options: {
@@ -185,8 +186,9 @@ export declare class Client extends EventEmitter {
185
186
  descriptionLocalizations?: LocaleMap | null;
186
187
  options?: Array<ApplicationCommandOption>;
187
188
  defaultMemberPermissions?: string | null;
188
- dmPermission?: boolean;
189
189
  defaultPermission?: boolean | null;
190
+ integrationTypes?: Array<ApplicationIntegrationTypes>;
191
+ contexts?: Array<InteractionContextTypes>;
190
192
  type?: ApplicationCommandTypes;
191
193
  nsfw?: boolean;
192
194
  }): Promise<ApplicationCommand>;
@@ -198,7 +200,6 @@ export declare class Client extends EventEmitter {
198
200
  /** https://discord.com/developers/docs/resources/guild#create-guild */
199
201
  createGuild(options: {
200
202
  name: string;
201
- region?: string | null;
202
203
  icon?: string;
203
204
  verificationLevel?: VerificationLevel;
204
205
  defaultMessageNotifications?: DefaultMessageNotificationLevel;
@@ -263,13 +264,13 @@ export declare class Client extends EventEmitter {
263
264
  }, reason?: string): Promise<Role>;
264
265
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event */
265
266
  createGuildScheduledEvent(guildID: snowflake, options: {
266
- channelID?: snowflake | null;
267
- entityMetadata?: GuildScheduledEventEntityMetadata | null;
267
+ channelID?: snowflake;
268
+ entityMetadata?: GuildScheduledEventEntityMetadata;
268
269
  name: string;
269
270
  privacyLevel: GuildScheduledEventPrivacyLevel;
270
271
  scheduledStartTime: string;
271
- scheduledEndTime?: string | null;
272
- description?: string | null;
272
+ scheduledEndTime?: string;
273
+ description?: string;
273
274
  entityType: GuildScheduledEventEntityTypes;
274
275
  image?: string;
275
276
  }, reason?: string): Promise<GuildScheduledEvent>;
@@ -287,23 +288,20 @@ export declare class Client extends EventEmitter {
287
288
  }): Promise<GuildTemplate>;
288
289
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message */
289
290
  createInteractionFollowupMessage(applicationID: snowflake, interactionToken: string, options: {
290
- content?: string | null;
291
+ content?: string;
291
292
  tts?: boolean;
292
- embeds?: Array<Embed> | null;
293
- allowedMentions?: AllowedMentions | null;
294
- components?: Array<ActionRow> | null;
293
+ embeds?: Array<Embed>;
294
+ allowedMentions?: AllowedMentions;
295
+ components?: Array<ActionRow>;
295
296
  files?: Array<File> | null;
296
- attachments?: Array<Attachment> | null;
297
- flags?: MessageFlags | null;
297
+ attachments?: Array<Pick<Attachment, "filename" | "description">>;
298
+ flags?: MessageFlags;
298
299
  threadName?: string;
299
300
  appliedTags?: Array<string>;
300
301
  poll?: PollCreateParams;
301
302
  }): Promise<Message>;
302
303
  /** 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;
304
+ createInteractionResponse(interactionID: snowflake, interactionToken: string, options: InteractionResponse): void;
307
305
  /** https://discord.com/developers/docs/resources/channel#create-message */
308
306
  createMessage(channelID: snowflake, options: {
309
307
  content?: string;
@@ -315,7 +313,7 @@ export declare class Client extends EventEmitter {
315
313
  components?: Array<ActionRow>;
316
314
  stickersIDs?: Array<snowflake>;
317
315
  files?: Array<File>;
318
- attachments?: Array<Attachment>;
316
+ attachments?: Array<Pick<Attachment, "filename" | "description">>;
319
317
  flags?: MessageFlags;
320
318
  enforceNonce?: boolean;
321
319
  poll?: PollCreateParams;
@@ -342,15 +340,16 @@ export declare class Client extends EventEmitter {
342
340
  autoArchiveDuration?: number;
343
341
  rateLimitPerUser?: number | null;
344
342
  message: {
345
- content?: string | null;
346
- embeds?: Array<Embed> | null;
347
- allowedMentions?: AllowedMentions | null;
348
- components?: Array<ActionRow> | null;
349
- attachments?: Array<Attachment> | null;
350
- flags?: MessageFlags | null;
343
+ content?: string;
344
+ embeds?: Array<Embed>;
345
+ allowedMentions?: AllowedMentions;
346
+ components?: Array<ActionRow>;
347
+ stickerIDs?: Array<snowflake>;
348
+ attachments?: Array<Pick<Attachment, "filename" | "description">>;
349
+ flags?: MessageFlags;
350
+ files?: Array<File>;
351
351
  };
352
- appliedTags?: Array<string>;
353
- files?: Array<File> | null;
352
+ appliedTags?: Array<snowflake>;
354
353
  }, reason?: string): Promise<Channel>;
355
354
  /** https://discord.com/developers/docs/resources/channel#start-thread-from-message */
356
355
  createThreadFromMessage(channelID: snowflake, messageID: snowflake, options: {
@@ -425,12 +424,12 @@ export declare class Client extends EventEmitter {
425
424
  triggerMetadata?: TriggerMetadata;
426
425
  actions?: Array<AutoModerationAction>;
427
426
  enabled?: boolean;
428
- exemptRoles?: Array<string>;
429
- exemptChannels?: Array<string>;
427
+ exemptRoles?: Array<snowflake>;
428
+ exemptChannels?: Array<snowflake>;
430
429
  }, reason?: string): Promise<AutoModerationRule>;
431
430
  /** https://discord.com/developers/docs/interactions/application-commands#edit-application-command-permissions */
432
431
  editApplicationCommandPermissions(applicationID: snowflake, guildID: snowflake, commandID: snowflake, options: {
433
- permissions: Array<GuildApplicationCommandPermissions>;
432
+ permissions: Array<ApplicationCommandPermission>;
434
433
  }): Promise<GuildApplicationCommandPermissions>;
435
434
  /** https://discord.com/developers/docs/resources/channel#modify-channel */
436
435
  editChannel(channelID: snowflake, options: {
@@ -443,7 +442,7 @@ export declare class Client extends EventEmitter {
443
442
  rateLimitPerUser?: number | null;
444
443
  bitrate?: number | null;
445
444
  userLimit?: number | null;
446
- permissionOverwrites?: Array<Overwrite> | null;
445
+ permissionOverwrites?: Array<Pick<Overwrite, "id" | "type"> & Partial<Overwrite>> | null;
447
446
  parentID?: snowflake | null;
448
447
  rtcRegion?: string | null;
449
448
  videoQualityMode?: VideoQualityModes | null;
@@ -458,7 +457,7 @@ export declare class Client extends EventEmitter {
458
457
  autoArchiveDuration?: number;
459
458
  locked?: boolean;
460
459
  invitable?: boolean;
461
- appliedTags?: Array<string>;
460
+ appliedTags?: Array<snowflake>;
462
461
  }, reason?: string): Promise<Channel>;
463
462
  /** https://discord.com/developers/docs/resources/channel#edit-channel-permissions */
464
463
  editChannelPermissions(channelID: snowflake, overwriteID: snowflake, options: {
@@ -481,7 +480,7 @@ export declare class Client extends EventEmitter {
481
480
  }): Promise<User>;
482
481
  /** https://discord.com/developers/docs/resources/guild#modify-current-member */
483
482
  editCurrentGuildMember(guildID: snowflake, options: {
484
- nick?: string;
483
+ nick?: string | null;
485
484
  }, reason?: string): Promise<GuildMember>;
486
485
  /** https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state */
487
486
  editCurrentUserVoiceState(guildID: snowflake, options: {
@@ -497,8 +496,8 @@ export declare class Client extends EventEmitter {
497
496
  installParams?: InstallParams;
498
497
  integrationTypesConfig?: Record<ApplicationIntegrationTypes, ApplicationIntegrationTypeConfiguration>;
499
498
  flags?: ApplicationFlags;
500
- icon?: string;
501
- coverImage?: string;
499
+ icon?: string | null;
500
+ coverImage?: string | null;
502
501
  interactionsEndpointURL?: string;
503
502
  tags?: Array<string>;
504
503
  }): Promise<Application>;
@@ -511,16 +510,16 @@ export declare class Client extends EventEmitter {
511
510
  options?: Array<ApplicationCommandOption>;
512
511
  defaultMemberPermissions?: string | null;
513
512
  defaultPermission?: boolean | null;
514
- dmPermission?: boolean;
513
+ integrationTypes?: Array<ApplicationIntegrationTypes>;
514
+ contexts?: Array<InteractionContextTypes>;
515
515
  nsfw?: boolean;
516
516
  }): Promise<ApplicationCommand>;
517
517
  /** https://discord.com/developers/docs/resources/guild#modify-guild */
518
518
  editGuild(guildID: snowflake, options: {
519
519
  name?: string;
520
- region?: string | null;
521
- verificationLevel?: VerificationLevel;
522
- defaultMessageNotifications?: DefaultMessageNotificationLevel;
523
- explicitContentFilter?: ExplicitContentFilterLevel;
520
+ verificationLevel?: VerificationLevel | null;
521
+ defaultMessageNotifications?: DefaultMessageNotificationLevel | null;
522
+ explicitContentFilter?: ExplicitContentFilterLevel | null;
524
523
  afkChannelID?: snowflake | null;
525
524
  afkTimeout?: number;
526
525
  icon?: string | null;
@@ -532,7 +531,7 @@ export declare class Client extends EventEmitter {
532
531
  systemChannelFlags?: SystemChannelFlags;
533
532
  rulesChannelID?: snowflake | null;
534
533
  publicUpdatesChannelID?: snowflake | null;
535
- preferredLocale?: string;
534
+ preferredLocale?: string | null;
536
535
  features?: Array<GuildFeatures>;
537
536
  description?: string | null;
538
537
  premiumProgressBarEnabled?: boolean;
@@ -561,8 +560,8 @@ export declare class Client extends EventEmitter {
561
560
  mute?: boolean | null;
562
561
  deaf?: boolean | null;
563
562
  channelID?: snowflake | null;
564
- communicationDisabledUntil?: number | null;
565
- flags?: GuildMemberFlags;
563
+ communicationDisabledUntil?: timestamp | null;
564
+ flags?: GuildMemberFlags | null;
566
565
  }, reason?: string): Promise<GuildMember>;
567
566
  /** https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level */
568
567
  editGuildMFALevel(guildID: snowflake, options: {
@@ -589,15 +588,15 @@ export declare class Client extends EventEmitter {
589
588
  editGuildRolePositions(guildID: snowflake, options: Array<{
590
589
  id: snowflake;
591
590
  position?: number | null;
592
- }>): Promise<Array<Role>>;
591
+ }>, reason?: string): Promise<Array<Role>>;
593
592
  /** https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event */
594
593
  editGuildScheduledEvent(guildID: snowflake, guildScheduledEventID: snowflake, options: {
595
594
  channelID?: snowflake | null;
596
595
  entityMetadata?: GuildScheduledEventEntityMetadata | null;
597
596
  name?: string;
598
597
  privacyLevel?: GuildScheduledEventPrivacyLevel;
599
- scheduledStartTime?: string;
600
- scheduledEndTime?: string;
598
+ scheduledStartTime?: timestamp;
599
+ scheduledEndTime?: timestamp;
601
600
  description?: string | null;
602
601
  entityType?: GuildScheduledEventEntityTypes;
603
602
  status?: GuildScheduledEventStatus;
@@ -644,29 +643,26 @@ export declare class Client extends EventEmitter {
644
643
  editInteractionFollowupMessage(applicationID: snowflake, interactionToken: string, messageID: snowflake, options: {
645
644
  content?: string | null;
646
645
  embeds?: Array<Embed> | null;
647
- flags?: MessageFlags | null;
648
646
  allowedMentions?: AllowedMentions | null;
649
647
  components?: Array<ActionRow> | null;
650
648
  files?: Array<File> | null;
651
- attachments?: Array<Attachment> | null;
652
- threadID: snowflake;
649
+ attachments?: Array<Partial<Attachment>> | null;
650
+ threadID?: snowflake;
653
651
  }): Promise<Message>;
654
652
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#edit-original-interaction-response */
655
653
  editInteractionResponse(applicationID: snowflake, interactionToken: string, options: {
656
654
  content?: string | null;
657
655
  embeds?: Array<Embed> | null;
658
- flags?: MessageFlags | null;
659
656
  allowedMentions?: AllowedMentions | null;
660
657
  components?: Array<ActionRow> | null;
661
658
  files?: Array<File> | null;
662
- attachments?: Array<Attachment> | null;
663
- threadID: snowflake;
659
+ attachments?: Array<Partial<Attachment>> | null;
660
+ threadID?: snowflake;
664
661
  }): Promise<Message>;
665
662
  /** https://discord.com/developers/docs/resources/guild#modify-user-voice-state */
666
663
  editUserVoiceState(guildID: snowflake, userID: snowflake, options: {
667
- channelID?: snowflake;
664
+ channelID: snowflake;
668
665
  suppress?: boolean;
669
- requestToSpeakTimestamp?: timestamp | null;
670
666
  }): void;
671
667
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook */
672
668
  editWebhook(webhookID: snowflake, options: {
@@ -678,12 +674,11 @@ export declare class Client extends EventEmitter {
678
674
  editWebhookMessage(webhookID: snowflake, webhookToken: string, messageID: snowflake, options: {
679
675
  content?: string | null;
680
676
  embeds?: Array<Embed> | null;
681
- flags?: MessageFlags | null;
682
677
  allowedMentions?: AllowedMentions | null;
683
678
  components?: Array<ActionRow> | null;
684
679
  files?: Array<File> | null;
685
- attachments?: Array<Attachment> | null;
686
- threadID: snowflake;
680
+ attachments?: Array<Partial<Attachment>> | null;
681
+ threadID?: snowflake;
687
682
  }): Promise<Message>;
688
683
  /** https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token */
689
684
  editWebhookWithToken(webhookID: snowflake, webhookToken: string, options: {
@@ -694,21 +689,21 @@ export declare class Client extends EventEmitter {
694
689
  endPoll(channelID: snowflake, messageID: snowflake): Promise<Message>;
695
690
  /** https://discord.com/developers/docs/resources/webhook#execute-webhook */
696
691
  executeWebhook(webhookID: snowflake, webhookToken: string, options: {
697
- content?: string | null;
692
+ content?: string;
698
693
  username?: string;
699
694
  avatarURL?: string;
700
695
  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;
696
+ embeds?: Array<Embed>;
697
+ allowedMentions?: AllowedMentions;
698
+ components?: Array<ActionRow>;
699
+ files?: Array<File>;
700
+ attachments?: Array<Pick<Attachment, "filename" | "description">>;
701
+ flags?: MessageFlags;
707
702
  threadName?: string;
708
- appliedTags?: Array<string>;
703
+ appliedTags?: Array<snowflake>;
709
704
  poll?: PollCreateParams;
710
- wait: boolean;
711
- threadID: snowflake;
705
+ wait?: boolean;
706
+ threadID?: snowflake;
712
707
  }): Promise<Message | null>;
713
708
  /**
714
709
  * https://discord.com/developers/docs/resources/webhook#execute-githubcompatible-webhook
@@ -730,7 +725,7 @@ export declare class Client extends EventEmitter {
730
725
  }>;
731
726
  /** https://discord.com/developers/docs/resources/channel#list-public-archived-threads */
732
727
  getArchivedThreads(channelID: snowflake, archivedStatus: "public" | "private", options?: {
733
- before?: string;
728
+ before?: timestamp;
734
729
  limit?: number;
735
730
  }): Promise<{
736
731
  threads: Array<Channel>;
@@ -741,8 +736,8 @@ export declare class Client extends EventEmitter {
741
736
  getAuditLog(guildID: snowflake, options?: {
742
737
  userID?: snowflake;
743
738
  actionType?: ActionTypes;
744
- before?: string;
745
- after?: string;
739
+ before?: snowflake;
740
+ after?: snowflake;
746
741
  limit?: number;
747
742
  }): Promise<AuditLog>;
748
743
  /** https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule */
@@ -772,9 +767,9 @@ export declare class Client extends EventEmitter {
772
767
  /** https://discord.com/developers/docs/monetization/entitlements#list-entitlements */
773
768
  getEntitlements(applicationID: snowflake, options?: {
774
769
  userID?: snowflake;
775
- skuIDs?: Array<string>;
776
- before?: string;
777
- after?: string;
770
+ skuIDs?: Array<snowflake>;
771
+ before?: snowflake;
772
+ after?: snowflake;
778
773
  limit?: number;
779
774
  guildID?: snowflake;
780
775
  excludeEnded?: boolean;
@@ -806,11 +801,11 @@ export declare class Client extends EventEmitter {
806
801
  }): Promise<Guild>;
807
802
  /** https://discord.com/developers/docs/resources/user#get-current-user-guilds */
808
803
  getGuilds(options?: {
809
- before?: string;
810
- after?: string;
804
+ before?: snowflake;
805
+ after?: snowflake;
811
806
  limit?: number;
812
807
  withCounts?: boolean;
813
- }): Promise<Array<Guild>>;
808
+ }): Promise<Array<Pick<Guild, "id" | "name" | "icon" | "owner" | "permissions" | "features" | "approximateMemberCount" | "approximatePresenceCount">>>;
814
809
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
815
810
  getGuildApplicationCommand(applicationID: snowflake, guildID: snowflake, commandID: snowflake): Promise<ApplicationCommand>;
816
811
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
@@ -824,8 +819,8 @@ export declare class Client extends EventEmitter {
824
819
  /** https://discord.com/developers/docs/resources/guild#get-guild-bans */
825
820
  getGuildBans(guildID: snowflake, options?: {
826
821
  limit?: number;
827
- before?: string;
828
- after?: string;
822
+ before?: snowflake;
823
+ after?: snowflake;
829
824
  }): Promise<Array<Ban>>;
830
825
  /** https://discord.com/developers/docs/resources/emoji#get-guild-emoji */
831
826
  getGuildEmoji(guildID: snowflake, emojiID: snowflake): Promise<Emoji>;
@@ -846,7 +841,7 @@ export declare class Client extends EventEmitter {
846
841
  /** https://discord.com/developers/docs/resources/guild#get-guild-prune-count */
847
842
  getGuildPruneCount(guildID: snowflake, options: {
848
843
  days: number;
849
- includeRoles: string | Array<string>;
844
+ includeRoles: string | Array<snowflake>;
850
845
  }): Promise<{
851
846
  pruned: number;
852
847
  }>;
@@ -860,8 +855,8 @@ export declare class Client extends EventEmitter {
860
855
  getGuildScheduledEventUsers(guildID: snowflake, guildScheduledEventID: snowflake, options?: {
861
856
  limit?: number;
862
857
  withMember?: boolean;
863
- before?: string;
864
- after?: string;
858
+ before?: snowflake;
859
+ after?: snowflake;
865
860
  }): Promise<Array<GuildScheduledEventUser>>;
866
861
  /** https://discord.com/developers/docs/resources/sticker#get-guild-sticker */
867
862
  getGuildSticker(guildID: snowflake, stickerID: snowflake): Promise<Sticker>;
@@ -904,7 +899,7 @@ export declare class Client extends EventEmitter {
904
899
  }): Promise<Invite>;
905
900
  /** https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads */
906
901
  getJoinedPrivateArchivedThreads(channelID: snowflake, options?: {
907
- before?: string;
902
+ before?: snowflake;
908
903
  limit?: number;
909
904
  }): Promise<{
910
905
  threads: Array<Channel>;
@@ -916,14 +911,14 @@ export declare class Client extends EventEmitter {
916
911
  /** https://discord.com/developers/docs/resources/channel#get-reactions */
917
912
  getMessageReactions(channelID: snowflake, messageID: snowflake, emoji: string, options?: {
918
913
  type?: ReactionTypes;
919
- after?: string;
914
+ after?: snowflake;
920
915
  limit?: number;
921
916
  }): Promise<Array<User>>;
922
917
  /** https://discord.com/developers/docs/resources/channel#get-channel-messages */
923
918
  getMessages(channelID: snowflake, options: {
924
- around?: string;
925
- before?: string;
926
- after?: string;
919
+ around?: snowflake;
920
+ before?: snowflake;
921
+ after?: snowflake;
927
922
  limit?: number;
928
923
  }): Promise<Array<Message>>;
929
924
  /** https://discord.com/developers/docs/topics/oauth2#get-current-bot-application-information */
@@ -939,7 +934,7 @@ export declare class Client extends EventEmitter {
939
934
  getPinnedMessages(channelID: snowflake): Promise<Array<Message>>;
940
935
  /** https://discord.com/developers/docs/resources/poll#get-answer-voters */
941
936
  getPollAnswerVoters(channelID: snowflake, messageID: snowflake, answerID: snowflake, options?: {
942
- after?: string;
937
+ after?: snowflake;
943
938
  limit?: number;
944
939
  }): Promise<{
945
940
  users: Array<User>;
@@ -959,7 +954,7 @@ export declare class Client extends EventEmitter {
959
954
  /** https://discord.com/developers/docs/resources/channel#list-thread-members */
960
955
  getThreadMembers(channelID: snowflake, options?: {
961
956
  withMember?: boolean;
962
- after?: string;
957
+ after?: snowflake;
963
958
  limit?: number;
964
959
  }): Promise<Array<ThreadMember>>;
965
960
  /** https://discord.com/developers/docs/resources/user#get-user */