djs-selfbot-v13 3.1.7 → 3.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 (155) hide show
  1. package/README.md +18 -35
  2. package/package.json +85 -100
  3. package/src/client/BaseClient.js +3 -4
  4. package/src/client/Client.js +249 -530
  5. package/src/client/actions/Action.js +18 -13
  6. package/src/client/actions/ActionsManager.js +7 -1
  7. package/src/client/actions/AutoModerationActionExecution.js +1 -0
  8. package/src/client/actions/AutoModerationRuleCreate.js +1 -0
  9. package/src/client/actions/AutoModerationRuleDelete.js +1 -0
  10. package/src/client/actions/AutoModerationRuleUpdate.js +1 -0
  11. package/src/client/actions/GuildMemberRemove.js +0 -1
  12. package/src/client/actions/GuildMemberUpdate.js +0 -1
  13. package/src/client/actions/MessageCreate.js +0 -4
  14. package/src/client/actions/PresenceUpdate.js +17 -16
  15. package/src/client/websocket/WebSocketManager.js +11 -31
  16. package/src/client/websocket/WebSocketShard.js +39 -38
  17. package/src/client/websocket/handlers/CALL_CREATE.js +3 -3
  18. package/src/client/websocket/handlers/CALL_DELETE.js +2 -2
  19. package/src/client/websocket/handlers/CALL_UPDATE.js +2 -2
  20. package/src/client/websocket/handlers/CHANNEL_RECIPIENT_ADD.js +16 -13
  21. package/src/client/websocket/handlers/CHANNEL_RECIPIENT_REMOVE.js +11 -11
  22. package/src/client/websocket/handlers/GUILD_CREATE.js +19 -13
  23. package/src/client/websocket/handlers/GUILD_MEMBER_ADD.js +0 -1
  24. package/src/client/websocket/handlers/INTERACTION_MODAL_CREATE.js +1 -0
  25. package/src/client/websocket/handlers/MESSAGE_POLL_VOTE_ADD.js +22 -0
  26. package/src/client/websocket/handlers/MESSAGE_POLL_VOTE_REMOVE.js +12 -0
  27. package/src/client/websocket/handlers/READY.js +90 -140
  28. package/src/client/websocket/handlers/RELATIONSHIP_ADD.js +7 -5
  29. package/src/client/websocket/handlers/RELATIONSHIP_REMOVE.js +7 -5
  30. package/src/client/websocket/handlers/RELATIONSHIP_UPDATE.js +32 -9
  31. package/src/client/websocket/handlers/USER_GUILD_SETTINGS_UPDATE.js +2 -8
  32. package/src/client/websocket/handlers/USER_NOTE_UPDATE.js +1 -1
  33. package/src/client/websocket/handlers/USER_REQUIRED_ACTION_UPDATE.js +78 -0
  34. package/src/client/websocket/handlers/USER_SETTINGS_UPDATE.js +1 -5
  35. package/src/client/websocket/handlers/VOICE_CHANNEL_STATUS_UPDATE.js +12 -0
  36. package/src/client/websocket/handlers/index.js +17 -20
  37. package/src/errors/Messages.js +25 -69
  38. package/src/index.js +13 -43
  39. package/src/managers/ApplicationCommandManager.js +9 -12
  40. package/src/managers/ApplicationCommandPermissionsManager.js +3 -11
  41. package/src/managers/ChannelManager.js +2 -3
  42. package/src/managers/ClientUserSettingManager.js +162 -280
  43. package/src/managers/GuildBanManager.js +47 -1
  44. package/src/managers/GuildChannelManager.js +2 -16
  45. package/src/managers/GuildForumThreadManager.js +24 -30
  46. package/src/managers/GuildManager.js +1 -1
  47. package/src/managers/GuildMemberManager.js +50 -222
  48. package/src/managers/GuildSettingManager.js +22 -15
  49. package/src/managers/MessageManager.js +42 -44
  50. package/src/managers/PermissionOverwriteManager.js +1 -1
  51. package/src/managers/ReactionUserManager.js +5 -5
  52. package/src/managers/RelationshipManager.js +83 -76
  53. package/src/managers/ThreadManager.js +12 -45
  54. package/src/managers/ThreadMemberManager.js +1 -1
  55. package/src/managers/UserManager.js +6 -10
  56. package/src/managers/UserNoteManager.js +53 -0
  57. package/src/rest/APIRequest.js +48 -20
  58. package/src/rest/DiscordAPIError.js +17 -16
  59. package/src/rest/RESTManager.js +1 -21
  60. package/src/rest/RequestHandler.js +35 -21
  61. package/src/structures/ApplicationCommand.js +19 -456
  62. package/src/structures/ApplicationRoleConnectionMetadata.js +3 -0
  63. package/src/structures/AutoModerationRule.js +5 -5
  64. package/src/structures/AutocompleteInteraction.js +1 -0
  65. package/src/structures/BaseGuildTextChannel.js +10 -12
  66. package/src/structures/BaseGuildVoiceChannel.js +16 -18
  67. package/src/structures/{Call.js → CallState.js} +17 -12
  68. package/src/structures/CategoryChannel.js +2 -0
  69. package/src/structures/Channel.js +2 -3
  70. package/src/structures/ClientPresence.js +20 -19
  71. package/src/structures/ClientUser.js +117 -338
  72. package/src/structures/ContextMenuInteraction.js +1 -1
  73. package/src/structures/DMChannel.js +29 -92
  74. package/src/structures/ForumChannel.js +0 -10
  75. package/src/structures/GroupDMChannel.js +387 -0
  76. package/src/structures/Guild.js +135 -271
  77. package/src/structures/GuildAuditLogs.js +0 -5
  78. package/src/structures/GuildChannel.js +16 -2
  79. package/src/structures/GuildMember.js +27 -145
  80. package/src/structures/Interaction.js +1 -62
  81. package/src/structures/Invite.js +35 -52
  82. package/src/structures/Message.js +220 -203
  83. package/src/structures/MessageAttachment.js +11 -0
  84. package/src/structures/MessageButton.js +1 -67
  85. package/src/structures/MessageEmbed.js +1 -1
  86. package/src/structures/MessageMentions.js +3 -2
  87. package/src/structures/MessagePayload.js +6 -46
  88. package/src/structures/MessagePoll.js +238 -0
  89. package/src/structures/MessageReaction.js +1 -1
  90. package/src/structures/MessageSelectMenu.js +1 -252
  91. package/src/structures/Modal.js +70 -188
  92. package/src/structures/Presence.js +787 -129
  93. package/src/structures/Role.js +18 -2
  94. package/src/structures/SelectMenuInteraction.js +2 -151
  95. package/src/structures/Team.js +0 -49
  96. package/src/structures/TextInputComponent.js +0 -70
  97. package/src/structures/ThreadChannel.js +0 -19
  98. package/src/structures/User.js +145 -339
  99. package/src/structures/UserContextMenuInteraction.js +2 -2
  100. package/src/structures/VoiceState.js +74 -39
  101. package/src/structures/WebEmbed.js +38 -52
  102. package/src/structures/Webhook.js +17 -11
  103. package/src/structures/interfaces/Application.js +146 -23
  104. package/src/structures/interfaces/TextBasedChannel.js +409 -256
  105. package/src/util/ApplicationFlags.js +1 -1
  106. package/src/util/AttachmentFlags.js +38 -0
  107. package/src/util/Constants.js +120 -285
  108. package/src/util/Formatters.js +16 -2
  109. package/src/util/InviteFlags.js +29 -0
  110. package/src/util/LimitedCollection.js +1 -1
  111. package/src/util/Options.js +48 -74
  112. package/src/util/Permissions.js +15 -0
  113. package/src/util/PurchasedFlags.js +2 -0
  114. package/src/util/RemoteAuth.js +221 -356
  115. package/src/util/RoleFlags.js +37 -0
  116. package/src/util/Sweepers.js +1 -1
  117. package/src/util/Util.js +158 -32
  118. package/typings/enums.d.ts +24 -73
  119. package/typings/index.d.ts +978 -1288
  120. package/typings/rawDataTypes.d.ts +68 -9
  121. package/src/client/actions/InteractionCreate.js +0 -115
  122. package/src/client/websocket/handlers/APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE.js +0 -23
  123. package/src/client/websocket/handlers/GUILD_APPLICATION_COMMANDS_UPDATE.js +0 -11
  124. package/src/client/websocket/handlers/GUILD_MEMBER_LIST_UPDATE.js +0 -55
  125. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUNDS_UPDATE.js +0 -0
  126. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_CREATE.js +0 -0
  127. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_DELETE.js +0 -0
  128. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_UPDATE.js +0 -0
  129. package/src/client/websocket/handlers/INTERACTION_CREATE.js +0 -16
  130. package/src/client/websocket/handlers/INTERACTION_FAILURE.js +0 -18
  131. package/src/client/websocket/handlers/INTERACTION_SUCCESS.js +0 -30
  132. package/src/client/websocket/handlers/MESSAGE_ACK.js +0 -16
  133. package/src/client/websocket/handlers/SOUNDBOARD_SOUNDS.js +0 -0
  134. package/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js +0 -0
  135. package/src/managers/DeveloperPortalManager.js +0 -104
  136. package/src/managers/GuildApplicationCommandManager.js +0 -28
  137. package/src/managers/GuildFolderManager.js +0 -24
  138. package/src/managers/SessionManager.js +0 -57
  139. package/src/rest/CaptchaSolver.js +0 -132
  140. package/src/structures/ClientApplication.js +0 -204
  141. package/src/structures/DeveloperPortalApplication.js +0 -520
  142. package/src/structures/GuildFolder.js +0 -75
  143. package/src/structures/InteractionResponse.js +0 -114
  144. package/src/structures/PartialGroupDMChannel.js +0 -433
  145. package/src/structures/RichPresence.js +0 -722
  146. package/src/structures/Session.js +0 -81
  147. package/src/util/Voice.js +0 -1456
  148. package/src/util/arRPC/index.js +0 -229
  149. package/src/util/arRPC/process/detectable.json +0 -1
  150. package/src/util/arRPC/process/index.js +0 -102
  151. package/src/util/arRPC/process/native/index.js +0 -5
  152. package/src/util/arRPC/process/native/linux.js +0 -37
  153. package/src/util/arRPC/process/native/win32.js +0 -25
  154. package/src/util/arRPC/transports/ipc.js +0 -281
  155. package/src/util/arRPC/transports/websocket.js +0 -128
@@ -2,7 +2,6 @@ import {
2
2
  blockQuote,
3
3
  bold,
4
4
  channelMention,
5
- chatInputApplicationCommandMention,
6
5
  codeBlock,
7
6
  ContextMenuCommandBuilder,
8
7
  formatEmoji,
@@ -21,7 +20,6 @@ import {
21
20
  underscore,
22
21
  userMention,
23
22
  } from '@discordjs/builders';
24
- import { VoiceConnection } from '@discordjs/voice';
25
23
  import { Collection } from '@discordjs/collection';
26
24
  import {
27
25
  APIActionRowComponent,
@@ -47,13 +45,13 @@ import {
47
45
  APISelectMenuComponent,
48
46
  APITemplateSerializedSourceGuild,
49
47
  APIUser,
50
- MessageActivityType,
51
- GatewayOpcodes,
52
48
  GatewayVoiceServerUpdateDispatchData,
53
49
  GatewayVoiceStateUpdateDispatchData,
50
+ MessageActivityType,
54
51
  RESTPostAPIApplicationCommandsJSONBody,
55
52
  Snowflake,
56
53
  LocalizationMap,
54
+ LocaleString,
57
55
  APIGuildMember,
58
56
  APIChannel,
59
57
  } from 'discord-api-types/v9';
@@ -74,10 +72,6 @@ import {
74
72
  AutoModerationRuleKeywordPresetTypes,
75
73
  AutoModerationRuleTriggerTypes,
76
74
  ChannelTypes,
77
- RelationshipTypes,
78
- localeSetting,
79
- stickerAnimationMode,
80
- DMScanLevel,
81
75
  DefaultMessageNotificationLevels,
82
76
  ExplicitContentFilterLevels,
83
77
  InteractionResponseTypes,
@@ -88,9 +82,6 @@ import {
88
82
  MessageComponentTypes,
89
83
  MessageTypes,
90
84
  MFALevels,
91
- NitroType as NitroTypes,
92
- HypeSquadType as HypeSquadTypes,
93
- localeSetting as localeSettings,
94
85
  NSFWLevels,
95
86
  OverwriteTypes,
96
87
  PremiumTiers,
@@ -103,12 +94,14 @@ import {
103
94
  GuildScheduledEventEntityTypes,
104
95
  GuildScheduledEventStatuses,
105
96
  GuildScheduledEventPrivacyLevels,
106
- HypeSquadType,
107
97
  VideoQualityModes,
108
98
  SortOrderType,
109
- SelectMenuComponentTypes,
110
99
  ForumLayoutType,
111
100
  ApplicationRoleConnectionMetadataTypes,
101
+ RelationshipType,
102
+ SelectMenuComponentTypes,
103
+ InviteType,
104
+ MessagePollLayoutType,
112
105
  } from './enums';
113
106
  import {
114
107
  APIApplicationRoleConnectionMetadata,
@@ -120,7 +113,6 @@ import {
120
113
  RawApplicationData,
121
114
  RawBaseGuildData,
122
115
  RawChannelData,
123
- RawClientApplicationData,
124
116
  RawDMChannelData,
125
117
  RawEmojiData,
126
118
  RawGuildAuditLogData,
@@ -173,134 +165,21 @@ import {
173
165
  RawWidgetData,
174
166
  RawWidgetMemberData,
175
167
  } from './rawDataTypes';
176
- // @ts-ignore
177
- //#region Classes
178
-
179
- export class SessionManager extends CachedManager<string, Session, any> {
180
- private constructor(client: Client, iterable: Iterable<any>);
181
- public fetch(): Promise<SessionManager>;
182
- public logoutAllDevices(mfaCode?: string): Promise<undefined>;
183
- }
184
-
185
- export class BillingManager extends BaseManager {
186
- constructor(client: Client);
187
- public paymentSources: Collection<Snowflake, object>;
188
- public fetchPaymentSources(): Promise<Collection<Snowflake, object>>;
189
- public guildBoosts: Collection<Snowflake, GuildBoost>;
190
- public fetchGuildBoosts(): Promise<Collection<Snowflake, GuildBoost>>;
191
- public currentSubscription: Collection<Snowflake, object>;
192
- public fetchCurrentSubscription(): Promise<Collection<Snowflake, object>>;
193
- }
194
-
195
- export class GuildBoost extends Base {
196
- constructor(client: Client, data: object);
197
- public id: Snowflake;
198
- public guildId?: Snowflake;
199
- public readonly guild: Guild | null;
200
- public subscriptionId: Snowflake;
201
- public premiumGuildSubscriptionId?: Snowflake;
202
- public ended?: boolean;
203
- public canceled: boolean;
204
- public cooldownEndsAt: Date;
205
- public unsubscribe(): Promise<this>;
206
- public subscribe(guild: GuildResolvable): Promise<this>;
207
- }
208
-
209
- export class Session extends Base {
210
- constructor(client: Client);
211
- public id?: string;
212
- public clientInfo?: SessionClientInfo;
213
- public readonly createdTimestamp: number;
214
- public readonly createdAt: Date;
215
- public logout(mfaCode?: string): Promise<undefined>;
216
- }
217
-
218
- export interface SessionClientInfo {
219
- location?: string;
220
- platform?: string;
221
- os?: string;
222
- }
223
-
224
- export class DiscordAuthWebsocket extends EventEmitter {
225
- constructor(options?: DiscordAuthWebsocketOptions);
226
- public fingerprint?: string;
227
- public heartbeatInterval?: number;
228
- public ws?: WebSocket;
229
- public token?: string;
230
- public realToken?: string;
231
- public user?: RawUserData;
232
- public captchaCache?: Captcha;
233
- public captchaHandler(data: Captcha): Promise<string>;
234
- public readonly exprireTime: string;
235
- public connect(client?: Client): void;
236
- public destroy(): void;
237
- public generateQR(): void;
238
- public on(event: 'ready', listener: (fingerprint: string, authURL: string) => void): this;
239
- public on(event: 'finish', listener: (user: RawUserData, token: string) => void): this;
240
- public on(event: 'cancel' | 'pending', listener: (user: RawUserData) => void): this;
241
- public on(event: 'closed', listener: (token?: string) => void): this;
242
- public on(event: string, listener: (...args: any[]) => Awaitable<void>): this;
243
- }
244
-
245
- export class DiscordRPCServer extends EventEmitter {
246
- constructor(client: Client, debug?: boolean);
247
- public debug?: boolean;
248
- public client: Client;
249
- public on(event: 'activity', listener: (data: RPCActivityData) => void): this;
250
- }
251
-
252
- export class Call extends Base {
253
- constructor(client: Client, data: object);
254
- public channelId: Snowflake;
255
- public ringing: Collection<Snowflake, User>;
256
- public region?: string;
257
- public readonly channel: PartialDMChannel | PartialGroupDMChannel;
258
- public setVoiceRegion(region: string): Promise<undefined>;
259
- }
260
168
 
261
- export interface RPCActivityData {
262
- activity?: RichPresence;
263
- pid: number;
264
- socketId: string;
265
- }
169
+ //#region Classes
266
170
 
267
- export interface DiscordAuthWebsocketOptions {
268
- debug: boolean;
269
- hiddenLog: boolean;
270
- autoLogin: boolean;
271
- failIfError: boolean;
272
- generateQR: boolean;
273
- userAgent?: string;
274
- wsProperties?: object;
275
- }
276
171
  // RPC by aiko-chan-ai
277
172
  export interface RichButton {
278
173
  name: string;
279
174
  url: string;
280
175
  }
281
176
 
282
- export class RichPresence {
283
- public constructor(client?: Client, data?: object, IPC?: boolean);
284
- public application_id: Snowflake | null;
285
- public assets: RichPresenceAssets | null;
286
- public buttons: string[];
287
- public details: string | null;
288
- public name: string;
289
- public party: {
290
- id: string | null;
291
- size: [number, number];
292
- } | null;
293
- public state: string | null;
294
- public timestamps: {
295
- start: Date | null;
296
- end: Date | null;
297
- } | null;
298
- public type: ActivityType;
299
- public url: string | null;
300
- public ipc: boolean;
301
- public setAssetsLargeImage(image?: any): this;
177
+ export class RichPresence extends Activity {
178
+ public constructor(client: Client, data?: object);
179
+ public metadata: RichPresenceMetadata;
180
+ public setAssetsLargeImage(image?: string): this;
302
181
  public setAssetsLargeText(text?: string): this;
303
- public setAssetsSmallImage(image?: any): this;
182
+ public setAssetsSmallImage(image?: string): this;
304
183
  public setAssetsSmallText(text?: string): this;
305
184
  public setName(name?: string): this;
306
185
  public setURL(url?: string): this;
@@ -309,82 +188,81 @@ export class RichPresence {
309
188
  public setDetails(details?: string): this;
310
189
  public setState(state?: string): this;
311
190
  public setParty(party?: { max: number; current: number; id?: string }): this;
312
- public setStartTimestamp(timestamp?: Date): this;
313
- public setEndTimestamp(timestamp?: Date): this;
191
+ public setStartTimestamp(timestamp: Date | number | null): this;
192
+ public setEndTimestamp(timestamp: Date | number | null): this;
314
193
  public setButtons(...button: RichButton[]): this;
315
194
  public addButton(name: string, url: string): this;
195
+ public setJoinSecret(join?: string): this;
196
+ public setPlatform(platform?: ActivityPlatform): this;
316
197
  public static getExternal(
317
198
  client: Client,
318
199
  applicationId: Snowflake,
319
200
  image1: string,
320
201
  image2: string,
321
202
  ): Promise<ExternalAssets[]>;
322
- public static getUUID(): string;
323
203
  public toJSON(): object;
324
204
  public toString(): string;
325
205
  }
326
206
 
207
+ export class DiscordAuthWebsocket extends EventEmitter {
208
+ constructor();
209
+ public token: string;
210
+ public readonly user: {
211
+ id: Snowflake;
212
+ username: string;
213
+ discriminator: number;
214
+ avatar: string;
215
+ };
216
+ public readonly exprire: Date;
217
+ public readonly AuthURL: string;
218
+ public connect(client?: Client): Promise<void>;
219
+ public destroy(): void;
220
+ public generateQR(): void;
221
+ public on(event: 'ready', listener: (client: this) => void): this;
222
+ public on(event: 'finish', listener: (token: string) => void): this;
223
+ public on(event: 'cancel' | 'pending', listener: (user: RawUserData) => void): this;
224
+ public on(event: 'closed', listener: () => void): this;
225
+ public on(event: string, listener: (...args: any[]) => Awaitable<void>): this;
226
+ }
227
+
327
228
  export interface ExternalAssets {
328
229
  url: string;
329
230
  external_asset_path: string;
330
231
  }
331
232
 
332
- export interface SpotifyMetadata {
333
- album_id: string;
334
- artist_ids: string[];
233
+ export interface RichPresenceMetadata {
234
+ album_id?: string;
235
+ artist_ids?: string[];
236
+ context_uri?: string;
237
+ button_urls?: string[];
335
238
  }
336
239
 
337
240
  export class SpotifyRPC extends RichPresence {
338
241
  public constructor(client: Client, data?: object);
339
- public application_id: Snowflake | null;
340
- public client: Client;
341
- public assets: RichPresenceAssets | null;
342
- public buttons: string[];
343
- public details: string | null;
344
- public name: string;
345
- public sync_id: string;
346
- public id: string;
347
- public flags: number;
348
- public party: {
349
- id: string | null;
350
- size: [number, number];
351
- } | null;
352
- public state: string | null;
353
- public timestamps: {
354
- start: Date | null;
355
- end: Date | null;
356
- } | null;
357
- public type: ActivityType;
358
- public url: string | null;
359
- public metadata: SpotifyMetadata;
360
- public setAssetsLargeImage(image?: string): this;
361
- public setAssetsSmallImage(image?: string): this;
362
242
  public setSongId(id: string): this;
363
243
  public addArtistId(id: string): this;
364
244
  public setArtistIds(...ids: string[]): this;
365
245
  public setAlbumId(id: string): this;
366
246
  }
367
247
 
368
- export class CustomStatus {
369
- public constructor(data?: object);
370
- public emoji: EmojiIdentifierResolvable;
371
- public state: string;
248
+ export class CustomStatus extends Activity {
249
+ public constructor(client: Client, data?: object);
372
250
  public setEmoji(emoji?: EmojiIdentifierResolvable): this;
373
251
  public setState(state: string): this;
374
- public toJSON(): object;
375
252
  public toString(): string;
253
+ public toJSON(): unknown;
376
254
  }
377
255
 
378
256
  export class Activity {
379
- private constructor(presence: Presence, data?: RawActivityData);
257
+ public constructor(presence: Presence, data?: RawActivityData);
380
258
  public readonly presence: Presence;
381
259
  public applicationId: Snowflake | null;
382
- public assets: RichPresenceAssets | null;
260
+ public assets: RichPresenceAssets;
383
261
  public buttons: string[];
384
262
  public readonly createdAt: Date;
385
263
  public createdTimestamp: number;
386
264
  public details: string | null;
387
- public emoji: Emoji | null;
265
+ public emoji: EmojiIdentifierResolvable | null;
388
266
  public flags: Readonly<ActivityFlags>;
389
267
  public id: string;
390
268
  public name: string;
@@ -397,8 +275,8 @@ export class Activity {
397
275
  public state: string | null;
398
276
  public syncId: string | null;
399
277
  public timestamps: {
400
- start: Date | null;
401
- end: Date | null;
278
+ start: number | null;
279
+ end: number | null;
402
280
  } | null;
403
281
  public type: ActivityType;
404
282
  public url: string | null;
@@ -420,6 +298,11 @@ export class PremiumUsageFlags extends BitField<PremiumUsageFlagsString> {
420
298
  public static resolve(bit?: BitFieldResolvable<PremiumUsageFlagsString, number>): number;
421
299
  }
422
300
 
301
+ export class InviteFlags extends BitField<InviteFlagsString> {
302
+ public static FLAGS: Record<InviteFlagsString, number>;
303
+ public static resolve(bit?: BitFieldResolvable<InviteFlagsString, number>): number;
304
+ }
305
+
423
306
  export abstract class AnonymousGuild extends BaseGuild {
424
307
  protected constructor(client: Client, data: RawAnonymousGuildData, immediatePatch?: boolean);
425
308
  public banner: string | null;
@@ -442,103 +325,43 @@ export abstract class Application extends Base {
442
325
  public id: Snowflake;
443
326
  public name: string | null;
444
327
  public roleConnectionsVerificationURL: string | null;
445
- public coverURL(options?: StaticImageURLOptions): string | null;
446
- /** @deprecated This method is deprecated as it is unsupported and will be removed in the next major version. */
447
- public fetchAssets(): Promise<ApplicationAsset[]>;
448
- public invite(guildID: Snowflake, permissions?: PermissionResolvable, captcha?: string): Promise<undefined>;
449
- public iconURL(options?: StaticImageURLOptions): string | null;
450
- public toJSON(): unknown;
451
- public toString(): string | null;
452
- }
453
-
454
- export interface Tester {
455
- state: number;
456
- user: User;
457
- }
458
-
459
- export interface ApplicationEditData {
460
- name?: string;
461
- description?: string;
462
- icon?: BufferResolvable | Base64Resolvable;
463
- cover?: BufferResolvable | Base64Resolvable;
464
- botPublic?: boolean;
465
- botRequireCodeGrant?: boolean;
466
- TermsOfService?: string;
467
- PrivacyPolicy?: string;
468
- flags?: number;
469
- redirectURIs?: string[];
470
- tags?: string[];
471
- }
472
- export class DeveloperPortalApplication extends Base {
473
- private constructor(client: Client, data: object);
328
+ public approximateGuildCount: number | null;
474
329
  public botPublic: boolean | null;
475
330
  public botRequireCodeGrant: boolean | null;
476
331
  public commands: ApplicationCommandManager;
477
332
  public cover: string | null;
478
333
  public flags: Readonly<ApplicationFlags>;
334
+ public guildId: Snowflake | null;
335
+ public readonly guild: Guild | null;
479
336
  public tags: string[];
480
337
  public installParams: ClientApplicationInstallParams | null;
481
338
  public customInstallURL: string | null;
482
339
  public owner: User | Team | null;
483
340
  public readonly partial: boolean;
484
341
  public rpcOrigins: string[];
485
- public readonly createdAt: Date;
486
- public readonly createdTimestamp: number;
487
- public description: string | null;
488
- public icon: string | null;
489
- public id: Snowflake;
490
- public name: string | null;
491
- public redirectURIs: string[];
492
- public interactionEndpointURL: string | null;
493
- public publicKey: string;
494
- public testers: Collection<Snowflake, Tester>;
495
- public TermsOfService: string | null;
496
- public PrivacyPolicy: string | null;
497
- public roleConnectionsVerificationURL: string | null;
498
- public fetch(): Promise<ClientApplication>;
342
+ public fetch(): Promise<Application>;
343
+ public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>;
499
344
  public coverURL(options?: StaticImageURLOptions): string | null;
500
345
  /** @deprecated This method is deprecated as it is unsupported and will be removed in the next major version. */
501
346
  public fetchAssets(): Promise<ApplicationAsset[]>;
502
347
  public iconURL(options?: StaticImageURLOptions): string | null;
503
348
  public toJSON(): unknown;
504
349
  public toString(): string | null;
505
- public fetchTesters(): Promise<this>;
506
- public addTester(username: string, discriminator: string): Promise<DeveloperPortalApplication>;
507
- public deleteTester(user: UserResolvable): Promise<DeveloperPortalApplication>;
508
- public edit(data: ApplicationEditData): Promise<DeveloperPortalApplication>;
509
- public createBot(): Promise<DeveloperPortalApplication>;
510
- public resetClientSecret(MFACode?: number): Promise<string>;
511
- public resetBotToken(MFACode?: number): Promise<string>;
512
- public delete(MFACode?: number): Promise<undefined>;
513
- public addAsset(image: BufferResolvable | Base64Resolvable, name: string): Promise<ApplicationAsset>;
514
- public deleteAsset(id: string): Promise<undefined>;
515
- public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>;
516
- public editRoleConnectionMetadataRecords(
517
- records: ApplicationRoleConnectionMetadataEditOptions[],
518
- ): Promise<ApplicationRoleConnectionMetadata[]>;
519
- }
520
-
521
- export class DeveloperPortalManager extends BaseManager {
522
- constructor(client: Client);
523
- public applications: Collection<Snowflake, DeveloperPortalApplication>;
524
- public teams: Collection<Snowflake, Team>;
525
- public fetch(): Promise<DeveloperPortalManager>;
526
- public createTeam(name: string): Promise<Team>;
527
- public createApplication(name: string, teamId?: Team | Snowflake): Promise<DeveloperPortalApplication>;
528
- public deleteApplication(id: Snowflake, MFACode?: number): Promise<undefined>;
529
350
  }
530
351
 
531
352
  export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
532
- private constructor(client: Client, data: RawApplicationCommandData);
353
+ private constructor(client: Client, data: RawApplicationCommandData, guild?: Guild, guildId?: Snowflake);
533
354
  public applicationId: Snowflake;
534
355
  public readonly createdAt: Date;
535
356
  public readonly createdTimestamp: number;
536
357
  /** @deprecated Use {@link defaultMemberPermissions} and {@link dmPermission} instead. */
537
358
  public defaultPermission: boolean;
359
+ public defaultMemberPermissions: Readonly<Permissions> | null;
538
360
  public description: string;
539
361
  public descriptionLocalizations: LocalizationMap | null;
540
362
  public descriptionLocalized: string | null;
541
- public readonly guild: Guild | null;
363
+ public dmPermission: boolean | null;
364
+ public guild: Guild | null;
542
365
  public guildId: Snowflake | null;
543
366
  public readonly manager: ApplicationCommandManager;
544
367
  public id: Snowflake;
@@ -587,13 +410,6 @@ export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
587
410
  private static transformOption(option: ApplicationCommandOptionData, received?: boolean): unknown;
588
411
  private static transformCommand(command: ApplicationCommandData): RESTPostAPIApplicationCommandsJSONBody;
589
412
  private static isAPICommandData(command: object): command is RESTPostAPIApplicationCommandsJSONBody;
590
- // Add
591
- public static sendSlashCommand(
592
- message: Message,
593
- subCommandArray?: string[],
594
- options?: any[],
595
- ): Promise<InteractionResponse>;
596
- public static sendContextMenu(message: Message): Promise<InteractionResponse>;
597
413
  }
598
414
 
599
415
  export class ApplicationRoleConnectionMetadata {
@@ -768,6 +584,7 @@ export class BaseGuildEmoji extends Emoji {
768
584
  export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel) {
769
585
  protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean);
770
586
  public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
587
+ public defaultThreadRateLimitPerUser: number | null;
771
588
  public rateLimitPerUser: number | null;
772
589
  public nsfw: boolean;
773
590
  public threads: GuildTextThreadManager<AllowedThreadTypeForTextChannel | AllowedThreadTypeForNewsChannel>;
@@ -794,6 +611,7 @@ export class BaseGuildVoiceChannel extends TextBasedChannelMixin(GuildChannel, [
794
611
  public rateLimitPerUser: number | null;
795
612
  public userLimit: number;
796
613
  public videoQualityMode: VideoQualityMode | null;
614
+ public status?: string;
797
615
  public createInvite(options?: CreateInviteOptions): Promise<Invite>;
798
616
  public setRTCRegion(rtcRegion: string | null, reason?: string): Promise<this>;
799
617
  public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
@@ -885,7 +703,6 @@ export class CategoryChannel extends GuildChannel {
885
703
  name: string,
886
704
  options: CategoryCreateChannelOptions & { type: T },
887
705
  ): Promise<MappedChannelCategoryTypes[T]>;
888
-
889
706
  /** @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/6309018858647) for more information */
890
707
  public createChannel(
891
708
  name: string,
@@ -917,31 +734,12 @@ export abstract class Channel extends Base {
917
734
 
918
735
  export type If<T extends boolean, A, B = null> = T extends true ? A : T extends false ? B : A | B;
919
736
 
920
- export interface OAuth2AuthorizeOptions {
921
- guild_id: Snowflake;
922
- permissions?: PermissionResolvable;
923
- authorize?: boolean;
924
- code?: string;
925
- webhook_channel_id?: Snowflake;
926
- }
927
-
928
737
  export class Client<Ready extends boolean = boolean> extends BaseClient {
929
- public constructor(options?: ClientOptions); /* Bug report by Mavri#0001 [721347809667973141] */
738
+ public constructor(options?: ClientOptions);
930
739
  private actions: unknown;
931
740
  private presence: ClientPresence;
932
741
  private _eval(script: string): unknown;
933
742
  private _validateOptions(options: ClientOptions): void;
934
- private autoRedeemNitro(message: Message): object;
935
-
936
- public application: If<Ready, ClientApplication>;
937
- // Added
938
- public settings: ClientUserSettingManager;
939
- public relationships: RelationshipManager;
940
- public readonly callVoice?: VoiceConnection;
941
- public voiceStates: VoiceStateManager;
942
- public sessions: SessionManager;
943
- public billing: BillingManager;
944
- // End
945
743
  public channels: ChannelManager;
946
744
  public readonly emojis: BaseGuildEmojiManager;
947
745
  public guilds: GuildManager;
@@ -956,36 +754,39 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
956
754
  public users: UserManager;
957
755
  public voice: ClientVoiceManager;
958
756
  public ws: WebSocketManager;
959
- public password: string | null;
960
- public readonly sessionId: string | null;
757
+ public notes: UserNoteManager;
758
+ public relationships: RelationshipManager;
759
+ public voiceStates: VoiceStateManager;
760
+ public presences: PresenceManager;
761
+ public billing: BillingManager;
762
+ public settings: ClientUserSettingManager;
763
+ public readonly sessionId: If<Ready, string, undefined>;
961
764
  public destroy(): void;
962
- public logout(): Promise<void>;
963
765
  public fetchGuildPreview(guild: GuildResolvable): Promise<GuildPreview>;
964
766
  public fetchInvite(invite: InviteResolvable, options?: ClientFetchInviteOptions): Promise<Invite>;
965
- public acceptInvite(invite: InviteResolvable): Promise<undefined>;
966
767
  public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>;
967
768
  public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
968
769
  public fetchSticker(id: Snowflake): Promise<Sticker>;
969
770
  public fetchPremiumStickerPacks(): Promise<Collection<Snowflake, StickerPack>>;
970
771
  public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
971
772
  public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>;
972
- public redeemNitro(code: string, channel?: TextChannelResolvable, paymentSourceId?: Snowflake): object;
973
- public generateInvite(options?: InviteGenerationOptions): string;
773
+ public sleep(timeout: number): Promise<void>;
974
774
  public login(token?: string): Promise<string>;
975
- public normalLogin(username: string, password?: string, mfaCode?: string): Promise<string>;
976
- public switchUser(token: string): void;
977
- public QRLogin(options?: DiscordAuthWebsocketOptions): DiscordAuthWebsocket;
978
- public remoteAuth(url: string): Promise<undefined>;
979
- public createToken(): Promise<string>;
980
- public checkUpdate(): Promise<this>;
775
+ public passLogin(email: string, password: string, code?: string | number): Promise<string | null>;
776
+ public QRLogin(): Promise<void>;
777
+ public logout(): Promise<void>;
981
778
  public isReady(): this is Client<true>;
982
779
  /** @deprecated Use {@link Sweepers#sweepMessages} instead */
983
780
  public sweepMessages(lifetime?: number): number;
984
- private customStatusAuto(client?: this): undefined;
985
- public authorizeURL(url: string, options?: object): Promise<object>;
986
- public sleep(milliseconds: number): Promise<void> | null;
987
- private _clearCache(cache: Collection<any, any>): void;
988
781
  public toJSON(): unknown;
782
+ public acceptInvite(
783
+ invite: InviteResolvable,
784
+ options?: AcceptInviteOptions,
785
+ ): Promise<Guild | DMChannel | GroupDMChannel>;
786
+ public redeemNitro(nitro: string, channel?: TextChannelResolvable, paymentSourceId?: Snowflake): Promise<any>;
787
+ public authorizeURL(url: string, options?: OAuth2AuthorizeOptions): Promise<any>;
788
+ public installUserApps(applicationId: Snowflake): Promise<void>;
789
+ public deauthorize(applicationId: Snowflake): Promise<void>;
989
790
 
990
791
  public on<K extends keyof ClientEvents>(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>): this;
991
792
  public on<S extends string | symbol>(
@@ -1012,25 +813,17 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
1012
813
  public removeAllListeners<S extends string | symbol>(event?: Exclude<S, keyof ClientEvents>): this;
1013
814
  }
1014
815
 
1015
- export class ClientApplication extends Application {
1016
- private constructor(client: Client, data: RawClientApplicationData);
1017
- public botPublic: boolean | null;
1018
- public popularCommands: Collection<Snowflake, ApplicationCommand> | undefined;
1019
- public botRequireCodeGrant: boolean | null;
1020
- public commands: ApplicationCommandManager;
1021
- public cover: string | null;
1022
- public flags: Readonly<ApplicationFlags>;
1023
- public tags: string[];
1024
- public installParams: ClientApplicationInstallParams | null;
1025
- public customInstallURL: string | null;
1026
- public owner: User | Team | null;
1027
- public readonly partial: boolean;
1028
- public rpcOrigins: string[];
1029
- public fetch(): Promise<ClientApplication>;
1030
- public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>;
1031
- public editRoleConnectionMetadataRecords(
1032
- records: ApplicationRoleConnectionMetadataEditOptions[],
1033
- ): Promise<ApplicationRoleConnectionMetadata[]>;
816
+ export interface AcceptInviteOptions {
817
+ bypassOnboarding: boolean;
818
+ bypassVerify: boolean;
819
+ }
820
+
821
+ export interface OAuth2AuthorizeOptions {
822
+ guild_id?: Snowflake;
823
+ permissions?: PermissionResolvable;
824
+ authorize?: boolean;
825
+ code?: string;
826
+ webhook_channel_id?: Snowflake;
1034
827
  }
1035
828
 
1036
829
  export class ClientPresence extends Presence {
@@ -1044,57 +837,38 @@ export class ClientUser extends User {
1044
837
  public mfaEnabled: boolean;
1045
838
  public readonly presence: ClientPresence;
1046
839
  public verified: boolean;
1047
- public notes: Collection<Snowflake, string>;
1048
- public friendNicknames: Collection<Snowflake, string>;
1049
- public purchasedFlags: PurchasedFlags;
1050
- public premiumUsageFlags: PremiumUsageFlags;
1051
- public setThemeColors(primary?: ColorResolvable, accent?: ColorResolvable): ClientUser;
1052
840
  public edit(data: ClientUserEditData): Promise<this>;
1053
- public setActivity(options?: ActivitiesOptions): ClientPresence;
1054
- public setActivity(name: string, options?: ActivityOptions): ClientPresence;
841
+ public setActivity(options?: ActivityOptions): ClientPresence;
842
+ public setActivity(name: string, options?: Omit<ActivityOptions, 'name'>): ClientPresence;
1055
843
  public setAFK(afk?: boolean, shardId?: number | number[]): ClientPresence;
1056
844
  public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<this>;
1057
- public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>;
1058
845
  public setPresence(data: PresenceData): ClientPresence;
1059
846
  public setStatus(status: PresenceStatusData, shardId?: number | number[]): ClientPresence;
1060
847
  public setUsername(username: string, password: string): Promise<this>;
1061
- public setHypeSquad(type: HypeSquadType): Promise<void>;
848
+ public purchasedFlags: Readonly<PurchasedFlags>;
849
+ public premiumUsageFlags: Readonly<PremiumUsageFlags>;
850
+ public phone: string | null;
851
+ public nsfwAllowed?: boolean;
852
+ public email: string | null;
853
+ public bio?: string;
854
+ public pronouns?: string;
855
+ public premiumType: number;
856
+ public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>;
857
+ public setHypeSquad(
858
+ hypesquad: 0 | 1 | 2 | 3 | 'LEAVE' | 'HOUSE_BRAVERY' | 'HOUSE_BRILLIANCE' | 'HOUSE_BALANCE',
859
+ ): Promise<void>;
1062
860
  public setAccentColor(color: ColorResolvable): Promise<this>;
1063
- public setDiscriminator(discriminator: string, password: string): Promise<this>;
1064
861
  public setAboutMe(bio: string | null): Promise<this>;
1065
- public setEmail(email: string, password: string): Promise<this>;
1066
- public setPassword(oldPassword: string, newPassword: string): Promise<this>;
1067
- public disableAccount(password: string): Promise<this>;
1068
- public deleteAccount(password: string): Promise<this>;
1069
- public setDeaf(status: boolean): Promise<boolean>;
1070
- public setMute(status: boolean): Promise<boolean>;
1071
862
  public createFriendInvite(): Promise<Invite>;
1072
863
  public getAllFriendInvites(): Promise<Collection<string, Invite>>;
1073
- public revokeAllFriendInvites(): Promise<Collection<string, Invite>>;
1074
- public setSamsungActivity(packageName: string, type?: 'START' | 'UPDATE' | 'STOP'): Promise<this>;
1075
- public getMentions(
1076
- limit?: number,
1077
- mentionRoles?: boolean,
1078
- mentionEveryone?: boolean,
1079
- ): Promise<Collection<Snowflake, Message>>;
1080
- /**
1081
- * Nitro Status
1082
- * `0`: None
1083
- * `1`: Classic
1084
- * `2`: Boost
1085
- * @external https://discord.com/developers/docs/resources/user#user-object-premium-types
1086
- */
1087
- public readonly nitroType: NitroType;
1088
- public readonly phoneNumber: string;
1089
- public readonly nsfwAllowed: boolean;
1090
- public readonly emailAddress: string;
864
+ public revokeAllFriendInvites(): Promise<void>;
865
+ public setSamsungActivity(packageName: string, type: 'START' | 'UPDATE' | 'STOP'): Promise<this>;
1091
866
  public stopRinging(channel: ChannelResolvable): Promise<void>;
1092
- public setGlobalName(globalName?: string): Promise<this>;
1093
- public setPronouns(pronouns?: string): Promise<this>;
867
+ public fetchBurstCredit(): Promise<number>;
868
+ public setPronouns(pronouns?: string | null): Promise<this>;
869
+ public setGlobalName(globalName?: string | null): Promise<this>;
1094
870
  }
1095
871
 
1096
- type NitroType = 'NONE' | 'NITRO_CLASSIC' | 'NITRO_BOOST' | 'NITRO_BASIC';
1097
-
1098
872
  export class Options extends null {
1099
873
  private constructor();
1100
874
  public static defaultMakeCacheSettings: CacheWithLimitsOptions;
@@ -1118,6 +892,12 @@ export interface CollectorEventTypes<K, V, F extends unknown[] = []> {
1118
892
  end: [collected: Collection<K, V>, reason: string];
1119
893
  }
1120
894
 
895
+ export type ChannelFlagsString = 'PINNED' | 'REQUIRE_TAG';
896
+ export class ChannelFlags extends BitField<ChannelFlagsString> {
897
+ public static FLAGS: Record<ChannelFlagsString, number>;
898
+ public static resolve(bit?: BitFieldResolvable<ChannelFlagsString, number>): number;
899
+ }
900
+
1121
901
  export abstract class Collector<K, V, F extends unknown[] = []> extends EventEmitter {
1122
902
  protected constructor(client: Client, options?: CollectorOptions<[V, ...F]>);
1123
903
  private _timeout: NodeJS.Timeout | null;
@@ -1303,27 +1083,28 @@ export class DataResolver extends null {
1303
1083
  public static resolveGuildTemplateCode(data: GuildTemplateResolvable): string;
1304
1084
  }
1305
1085
 
1306
- export interface Captcha {
1307
- captcha_key: string[];
1308
- captcha_service: string;
1309
- captcha_sitekey: string;
1310
- captcha_rqdata?: string;
1311
- captcha_rqtoken?: string;
1312
- }
1313
1086
  export class DiscordAPIError extends Error {
1314
1087
  private constructor(error: unknown, status: number, request: unknown);
1315
1088
  private static flattenErrors(obj: unknown, key: string): string[];
1316
- public captcha?: Captcha;
1089
+
1317
1090
  public code: number;
1318
1091
  public method: string;
1319
1092
  public path: string;
1320
1093
  public httpStatus: number;
1321
1094
  public requestData: HTTPErrorData;
1322
1095
  public retries: number;
1096
+ public captcha: Captcha | null;
1097
+ }
1098
+
1099
+ export interface Captcha {
1100
+ captcha_key: string[];
1101
+ captcha_sitekey: string;
1102
+ captcha_service: 'hcaptcha';
1103
+ captcha_rqdata?: string;
1104
+ captcha_rqtoken?: string;
1323
1105
  }
1324
1106
 
1325
1107
  export class DMChannel extends TextBasedChannelMixin(Channel, [
1326
- 'bulkDelete',
1327
1108
  'fetchWebhooks',
1328
1109
  'createWebhook',
1329
1110
  'setRateLimitPerUser',
@@ -1333,19 +1114,16 @@ export class DMChannel extends TextBasedChannelMixin(Channel, [
1333
1114
  public recipient: User;
1334
1115
  public type: 'DM';
1335
1116
  public flags: Readonly<ChannelFlags>;
1117
+ public messageRequest?: boolean;
1118
+ public messageRequestTimestamp?: number;
1336
1119
  public fetch(force?: boolean): Promise<this>;
1120
+ public acceptMessageRequest(): Promise<this>;
1121
+ public cancelMessageRequest(): Promise<this>;
1122
+ public sync(): void;
1123
+ public ring(): Promise<void>;
1337
1124
  public readonly voiceAdapterCreator: InternalDiscordGatewayAdapterCreator;
1338
- public call(options?: CallOptions): Promise<VoiceConnection>;
1339
- public sync(): undefined;
1340
1125
  public readonly shard: WebSocketShard;
1341
1126
  public readonly voiceUsers: Collection<Snowflake, User>;
1342
- public readonly voiceConnection?: VoiceConnection;
1343
- }
1344
-
1345
- export interface CallOptions {
1346
- selfDeaf?: boolean;
1347
- selfMute?: boolean;
1348
- ring?: boolean;
1349
1127
  }
1350
1128
 
1351
1129
  export class Emoji extends Base {
@@ -1369,17 +1147,17 @@ export class Guild extends AnonymousGuild {
1369
1147
  private _sortedChannels(channel: NonThreadGuildBasedChannel): Collection<Snowflake, NonThreadGuildBasedChannel>;
1370
1148
 
1371
1149
  public readonly afkChannel: VoiceChannel | null;
1372
- public topEmojis(): Promise<Collection<number, Emoji>>;
1373
1150
  public afkChannelId: Snowflake | null;
1374
1151
  public afkTimeout: number;
1375
1152
  public applicationId: Snowflake | null;
1153
+ public maxVideoChannelUsers: number | null;
1154
+ public maxStageVideoChannelUsers: number | null;
1376
1155
  public approximateMemberCount: number | null;
1377
1156
  public approximatePresenceCount: number | null;
1378
1157
  public autoModerationRules: AutoModerationRuleManager;
1379
1158
  public available: boolean;
1380
1159
  public bans: GuildBanManager;
1381
1160
  public channels: GuildChannelManager;
1382
- // public commands: GuildApplicationCommandManager;
1383
1161
  public defaultMessageNotifications: DefaultMessageNotificationLevel | number;
1384
1162
  /** @deprecated This will be removed in the next major version, see https://github.com/discordjs/discord.js/issues/7091 */
1385
1163
  public deleted: boolean;
@@ -1392,8 +1170,6 @@ export class Guild extends AnonymousGuild {
1392
1170
  public large: boolean;
1393
1171
  public maximumMembers: number | null;
1394
1172
  public maximumPresences: number | null;
1395
- public maxStageVideoChannelUsers: number | null;
1396
- public maxVideoChannelUsers: number | null;
1397
1173
  /** @deprecated Use {@link GuildMemberManager.me} instead. */
1398
1174
  public readonly me: GuildMember | null;
1399
1175
  public memberCount: number;
@@ -1401,11 +1177,9 @@ export class Guild extends AnonymousGuild {
1401
1177
  public mfaLevel: MFALevel;
1402
1178
  public ownerId: Snowflake;
1403
1179
  public preferredLocale: string;
1404
- public premiumSubscriptionCount: number | null;
1405
1180
  public premiumProgressBarEnabled: boolean;
1406
1181
  public premiumTier: PremiumTier;
1407
1182
  public presences: PresenceManager;
1408
- public readonly disableDM: boolean;
1409
1183
  public readonly publicUpdatesChannel: TextChannel | null;
1410
1184
  public publicUpdatesChannelId: Snowflake | null;
1411
1185
  public roles: RoleManager;
@@ -1414,6 +1188,7 @@ export class Guild extends AnonymousGuild {
1414
1188
  public readonly safetyAlertsChannel: TextChannel | null;
1415
1189
  public safetyAlertsChannelId: Snowflake | null;
1416
1190
  public scheduledEvents: GuildScheduledEventManager;
1191
+ public settings: GuildSettingManager;
1417
1192
  public readonly shard: WebSocketShard;
1418
1193
  public shardId: number;
1419
1194
  public stageInstances: StageInstanceManager;
@@ -1429,8 +1204,7 @@ export class Guild extends AnonymousGuild {
1429
1204
  public widgetEnabled: boolean | null;
1430
1205
  public readonly maximumBitrate: number;
1431
1206
  public createTemplate(name: string, description?: string): Promise<GuildTemplate>;
1432
- public delete(mfaCode?: string): Promise<Guild>;
1433
- public read(): Promise<undefined>;
1207
+ public delete(): Promise<Guild>;
1434
1208
  public discoverySplashURL(options?: StaticImageURLOptions): string | null;
1435
1209
  public edit(data: GuildEditData, reason?: string): Promise<Guild>;
1436
1210
  public editWelcomeScreen(data: WelcomeScreenEditData): Promise<WelcomeScreen>;
@@ -1438,7 +1212,6 @@ export class Guild extends AnonymousGuild {
1438
1212
  public fetchAuditLogs<T extends GuildAuditLogsResolvable = 'ALL'>(
1439
1213
  options?: GuildAuditLogsFetchOptions<T>,
1440
1214
  ): Promise<GuildAuditLogs<T>>;
1441
- public mute(mute: boolean, time: number | null): boolean;
1442
1215
  public fetchIntegrations(): Promise<Collection<Snowflake | string, Integration>>;
1443
1216
  public fetchOwner(options?: BaseFetchOptions): Promise<GuildMember>;
1444
1217
  public fetchPreview(): Promise<GuildPreview>;
@@ -1448,8 +1221,8 @@ export class Guild extends AnonymousGuild {
1448
1221
  public fetchWelcomeScreen(): Promise<WelcomeScreen>;
1449
1222
  public fetchWidget(): Promise<Widget>;
1450
1223
  public fetchWidgetSettings(): Promise<GuildWidgetSettings>;
1451
- public disableInvites(disabled?: boolean): Promise<Guild>;
1452
1224
  public leave(): Promise<Guild>;
1225
+ public disableInvites(disabled?: boolean): Promise<Guild>;
1453
1226
  public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise<Guild>;
1454
1227
  public setAFKTimeout(afkTimeout: number, reason?: string): Promise<Guild>;
1455
1228
  public setBanner(banner: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
@@ -1470,8 +1243,7 @@ export class Guild extends AnonymousGuild {
1470
1243
  public setIcon(icon: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
1471
1244
  public setName(name: string, reason?: string): Promise<Guild>;
1472
1245
  public setOwner(owner: GuildMemberResolvable, reason?: string): Promise<Guild>;
1473
- public setPosition(position: number, type: 'FOLDER' | 'HOME', folderID?: number): Promise<Guild>;
1474
- public setPreferredLocale(preferredLocale: string, reason?: string): Promise<Guild>;
1246
+ public setPreferredLocale(preferredLocale: string | null, reason?: string): Promise<Guild>;
1475
1247
  public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
1476
1248
  /** @deprecated Use {@link RoleManager.setPositions} instead */
1477
1249
  public setRolePositions(rolePositions: readonly RolePosition[]): Promise<Guild>;
@@ -1482,15 +1254,17 @@ export class Guild extends AnonymousGuild {
1482
1254
  public setSystemChannelFlags(systemChannelFlags: SystemChannelFlagsResolvable, reason?: string): Promise<Guild>;
1483
1255
  public setVerificationLevel(verificationLevel: VerificationLevel | number | null, reason?: string): Promise<Guild>;
1484
1256
  public setPremiumProgressBarEnabled(enabled?: boolean, reason?: string): Promise<Guild>;
1257
+ public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>;
1258
+ public toJSON(): unknown;
1259
+ public markAsRead(): Promise<void>;
1485
1260
  public setCommunity(
1486
1261
  stats: boolean,
1487
- publicUpdatesChannel: TextChannelResolvable,
1488
- rulesChannel: TextChannelResolvable,
1262
+ publicUpdatesChannel?: GuildTextChannelResolvable,
1263
+ rulesChannel?: GuildTextChannelResolvable,
1489
1264
  reason?: string,
1490
- ): Promise<Guild>;
1491
- public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>;
1492
- public setVanityCode(code?: string): Promise<Vanity>;
1493
- public toJSON(): unknown;
1265
+ ): Promise<this>;
1266
+ public topEmojis(): Promise<Collection<number, GuildEmoji>>;
1267
+ public setVanityCode(code?: string): Promise<this>;
1494
1268
  }
1495
1269
 
1496
1270
  export class GuildAuditLogs<T extends GuildAuditLogsResolvable = 'ALL'> {
@@ -1541,8 +1315,6 @@ export class GuildAuditLogsEntry<
1541
1315
  : Role | GuildEmoji | { id: Snowflake } | null;
1542
1316
  public targetType: TTargetType;
1543
1317
  public toJSON(): unknown;
1544
- public addIntegration(applicationId: Snowflake): Promise<boolean>;
1545
- public addBot(bot: UserResolvable | Snowflake, permissions?: PermissionResolvable): Promise<boolean>;
1546
1318
  }
1547
1319
 
1548
1320
  export class GuildBan extends Base {
@@ -1558,7 +1330,6 @@ export abstract class GuildChannel extends Channel {
1558
1330
  public constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean);
1559
1331
  private memberPermissions(member: GuildMember, checkAdmin: boolean): Readonly<Permissions>;
1560
1332
  private rolePermissions(role: Role, checkAdmin: boolean): Readonly<Permissions>;
1561
-
1562
1333
  public readonly createdAt: Date;
1563
1334
  public readonly createdTimestamp: number;
1564
1335
  public readonly calculatedPosition: number;
@@ -1609,14 +1380,6 @@ export class GuildEmoji extends BaseGuildEmoji {
1609
1380
  public setName(name: string, reason?: string): Promise<GuildEmoji>;
1610
1381
  }
1611
1382
 
1612
- export interface UserBadge {
1613
- name: string;
1614
- description: string;
1615
- icon: string;
1616
- link?: string;
1617
- iconURL(): string;
1618
- }
1619
-
1620
1383
  export class GuildMember extends PartialTextBasedChannel(Base) {
1621
1384
  private constructor(client: Client, data: RawGuildMemberData, guild: Guild);
1622
1385
  private _roles: Snowflake[];
@@ -1647,9 +1410,6 @@ export class GuildMember extends PartialTextBasedChannel(Base) {
1647
1410
  public readonly roles: GuildMemberRoleManager;
1648
1411
  public user: User;
1649
1412
  public readonly voice: VoiceState;
1650
- public themeColors?: [number, number];
1651
- public readonly hexThemeColor: [string, string] | null;
1652
- public badges: UserBadge[] | null;
1653
1413
  public avatarURL(options?: ImageURLOptions): string | null;
1654
1414
  public ban(options?: BanOptions): Promise<GuildMember>;
1655
1415
  public disableCommunicationUntil(timeout: DateResolvable | null, reason?: string): Promise<GuildMember>;
@@ -1667,14 +1427,12 @@ export class GuildMember extends PartialTextBasedChannel(Base) {
1667
1427
  public permissionsIn(channel: GuildChannelResolvable): Readonly<Permissions>;
1668
1428
  public setNickname(nickname: string | null, reason?: string): Promise<GuildMember>;
1669
1429
  public setFlags(flags: GuildMemberFlagsResolvable): Promise<GuildMember>;
1670
- public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
1671
- public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
1672
- public setAboutMe(bio: string | null): Promise<GuildMember>;
1673
- public getProfile(): Promise<User>;
1674
1430
  public toJSON(): unknown;
1675
1431
  public toString(): MemberMention;
1676
1432
  public valueOf(): string;
1677
- public setThemeColors(primary?: ColorResolvable, accent?: ColorResolvable): GuildMember;
1433
+ public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
1434
+ public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
1435
+ public setAboutMe(bio: string | null): Promise<GuildMember>;
1678
1436
  }
1679
1437
 
1680
1438
  export class GuildMemberFlags extends BitField<GuildMemberFlagsString> {
@@ -1728,6 +1486,7 @@ export class GuildScheduledEvent<S extends GuildScheduledEventStatus = GuildSche
1728
1486
  public readonly scheduledEndAt: Date | null;
1729
1487
  public readonly channel: VoiceChannel | StageChannel | null;
1730
1488
  public readonly guild: Guild | null;
1489
+ public readonly url: string;
1731
1490
  public readonly image: string | null;
1732
1491
  public coverImageURL(options?: StaticImageURLOptions): string | null;
1733
1492
  public createInviteURL(options?: CreateGuildScheduledEventInviteURLOptions): Promise<string>;
@@ -1838,6 +1597,7 @@ export class IntegrationApplication extends Application {
1838
1597
  export class Intents extends BitField<IntentsString> {
1839
1598
  public static FLAGS: Record<IntentsString, number>;
1840
1599
  public static resolve(bit?: BitFieldResolvable<IntentsString, number>): number;
1600
+ public static ALL: number;
1841
1601
  }
1842
1602
 
1843
1603
  export type CacheType = 'cached' | 'raw' | undefined;
@@ -1895,15 +1655,7 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
1895
1655
  public isMessageContextMenu(): this is MessageContextMenuInteraction<Cached>;
1896
1656
  public isMessageComponent(): this is MessageComponentInteraction<Cached>;
1897
1657
  public isModalSubmit(): this is ModalSubmitInteraction<Cached>;
1898
- public isAnySelectMenu(): this is SelectMenuInteraction<Cached>;
1899
- public report(breadcrumbs: number[], elements?: object): Promise<{ report_id: Snowflake }>;
1900
- /** @deprecated Use {@link Interaction#isStringSelect()} instead */
1901
- public isSelectMenu(): this is StringSelectInteraction<Cached>;
1902
- public isStringSelect(): this is StringSelectInteraction<Cached>;
1903
- public isUserSelect(): this is UserSelectInteraction<Cached>;
1904
- public isMentionableSelect(): this is MentionableSelectInteraction<Cached>;
1905
- public isRoleSelect(): this is RoleSelectInteraction<Cached>;
1906
- public isChannelSelect(): this is ChannelSelectInteraction<Cached>;
1658
+ public isSelectMenu(): this is SelectMenuInteraction<Cached>;
1907
1659
  public isRepliable(): this is this & InteractionResponseFields<Cached>;
1908
1660
  }
1909
1661
 
@@ -1943,8 +1695,8 @@ export class InteractionWebhook extends PartialWebhookMixin() {
1943
1695
 
1944
1696
  export class Invite extends Base {
1945
1697
  private constructor(client: Client, data: RawInviteData);
1946
- public channel: NonThreadGuildBasedChannel | PartialGroupDMChannel;
1947
- public channelId: Snowflake;
1698
+ public channel?: NonThreadGuildBasedChannel | GroupDMChannel;
1699
+ public channelId?: Snowflake;
1948
1700
  public code: string;
1949
1701
  public readonly deletable: boolean;
1950
1702
  public readonly createdAt: Date | null;
@@ -1958,6 +1710,7 @@ export class Invite extends Base {
1958
1710
  public maxUses: number | null;
1959
1711
  public memberCount: number;
1960
1712
  public presenceCount: number;
1713
+ public type: InviteType | null;
1961
1714
  public targetApplication: IntegrationApplication | null;
1962
1715
  public targetUser: User | null;
1963
1716
  public targetType: InviteTargetType | null;
@@ -1967,10 +1720,10 @@ export class Invite extends Base {
1967
1720
  public delete(reason?: string): Promise<Invite>;
1968
1721
  public toJSON(): unknown;
1969
1722
  public toString(): string;
1970
- public acceptInvite(autoVerify?: boolean): Promise<Guild>;
1971
1723
  public static INVITES_PATTERN: RegExp;
1972
1724
  public stageInstance: InviteStageInstance | null;
1973
1725
  public guildScheduledEvent: GuildScheduledEvent | null;
1726
+ public flags: Readonly<InviteFlags>;
1974
1727
  }
1975
1728
 
1976
1729
  export class InviteStageInstance extends Base {
@@ -2003,32 +1756,30 @@ export class LimitedCollection<K, V> extends Collection<K, V> {
2003
1756
  public static filterByLifetime<K, V>(options?: LifetimeFilterOptions<K, V>): SweepFilter<K, V>;
2004
1757
  }
2005
1758
 
2006
- export type MessageCollectorOptionsParams<T extends MessageComponentTypeResolvable, Cached extends boolean = boolean> =
2007
- | {
2008
- componentType?: T;
2009
- } & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
1759
+ export type MessageCollectorOptionsParams<
1760
+ T extends MessageComponentTypeResolvable,
1761
+ Cached extends boolean = boolean,
1762
+ > = {
1763
+ componentType?: T;
1764
+ } & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
2010
1765
 
2011
1766
  export type MessageChannelCollectorOptionsParams<
2012
1767
  T extends MessageComponentTypeResolvable,
2013
1768
  Cached extends boolean = boolean,
2014
- > =
2015
- | {
2016
- componentType?: T;
2017
- } & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
1769
+ > = {
1770
+ componentType?: T;
1771
+ } & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
2018
1772
 
2019
1773
  export type AwaitMessageCollectorOptionsParams<
2020
1774
  T extends MessageComponentTypeResolvable,
2021
1775
  Cached extends boolean = boolean,
2022
- > =
2023
- | { componentType?: T } & Pick<
2024
- InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>,
2025
- keyof AwaitMessageComponentOptions<any>
2026
- >;
1776
+ > = { componentType?: T } & Pick<
1777
+ InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>,
1778
+ keyof AwaitMessageComponentOptions<any>
1779
+ >;
2027
1780
 
2028
1781
  export interface StringMappedInteractionTypes<Cached extends CacheType = CacheType> {
2029
1782
  BUTTON: ButtonInteraction<Cached>;
2030
- /** @deprecated */
2031
- SELECT_MENU: SelectMenuInteraction<Cached>;
2032
1783
  STRING_SELECT: SelectMenuInteraction<Cached>;
2033
1784
  USER_SELECT: SelectMenuInteraction<Cached>;
2034
1785
  ROLE_SELECT: SelectMenuInteraction<Cached>;
@@ -2043,8 +1794,6 @@ export type MappedInteractionTypes<Cached extends boolean = boolean> = EnumValue
2043
1794
  typeof MessageComponentTypes,
2044
1795
  {
2045
1796
  BUTTON: ButtonInteraction<WrapBooleanCache<Cached>>;
2046
- /** @deprecated */
2047
- SELECT_MENU: StringSelectInteraction<WrapBooleanCache<Cached>>;
2048
1797
  STRING_SELECT: StringSelectInteraction<WrapBooleanCache<Cached>>;
2049
1798
  USER_SELECT: UserSelectInteraction<WrapBooleanCache<Cached>>;
2050
1799
  ROLE_SELECT: RoleSelectInteraction<WrapBooleanCache<Cached>>;
@@ -2064,7 +1813,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
2064
1813
  public applicationId: Snowflake | null;
2065
1814
  public attachments: Collection<Snowflake, MessageAttachment>;
2066
1815
  public author: User;
2067
- public readonly bulkDeletable: boolean;
1816
+ public get bulkDeletable(): boolean;
2068
1817
  public readonly channel: If<Cached, GuildTextBasedChannel, TextBasedChannel>;
2069
1818
  public channelId: Snowflake;
2070
1819
  public readonly cleanContent: string;
@@ -2080,7 +1829,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
2080
1829
  public readonly editedAt: Date | null;
2081
1830
  public editedTimestamp: number | null;
2082
1831
  public embeds: MessageEmbed[];
2083
- public groupActivityApplication: ClientApplication | null;
1832
+ public groupActivityApplication: Application | null;
2084
1833
  public guildId: If<Cached, Snowflake>;
2085
1834
  public readonly guild: If<Cached, Guild>;
2086
1835
  public readonly hasThread: boolean;
@@ -2100,17 +1849,12 @@ export class Message<Cached extends boolean = boolean> extends Base {
2100
1849
  public type: MessageType;
2101
1850
  public readonly url: string;
2102
1851
  public webhookId: Snowflake | null;
1852
+ public poll: MessagePoll | null;
2103
1853
  public flags: Readonly<MessageFlags>;
2104
1854
  public reference: MessageReference | null;
2105
1855
  public position: number | null;
2106
- public awaitMessageComponent<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
2107
- options?: AwaitMessageCollectorOptionsParams<T, Cached>,
2108
- ): Promise<MappedInteractionTypes<Cached>[T]>;
2109
1856
  public awaitReactions(options?: AwaitReactionsOptions): Promise<Collection<Snowflake | string, MessageReaction>>;
2110
1857
  public createReactionCollector(options?: ReactionCollectorOptions): ReactionCollector;
2111
- public createMessageComponentCollector<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
2112
- options?: MessageCollectorOptionsParams<T, Cached>,
2113
- ): InteractionCollector<MappedInteractionTypes<Cached>[T]>;
2114
1858
  public delete(): Promise<Message>;
2115
1859
  public edit(content: string | MessageEditOptions | MessagePayload): Promise<Message>;
2116
1860
  public equals(message: Message, rawData: unknown): boolean;
@@ -2129,13 +1873,40 @@ export class Message<Cached extends boolean = boolean> extends Base {
2129
1873
  public toString(): string;
2130
1874
  public unpin(reason?: string): Promise<Message>;
2131
1875
  public inGuild(): this is Message<true> & this;
2132
- // Added
2133
- public markUnread(): Promise<boolean>;
2134
- public markRead(): Promise<boolean>;
2135
- public clickButton(button?: MessageButton | MessageButtonLocation | string): Promise<InteractionResponse>;
2136
- public selectMenu(menuID: MessageSelectMenu | Snowflake | number, options: any[]): Promise<InteractionResponse>;
2137
- public selectMenu(options: any[]): Promise<InteractionResponse>;
2138
- public contextMenu(botID: Snowflake, commandName: string): Promise<InteractionResponse>;
1876
+
1877
+ public readonly isMessage: true;
1878
+ public clickButton(button?: { X: number; Y: number } | string): Promise<Message | Modal>;
1879
+ public selectMenu(
1880
+ menu: 0 | 1 | 2 | 3 | 4 | string,
1881
+ vales: (UserResolvable | RoleResolvable | ChannelResolvable | string)[],
1882
+ ): Promise<Message | Modal>;
1883
+ public markUnread(): Promise<void>;
1884
+ public markRead(): Promise<void>;
1885
+ public report(breadcrumbs: number[], elements?: object): Promise<{ report_id: Snowflake }>;
1886
+ public vote(...ids: number[]): Promise<void>;
1887
+ public endPoll(): Promise<RawMessageData>;
1888
+ public getAnswerVoter(
1889
+ answerId: number,
1890
+ afterUserId?: Snowflake,
1891
+ limit?: number,
1892
+ ): Promise<{ users: Partial<RawUserData> }>;
1893
+ }
1894
+
1895
+ export class CallState extends Base {
1896
+ private constructor(client: Client, data: any);
1897
+ public channelId: Snowflake;
1898
+ public region: string;
1899
+ public readonly channel?: DMChannel | GroupDMChannel;
1900
+ public readonly ringing: Collection<Snowflake, User>;
1901
+ public setRTCRegion(): Promise<void>;
1902
+ }
1903
+
1904
+ export interface MessagePollUserVote {
1905
+ user_id: Snowflake;
1906
+ message_id: Snowflake;
1907
+ channel_id: Snowflake;
1908
+ answer_id: number;
1909
+ guild_id?: Snowflake;
2139
1910
  }
2140
1911
 
2141
1912
  export class MessageActionRow<
@@ -2145,6 +1916,7 @@ export class MessageActionRow<
2145
1916
  ? APIActionRowComponent<APIModalActionRowComponent>
2146
1917
  : APIActionRowComponent<APIMessageActionRowComponent>,
2147
1918
  > extends BaseMessageComponent {
1919
+ // tslint:disable-next-line:ban-ts-ignore
2148
1920
  // @ts-ignore (TS:2344, Caused by TypeScript 4.8)
2149
1921
  // Fixed in DiscordJS >= 14.x / DiscordApiTypes >= 0.37.x, ignoring the type error here.
2150
1922
  public constructor(data?: MessageActionRow<T> | MessageActionRowOptions<U> | V);
@@ -2164,6 +1936,7 @@ export class MessageAttachment {
2164
1936
  public description: string | null;
2165
1937
  public duration: number | null;
2166
1938
  public ephemeral: boolean;
1939
+ public flags: Readonly<AttachmentFlags>;
2167
1940
  public height: number | null;
2168
1941
  public id: Snowflake;
2169
1942
  public name: string | null;
@@ -2180,11 +1953,13 @@ export class MessageAttachment {
2180
1953
  public toJSON(): unknown;
2181
1954
  }
2182
1955
 
2183
- export interface InteractionResponseBody {
2184
- id: Snowflake;
2185
- nonce: Snowflake;
1956
+ export class AttachmentFlags extends BitField<AttachmentFlagsString> {
1957
+ public static FLAGS: Record<AttachmentFlagsString, number>;
1958
+ public static resolve(bit?: BitFieldResolvable<AttachmentFlagsString, number>): number;
2186
1959
  }
2187
1960
 
1961
+ export type AttachmentFlagsString = 'IS_REMIX';
1962
+
2188
1963
  export class MessageButton extends BaseMessageComponent {
2189
1964
  public constructor(data?: MessageButton | MessageButtonOptions | APIButtonComponent);
2190
1965
  public customId: string | null;
@@ -2201,7 +1976,6 @@ export class MessageButton extends BaseMessageComponent {
2201
1976
  public setStyle(style: MessageButtonStyleResolvable): this;
2202
1977
  public setURL(url: string): this;
2203
1978
  public toJSON(): APIButtonComponent;
2204
- public click(message: Message): Promise<InteractionResponse>;
2205
1979
  private static resolveStyle(style: MessageButtonStyleResolvable): MessageButtonStyle;
2206
1980
  }
2207
1981
 
@@ -2314,20 +2088,35 @@ export class MessageEmbed {
2314
2088
  public static normalizeFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): Required<EmbedFieldData>[];
2315
2089
  }
2316
2090
 
2317
- export class WebEmbed {
2318
- public constructor(data?: WebEmbedOptions);
2319
- public author: MessageEmbedAuthor | null;
2320
- public baseURL: string | undefined;
2321
- public color: number | null;
2322
- public description: string | null;
2323
- public image: MessageEmbedImage | null;
2324
- public provider: MessageEmbedProvider | null;
2091
+ export interface WebEmbedOptions {
2092
+ title?: string;
2093
+ description?: string;
2094
+ url?: string;
2095
+ timestamp?: Date | number;
2096
+ color?: ColorResolvable;
2097
+ fields?: EmbedFieldData[];
2098
+ author?: Partial<MessageEmbedAuthor> & { icon_url?: string; proxy_icon_url?: string };
2099
+ thumbnail?: Partial<MessageEmbedThumbnail> & { proxy_url?: string };
2100
+ image?: Partial<MessageEmbedImage> & { proxy_url?: string };
2101
+ video?: Partial<MessageEmbedVideo> & { proxy_url?: string };
2102
+ footer?: Partial<MessageEmbedFooter> & { icon_url?: string; proxy_icon_url?: string };
2103
+ imageType?: 'thumbnail' | 'image';
2104
+ redirect?: string;
2105
+ }
2106
+
2107
+ export class WebEmbed {
2108
+ public constructor(data?: WebEmbedOptions);
2109
+ public author: MessageEmbedAuthor | null;
2110
+ public baseURL: string | undefined;
2111
+ public color: number | null;
2112
+ public description: string | null;
2113
+ public image: MessageEmbedImage | null;
2114
+ public provider: MessageEmbedProvider | null;
2325
2115
  public title: string | null;
2326
2116
  public url: string | null;
2327
2117
  public video: MessageEmbedVideo | null;
2328
- public hidden: boolean;
2329
- public shorten: boolean;
2330
2118
  public imageType: 'thumbnail' | 'image';
2119
+ public redirect?: string;
2331
2120
  public setAuthor(options: EmbedAuthorData | null): this;
2332
2121
  public setColor(color: ColorResolvable): this;
2333
2122
  public setDescription(description: string): this;
@@ -2337,7 +2126,33 @@ export class WebEmbed {
2337
2126
  public setTitle(title: string): this;
2338
2127
  public setURL(url: string): this;
2339
2128
  public setProvider(options: MessageEmbedProvider | null): this;
2340
- public toMessage(): Promise<string>;
2129
+ public setRedirect(url: string): this;
2130
+ public toString(): string;
2131
+ public static hiddenEmbed: string;
2132
+ }
2133
+
2134
+ export class BillingManager extends BaseManager {
2135
+ constructor(client: Client);
2136
+ public paymentSources: Collection<Snowflake, object>;
2137
+ public fetchPaymentSources(): Promise<Collection<Snowflake, object>>;
2138
+ public guildBoosts: Collection<Snowflake, GuildBoost>;
2139
+ public fetchGuildBoosts(): Promise<Collection<Snowflake, GuildBoost>>;
2140
+ public currentSubscription: Collection<Snowflake, object>;
2141
+ public fetchCurrentSubscription(): Promise<Collection<Snowflake, object>>;
2142
+ }
2143
+
2144
+ export class GuildBoost extends Base {
2145
+ constructor(client: Client, data: object);
2146
+ public id: Snowflake;
2147
+ public guildId?: Snowflake;
2148
+ public readonly guild: Guild | null;
2149
+ public subscriptionId: Snowflake;
2150
+ public premiumGuildSubscriptionId?: Snowflake;
2151
+ public ended?: boolean;
2152
+ public canceled: boolean;
2153
+ public cooldownEndsAt: Date;
2154
+ public unsubscribe(): Promise<this>;
2155
+ public subscribe(guild: GuildResolvable): Promise<this>;
2341
2156
  }
2342
2157
 
2343
2158
  export class MessageFlags extends BitField<MessageFlagsString> {
@@ -2357,6 +2172,7 @@ export class MessageMentions {
2357
2172
  private readonly _content: string;
2358
2173
  private _members: Collection<Snowflake, GuildMember> | null;
2359
2174
  private _parsedUsers: Collection<Snowflake, User> | null;
2175
+
2360
2176
  public readonly channels: Collection<Snowflake, AnyChannel>;
2361
2177
  public readonly client: Client;
2362
2178
  public everyone: boolean;
@@ -2379,7 +2195,6 @@ export class MessageMentions {
2379
2195
  export class MessagePayload {
2380
2196
  public constructor(target: MessageTarget, options: MessageOptions | WebhookMessageOptions);
2381
2197
  public data: RawMessagePayloadData | null;
2382
- public readonly usingNewAttachmentAPI: boolean;
2383
2198
  public readonly isUser: boolean;
2384
2199
  public readonly isWebhook: boolean;
2385
2200
  public readonly isMessage: boolean;
@@ -2407,14 +2222,14 @@ export class MessageReaction {
2407
2222
  private constructor(client: Client, data: RawMessageReactionData, message: Message);
2408
2223
  private _emoji: GuildEmoji | ReactionEmoji;
2409
2224
 
2410
- public readonly client: Client;
2225
+ public burstColors: string[];
2226
+ public readonly client: Client<true>;
2411
2227
  public count: number;
2412
2228
  public burstCount: number;
2413
- public burstColors: string[];
2229
+ public countDetails: ReactionCountDetailsData;
2414
2230
  public isBurst: boolean;
2415
2231
  public readonly emoji: GuildEmoji | ReactionEmoji;
2416
2232
  public me: boolean;
2417
- public countDetails: ReactionCountDetailsData;
2418
2233
  public message: Message | PartialMessage;
2419
2234
  public readonly partial: false;
2420
2235
  public users: ReactionUserManager;
@@ -2438,23 +2253,19 @@ export class MessageSelectMenu extends BaseMessageComponent {
2438
2253
  public options: MessageSelectOption[];
2439
2254
  public placeholder: string | null;
2440
2255
  public type: SelectMenuComponentType;
2441
- public addChannelTypes(...channelTypes: ChannelTypes[]): this;
2442
2256
  public addOptions(...options: MessageSelectOptionData[] | MessageSelectOptionData[][]): this;
2443
2257
  public setOptions(...options: MessageSelectOptionData[] | MessageSelectOptionData[][]): this;
2444
- public setChannelTypes(...channelTypes: ChannelTypes[]): this;
2445
2258
  public setCustomId(customId: string): this;
2446
2259
  public setDisabled(disabled?: boolean): this;
2447
2260
  public setMaxValues(maxValues: number): this;
2448
2261
  public setMinValues(minValues: number): this;
2449
2262
  public setPlaceholder(placeholder: string): this;
2450
- public setType(type: SelectMenuComponentType | SelectMenuComponentTypes): this;
2451
2263
  public spliceOptions(
2452
2264
  index: number,
2453
2265
  deleteCount: number,
2454
2266
  ...options: MessageSelectOptionData[] | MessageSelectOptionData[][]
2455
2267
  ): this;
2456
2268
  public toJSON(): APISelectMenuComponent;
2457
- public select(message: Message, values?: any[]): Promise<InteractionResponse>;
2458
2269
  }
2459
2270
 
2460
2271
  export class Modal {
@@ -2462,45 +2273,47 @@ export class Modal {
2462
2273
  public components: MessageActionRow<ModalActionRowComponent>[];
2463
2274
  public customId: string | null;
2464
2275
  public title: string | null;
2465
- public application: object | null;
2466
- public client: Client | null;
2467
- public nonce: Snowflake | null;
2468
- public readonly sendFromInteraction: InteractionResponse | null;
2469
- public addComponents(
2470
- ...components: (
2471
- | MessageActionRow<ModalActionRowComponent>
2472
- | (Required<BaseMessageComponentOptions> & MessageActionRowOptions<ModalActionRowComponentResolvable>)
2473
- )[]
2474
- ): this;
2475
- public setComponents(
2476
- ...components: (
2477
- | MessageActionRow<ModalActionRowComponent>
2478
- | (Required<BaseMessageComponentOptions> & MessageActionRowOptions<ModalActionRowComponentResolvable>)
2479
- )[]
2480
- ): this;
2481
- public setCustomId(customId: string): this;
2482
- public spliceComponents(
2483
- index: number,
2484
- deleteCount: number,
2485
- ...components: (
2486
- | MessageActionRow<ModalActionRowComponent>
2487
- | (Required<BaseMessageComponentOptions> & MessageActionRowOptions<ModalActionRowComponentResolvable>)
2488
- )[]
2489
- ): this;
2490
- public setTitle(title: string): this;
2276
+ public readonly isMessage: false;
2277
+ public readonly guildId: Snowflake | null;
2278
+ public channelId: Snowflake;
2279
+ public readonly channel: TextBasedChannel;
2280
+ public readonly guild: Guild | null;
2281
+ public readonly replied: boolean;
2282
+ public reply(): Promise<Message | Modal>;
2491
2283
  public toJSON(): RawModalSubmitInteractionData;
2492
- public reply(data: ModalReplyData): Promise<InteractionResponse>;
2493
2284
  }
2494
2285
 
2495
- export interface ModalReplyData {
2496
- guild?: GuildResolvable;
2497
- channel?: TextChannelResolvable;
2498
- data?: TextInputComponentReplyData[];
2286
+ export interface MessagePollMedia {
2287
+ text?: string;
2288
+ emoji?: RawEmojiData;
2499
2289
  }
2500
2290
 
2501
- export interface TextInputComponentReplyData {
2502
- customId: string;
2503
- value: string;
2291
+ export interface MessagePollResultAnswerCount {
2292
+ answer: MessagePollMedia;
2293
+ count: number;
2294
+ selfVoted: boolean;
2295
+ }
2296
+
2297
+ export interface MessagePollResult {
2298
+ isFinalized: boolean;
2299
+ answerCounts: Collection<number, MessagePollResultAnswerCount>;
2300
+ }
2301
+
2302
+ export class MessagePoll {
2303
+ public constructor(data: MessagePoll | object);
2304
+ public question: MessagePollMedia | null;
2305
+ public answers: Collection<number, MessagePollMedia>;
2306
+ public layoutType: MessagePollLayoutType | null;
2307
+ public allowMultiSelect: boolean;
2308
+ public expiry: Date | null;
2309
+ public results: MessagePollResult | null;
2310
+ public duration: number | null;
2311
+ public toJSON(): object;
2312
+ public setQuestion(text: string): this;
2313
+ public setAnswers(answers: MessagePollMedia[]): this;
2314
+ public addAnswer(answer: MessagePollMedia): this;
2315
+ public setAllowMultiSelect(state: boolean): this;
2316
+ public setDuration(duration: number): this;
2504
2317
  }
2505
2318
 
2506
2319
  export class ModalSubmitFieldsResolver {
@@ -2563,45 +2376,37 @@ export class OAuth2Guild extends BaseGuild {
2563
2376
  public permissions: Readonly<Permissions>;
2564
2377
  }
2565
2378
 
2566
- export class PartialGroupDMChannel extends TextBasedChannelMixin(Channel, [
2567
- 'bulkDelete',
2379
+ export class GroupDMChannel extends TextBasedChannelMixin(Channel, [
2568
2380
  'fetchWebhooks',
2569
2381
  'createWebhook',
2570
2382
  'setRateLimitPerUser',
2571
2383
  'setNSFW',
2572
2384
  ]) {
2573
2385
  private constructor(client: Client, data: RawPartialGroupDMChannelData);
2574
- public type: 'GROUP_DM';
2575
2386
  public name: string | null;
2576
2387
  public icon: string | null;
2388
+ public flags: Readonly<ChannelFlags>;
2389
+ private _recipients: RawUserData[];
2390
+ public type: 'GROUP_DM';
2391
+ public ownerId: Snowflake;
2577
2392
  public readonly recipients: Collection<Snowflake, User>;
2578
- public messages: MessageManager;
2579
- public invites: Collection<string, Invite>;
2580
- public lastMessageId: Snowflake | null;
2581
- public lastPinTimestamp: number | null;
2582
- public owner: User | null;
2583
- public ownerId: Snowflake | null;
2584
- public flags: null;
2585
- public messageRequest: boolean | undefined;
2586
- public messageRequestTimestamp: Date | undefined;
2587
- public acceptMessageRequest(): Promise<this>;
2588
- public cancelMessageRequest(): Promise<this>;
2393
+ public readonly owner: User;
2589
2394
  public iconURL(options?: StaticImageURLOptions): string | null;
2590
- public addMember(user: User): Promise<PartialGroupDMChannel>;
2591
- public removeMember(user: User): Promise<PartialGroupDMChannel>;
2592
- public setName(name: string): Promise<PartialGroupDMChannel>;
2593
- public setIcon(icon: Base64Resolvable | null): Promise<PartialGroupDMChannel>;
2395
+ public leave(slient?: boolean): Promise<this>;
2396
+ public edit(data: GroupDMChannelEditData): Promise<this>;
2397
+ public setIcon(icon: BufferResolvable | Base64Resolvable | null): Promise<this>;
2398
+ public setName(name: string): Promise<this>;
2399
+ public setOwner(owner: UserResolvable): Promise<this>;
2400
+ public addUser(user: UserResolvable): Promise<this>;
2401
+ public removeUser(user: UserResolvable): Promise<this>;
2594
2402
  public getInvite(): Promise<Invite>;
2595
- public fetchInvite(force: boolean): Promise<Invite>;
2596
- public removeInvite(invite: Invite): Promise<PartialGroupDMChannel>;
2597
- public delete(slient?: boolean): Promise<this>;
2598
- public setOwner(user: UserResolvable): Promise<PartialGroupDMChannel>;
2403
+ public fetchAllInvite(): Promise<Collection<string, Invite>>;
2404
+ public deleteInvite(invite: InviteResolvable): Promise<this>;
2405
+ public sync(): void;
2406
+ public ring(recipients?: UserResolvable[]): Promise<void>;
2599
2407
  public readonly voiceAdapterCreator: InternalDiscordGatewayAdapterCreator;
2600
- public call(options?: CallOptions): Promise<VoiceConnection>;
2601
- public sync(): undefined;
2602
2408
  public readonly shard: WebSocketShard;
2603
2409
  public readonly voiceUsers: Collection<Snowflake, User>;
2604
- public readonly voiceConnection?: VoiceConnection;
2605
2410
  }
2606
2411
 
2607
2412
  export class PermissionOverwrites extends Base {
@@ -2637,8 +2442,9 @@ export class Permissions extends BitField<PermissionString, bigint> {
2637
2442
 
2638
2443
  export class Presence extends Base {
2639
2444
  protected constructor(client: Client, data?: RawPresenceData);
2640
- public activities: Activity[];
2445
+ public activities: (Activity | CustomStatus | RichPresence | SpotifyRPC)[];
2641
2446
  public clientStatus: ClientPresenceStatusData | null;
2447
+ public lastModified: number | null;
2642
2448
  public guild: Guild | null;
2643
2449
  public readonly member: GuildMember | null;
2644
2450
  public status: PresenceStatus;
@@ -2692,6 +2498,12 @@ export class RichPresenceAssets {
2692
2498
  public smallText: string | null;
2693
2499
  public largeImageURL(options?: StaticImageURLOptions): string | null;
2694
2500
  public smallImageURL(options?: StaticImageURLOptions): string | null;
2501
+ public static parseImage(image: string): string | null;
2502
+ public toJSON(): unknown;
2503
+ public setLargeImage(image?: string): this;
2504
+ public setLargeText(text?: string): this;
2505
+ public setSmallImage(image?: string): this;
2506
+ public setSmallText(text?: string): this;
2695
2507
  }
2696
2508
 
2697
2509
  export class Role extends Base {
@@ -2702,6 +2514,7 @@ export class Role extends Base {
2702
2514
  /** @deprecated This will be removed in the next major version, see https://github.com/discordjs/discord.js/issues/7091 */
2703
2515
  public deleted: boolean;
2704
2516
  public readonly editable: boolean;
2517
+ public flags: Readonly<RoleFlags>;
2705
2518
  public guild: Guild;
2706
2519
  public readonly hexColor: HexColorString;
2707
2520
  public hoist: boolean;
@@ -2737,6 +2550,13 @@ export class Role extends Base {
2737
2550
  public static comparePositions(role1: Role, role2: Role): number;
2738
2551
  }
2739
2552
 
2553
+ export class RoleFlags extends BitField<RoleFlagsString> {
2554
+ public static FLAGS: Record<RoleFlagsString, number>;
2555
+ public static resolve(bit?: BitFieldResolvable<RoleFlagsString, number>): number;
2556
+ }
2557
+
2558
+ export type RoleFlagsString = 'IN_PROMPT';
2559
+
2740
2560
  export class BaseSelectMenuInteraction<
2741
2561
  Cached extends CacheType = CacheType,
2742
2562
  > extends MessageComponentInteraction<Cached> {
@@ -2829,6 +2649,7 @@ export interface ShardEventTypes {
2829
2649
  error: [error: Error];
2830
2650
  message: [message: any];
2831
2651
  }
2652
+
2832
2653
  export class Shard extends EventEmitter {
2833
2654
  private constructor(manager: ShardingManager, id: number);
2834
2655
  private _evals: Map<string, Promise<unknown>>;
@@ -2932,6 +2753,11 @@ export class ShardingManager extends EventEmitter {
2932
2753
  public once(event: 'shardCreate', listener: (shard: Shard) => Awaitable<void>): this;
2933
2754
  }
2934
2755
 
2756
+ export interface FetchRecommendedShardsOptions {
2757
+ guildsPerShard?: number;
2758
+ multipleOf?: number;
2759
+ }
2760
+
2935
2761
  export class SnowflakeUtil extends null {
2936
2762
  private constructor();
2937
2763
  public static deconstruct(snowflake: Snowflake): DeconstructedSnowflake;
@@ -3107,9 +2933,6 @@ export class Team extends Base {
3107
2933
  public readonly createdTimestamp: number;
3108
2934
 
3109
2935
  public iconURL(options?: StaticImageURLOptions): string | null;
3110
- public inviteMemeber(user: User, MFACode: number): Promise<TeamMember>;
3111
- public removeMemeber(userID: Snowflake): boolean;
3112
- public delete(MFACode: string): Promise<boolean>;
3113
2936
  public toJSON(): unknown;
3114
2937
  public toString(): string;
3115
2938
  }
@@ -3131,6 +2954,58 @@ export class TextChannel extends BaseGuildTextChannel {
3131
2954
  public type: 'GUILD_TEXT';
3132
2955
  }
3133
2956
 
2957
+ export interface GuildForumTagEmoji {
2958
+ id: Snowflake | null;
2959
+ name: string | null;
2960
+ }
2961
+
2962
+ export interface GuildForumTag {
2963
+ id: Snowflake;
2964
+ name: string;
2965
+ moderated: boolean;
2966
+ emoji: GuildForumTagEmoji | null;
2967
+ }
2968
+
2969
+ export type GuildForumTagData = Partial<GuildForumTag> & { name: string };
2970
+
2971
+ export interface DefaultReactionEmoji {
2972
+ id: Snowflake | null;
2973
+ name: string | null;
2974
+ }
2975
+
2976
+ export class ForumChannel extends TextBasedChannelMixin(GuildChannel, [
2977
+ 'send',
2978
+ 'lastMessage',
2979
+ 'lastPinAt',
2980
+ 'sendTyping',
2981
+ 'createMessageCollector',
2982
+ 'awaitMessages',
2983
+ ]) {
2984
+ public type: 'GUILD_FORUM';
2985
+ public threads: GuildForumThreadManager;
2986
+ public availableTags: GuildForumTag[];
2987
+ public defaultReactionEmoji: DefaultReactionEmoji | null;
2988
+ public defaultThreadRateLimitPerUser: number | null;
2989
+ public rateLimitPerUser: number | null;
2990
+ public defaultAutoArchiveDuration: ThreadAutoArchiveDuration | null;
2991
+ public nsfw: boolean;
2992
+ public topic: string | null;
2993
+ public defaultSortOrder: SortOrderType | null;
2994
+ public defaultForumLayout: ForumLayoutType;
2995
+ public setAvailableTags(tags: GuildForumTagData[], reason?: string): Promise<this>;
2996
+ public setDefaultReactionEmoji(emojiId: DefaultReactionEmoji | null, reason?: string): Promise<this>;
2997
+ public setDefaultThreadRateLimitPerUser(rateLimit: number, reason?: string): Promise<this>;
2998
+ public createInvite(options?: CreateInviteOptions): Promise<Invite>;
2999
+ public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
3000
+ public setDefaultAutoArchiveDuration(
3001
+ defaultAutoArchiveDuration: ThreadAutoArchiveDuration,
3002
+ reason?: string,
3003
+ ): Promise<this>;
3004
+ public setTopic(topic: string | null, reason?: string): Promise<this>;
3005
+ public setDefaultSortOrder(defaultSortOrder: SortOrderType | null, reason?: string): Promise<this>;
3006
+ public setDefaultForumLayout(defaultForumLayout: ForumLayoutType, reason?: string): Promise<this>;
3007
+ }
3008
+
3134
3009
  export class TextInputComponent extends BaseMessageComponent {
3135
3010
  public constructor(data?: TextInputComponent | TextInputComponentOptions);
3136
3011
  public customId: string | null;
@@ -3141,13 +3016,6 @@ export class TextInputComponent extends BaseMessageComponent {
3141
3016
  public placeholder: string | null;
3142
3017
  public style: TextInputStyle;
3143
3018
  public value: string | null;
3144
- public setCustomId(customId: string): this;
3145
- public setLabel(label: string): this;
3146
- public setRequired(required?: boolean): this;
3147
- public setMaxLength(maxLength: number): this;
3148
- public setMinLength(minLength: number): this;
3149
- public setPlaceholder(placeholder: string): this;
3150
- public setStyle(style: TextInputStyleResolvable): this;
3151
3019
  public setValue(value: string): this;
3152
3020
  public toJSON(): RawTextInputComponentData;
3153
3021
  public static resolveStyle(style: TextInputStyleResolvable): TextInputStyle;
@@ -3156,7 +3024,6 @@ export class TextInputComponent extends BaseMessageComponent {
3156
3024
  export class ThreadChannel extends TextBasedChannelMixin(Channel, ['fetchWebhooks', 'createWebhook', 'setNSFW']) {
3157
3025
  private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client);
3158
3026
  public archived: boolean | null;
3159
- public readonly firstMessage: Message | null;
3160
3027
  public readonly archivedAt: Date | null;
3161
3028
  public archiveTimestamp: number | null;
3162
3029
  public readonly createdAt: Date | null;
@@ -3249,18 +3116,25 @@ export class Typing extends Base {
3249
3116
  };
3250
3117
  }
3251
3118
 
3119
+ export interface UserClan {
3120
+ identityGuildId?: Snowflake;
3121
+ identityEnabled?: boolean;
3122
+ tag?: string;
3123
+ badge?: string;
3124
+ }
3125
+
3252
3126
  export class User extends PartialTextBasedChannel(Base) {
3253
3127
  protected constructor(client: Client, data: RawUserData);
3254
3128
  private _equals(user: APIUser): boolean;
3255
- public application: ClientApplication;
3129
+
3256
3130
  public accentColor: number | null | undefined;
3257
3131
  public avatar: string | null;
3258
3132
  public avatarDecoration: string | null;
3133
+ public avatarDecorationSKUId: Snowflake | null;
3259
3134
  public banner: string | null | undefined;
3135
+ public bannerColor: string | null | undefined;
3260
3136
  public bot: boolean;
3261
- public pronouns: string | null;
3262
3137
  public readonly createdAt: Date;
3263
- public readonly relationships: RelationshipTypes;
3264
3138
  public readonly createdTimestamp: number;
3265
3139
  public discriminator: string;
3266
3140
  public readonly displayName: string;
@@ -3268,43 +3142,33 @@ export class User extends PartialTextBasedChannel(Base) {
3268
3142
  public readonly dmChannel: DMChannel | null;
3269
3143
  public flags: Readonly<UserFlags> | null;
3270
3144
  public globalName: string | null;
3271
- public botInGuildsCount: number | null | undefined;
3272
3145
  public readonly hexAccentColor: HexColorString | null | undefined;
3273
3146
  public id: Snowflake;
3274
3147
  public readonly partial: false;
3275
3148
  public system: boolean;
3276
3149
  public readonly tag: string;
3277
3150
  public username: string;
3278
- public readonly note: string | null;
3279
- public readonly nickname: string | null;
3280
- public connectedAccounts: object[];
3281
- public premiumSince: Date;
3282
- public premiumGuildSince: Date;
3283
- public bio: string | null;
3284
- public readonly mutualGuilds: Collection<Snowflake, object>;
3285
- public readonly mutualFriends: Promise<Collection<Snowflake, User>>;
3286
- public readonly voice: VoiceState;
3151
+ public readonly note: string | undefined;
3152
+ public readonly voice?: VoiceState;
3153
+ public readonly relationship: RelationshipType;
3154
+ public readonly friendNickname: string | null | undefined;
3155
+ public clan: UserClan | null;
3287
3156
  public avatarURL(options?: ImageURLOptions): string | null;
3288
3157
  public avatarDecorationURL(options?: StaticImageURLOptions): string | null;
3289
3158
  public bannerURL(options?: ImageURLOptions): string | null;
3159
+ public clanBadgeURL(): string | null;
3290
3160
  public createDM(force?: boolean): Promise<DMChannel>;
3291
3161
  public deleteDM(): Promise<DMChannel>;
3292
3162
  public displayAvatarURL(options?: ImageURLOptions): string;
3293
3163
  public equals(user: User): boolean;
3294
3164
  public fetch(force?: boolean): Promise<User>;
3295
3165
  public fetchFlags(force?: boolean): Promise<UserFlags>;
3296
- public setFriend(): Promise<User>;
3297
- public setBlock(): Promise<User>;
3298
- public sendFriendRequest(): Promise<User>;
3299
- public unFriend(): Promise<User>;
3300
- public unBlock(): Promise<User>;
3301
- public setNote(note?: any): Promise<string>;
3302
- public getProfile(guildId?: Snowflake): Promise<User>;
3303
- public setNickname(nickname: string | null): Promise<boolean>;
3166
+ public setNote(note: string | null | undefined): Promise<this>;
3304
3167
  public toString(): UserMention;
3305
- public ring(): Promise<boolean>;
3306
- public themeColors?: [number, number];
3307
- public readonly hexThemeColor: [string, string] | null;
3168
+ public getProfile(guildId?: Snowflake): Promise<any>;
3169
+ public ring(): Promise<void>;
3170
+ public sendFriendRequest(): Promise<boolean>;
3171
+ public deleteRelationship(): Promise<boolean>;
3308
3172
  }
3309
3173
 
3310
3174
  export class UserContextMenuInteraction<Cached extends CacheType = CacheType> extends ContextMenuInteraction<Cached> {
@@ -3347,6 +3211,7 @@ export class Util extends null {
3347
3211
  public static escapeNumberedList(text: string): string;
3348
3212
  public static escapeMaskedLink(text: string): string;
3349
3213
  public static cleanCodeBlockContent(text: string): string;
3214
+ public static fetchRecommendedShards(token: string, options?: FetchRecommendedShardsOptions): Promise<number>;
3350
3215
  public static flatten(obj: unknown, ...props: Record<string, boolean | string>[]): unknown;
3351
3216
  public static makeError(obj: MakeErrorOptions): Error;
3352
3217
  public static makePlainError(err: Error): MakeErrorOptions;
@@ -3375,7 +3240,21 @@ export class Formatters extends null {
3375
3240
  public static blockQuote: typeof blockQuote;
3376
3241
  public static bold: typeof bold;
3377
3242
  public static channelMention: typeof channelMention;
3378
- public static chatInputApplicationCommandMention: typeof chatInputApplicationCommandMention;
3243
+ public static chatInputApplicationCommandMention<
3244
+ N extends string,
3245
+ G extends string,
3246
+ S extends string,
3247
+ I extends Snowflake,
3248
+ >(commandName: N, subcommandGroupName: G, subcommandName: S, commandId: I): `</${N} ${G} ${S}:${I}>`;
3249
+ public static chatInputApplicationCommandMention<N extends string, S extends string, I extends Snowflake>(
3250
+ commandName: N,
3251
+ subcommandName: S,
3252
+ commandId: I,
3253
+ ): `</${N} ${S}:${I}>`;
3254
+ public static chatInputApplicationCommandMention<N extends string, I extends Snowflake>(
3255
+ commandName: N,
3256
+ commandId: I,
3257
+ ): `</${N}:${I}>`;
3379
3258
  public static codeBlock: typeof codeBlock;
3380
3259
  public static formatEmoji: typeof formatEmoji;
3381
3260
  public static hideLinkEmbed: typeof hideLinkEmbed;
@@ -3414,12 +3293,13 @@ export class VoiceRegion {
3414
3293
 
3415
3294
  export class VoiceState extends Base {
3416
3295
  private constructor(guild: Guild, data: RawVoiceStateData);
3417
- public readonly channel: VoiceBasedChannel | null;
3296
+ public readonly channel: VoiceBasedChannel | DMChannel | GroupDMChannel | null;
3418
3297
  public channelId: Snowflake | null;
3419
3298
  public readonly deaf: boolean | null;
3420
3299
  public guild: Guild;
3421
3300
  public id: Snowflake;
3422
3301
  public readonly member: GuildMember | null;
3302
+ public readonly user: User | null;
3423
3303
  public readonly mute: boolean | null;
3424
3304
  public selfDeaf: boolean | null;
3425
3305
  public selfMute: boolean | null;
@@ -3430,14 +3310,16 @@ export class VoiceState extends Base {
3430
3310
  public selfVideo: boolean | null;
3431
3311
  public suppress: boolean;
3432
3312
  public requestToSpeakTimestamp: number | null;
3433
- public readonly user: User | null;
3313
+
3434
3314
  public setDeaf(deaf?: boolean, reason?: string): Promise<GuildMember>;
3435
3315
  public setMute(mute?: boolean, reason?: string): Promise<GuildMember>;
3436
3316
  public disconnect(reason?: string): Promise<GuildMember>;
3437
3317
  public setChannel(channel: GuildVoiceChannelResolvable | null, reason?: string): Promise<GuildMember>;
3438
3318
  public setRequestToSpeak(request?: boolean): Promise<void>;
3439
3319
  public setSuppressed(suppressed?: boolean): Promise<void>;
3320
+ public setStatus(status?: string): Promise<void>;
3440
3321
  public getPreview(): Promise<string>;
3322
+ public postPreview(base64Image: string): Promise<void>;
3441
3323
  }
3442
3324
 
3443
3325
  export class Webhook extends WebhookMixin() {
@@ -3519,8 +3401,8 @@ export class WebSocketShard extends EventEmitter {
3519
3401
  private constructor(manager: WebSocketManager, id: number);
3520
3402
  private sequence: number;
3521
3403
  private closeSequence: number;
3522
- private sessionId: string | null;
3523
3404
  private resumeURL: string | null;
3405
+ private sessionId: string | null;
3524
3406
  private lastPingTimestamp: number;
3525
3407
  private lastHeartbeatAcked: boolean;
3526
3408
  private ratelimit: { queue: unknown[]; total: number; remaining: number; time: 60e3; timer: NodeJS.Timeout | null };
@@ -3663,6 +3545,8 @@ export const Constants: {
3663
3545
  size: AllowedImageSize,
3664
3546
  dynamic: boolean,
3665
3547
  ): string;
3548
+ AvatarDecoration(userId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize): string;
3549
+ ClanBadge(guildId: Snowflake, hash: string): string;
3666
3550
  Banner(id: Snowflake, hash: string, format: DynamicImageFormat, size: AllowedImageSize, dynamic: boolean): string;
3667
3551
  DefaultAvatar(index: number): string;
3668
3552
  DiscoverySplash(guildId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize): string;
@@ -3703,10 +3587,8 @@ export const Constants: {
3703
3587
  GuildScheduledEventPrivacyLevels: EnumHolder<typeof GuildScheduledEventPrivacyLevels>;
3704
3588
  GuildScheduledEventStatuses: EnumHolder<typeof GuildScheduledEventStatuses>;
3705
3589
  IntegrationExpireBehaviors: IntegrationExpireBehaviors[];
3706
- InteractionResponseTypes: EnumHolder<typeof InteractionResponseTypes>;
3707
- InteractionTypes: EnumHolder<typeof InteractionTypes>;
3708
- InviteScopes: InviteScope[];
3709
- MaxBulkDeletableMessageAge: 1_209_600_000;
3590
+ SelectMenuComponentTypes: EnumHolder<typeof SelectMenuComponentTypes>;
3591
+ RelationshipTypes: EnumHolder<typeof RelationshipType>;
3710
3592
  MembershipStates: EnumHolder<typeof MembershipStates>;
3711
3593
  MessageButtonStyles: EnumHolder<typeof MessageButtonStyles>;
3712
3594
  MessageComponentTypes: EnumHolder<typeof MessageComponentTypes>;
@@ -3747,6 +3629,7 @@ export const Constants: {
3747
3629
  TextInputStyles: EnumHolder<typeof TextInputStyles>;
3748
3630
  ThreadChannelTypes: ThreadChannelTypes[];
3749
3631
  UserAgent: string;
3632
+ ciphers: string[];
3750
3633
  VerificationLevels: EnumHolder<typeof VerificationLevels>;
3751
3634
  VideoQualityModes: EnumHolder<typeof VideoQualityModes>;
3752
3635
  VoiceBasedChannelTypes: VoiceBasedChannelTypes[];
@@ -3763,15 +3646,6 @@ export const Constants: {
3763
3646
  WSEvents: {
3764
3647
  [K in WSEventType]: K;
3765
3648
  };
3766
- // Add
3767
- defaultUA: string;
3768
- captchaServices: captchaServices[];
3769
- DMScanLevel: EnumHolder<typeof DMScanLevel>;
3770
- stickerAnimationMode: EnumHolder<typeof stickerAnimationMode>;
3771
- NitroType: EnumHolder<typeof NitroTypes>;
3772
- HypeSquadType: EnumHolder<typeof HypeSquadTypes>;
3773
- localeSetting: EnumHolder<typeof localeSettings>;
3774
- userGateway: string;
3775
3649
  };
3776
3650
 
3777
3651
  export const version: string;
@@ -3797,7 +3671,7 @@ export abstract class DataManager<K, Holds, R> extends BaseManager {
3797
3671
  }
3798
3672
 
3799
3673
  export abstract class CachedManager<K, Holds, R> extends DataManager<K, Holds, R> {
3800
- protected constructor(client: Client, holds: Constructable<Holds>);
3674
+ protected constructor(client: Client, holds: Constructable<Holds>, iterable?: Iterable<Holds>);
3801
3675
  private readonly _cache: Collection<K, Holds>;
3802
3676
  private _add(data: unknown, cache?: boolean, { id, extras }?: { id: K; extras: unknown[] }): Holds;
3803
3677
  }
@@ -3813,8 +3687,7 @@ export class ApplicationCommandManager<
3813
3687
  PermissionsOptionsExtras = { guild: GuildResolvable },
3814
3688
  PermissionsGuildType = null,
3815
3689
  > extends CachedManager<Snowflake, ApplicationCommandScope, ApplicationCommandResolvable> {
3816
- // @ts-ignore
3817
- protected constructor(client: Client, iterable?: Iterable<unknown>, user: User);
3690
+ protected constructor(client: Client, iterable?: Iterable<unknown>);
3818
3691
  public permissions: ApplicationCommandPermissionsManager<
3819
3692
  { command?: ApplicationCommandResolvable } & PermissionsOptionsExtras,
3820
3693
  { command: ApplicationCommandResolvable } & PermissionsOptionsExtras,
@@ -3859,11 +3732,8 @@ export class ApplicationCommandPermissionsManager<
3859
3732
  GuildType,
3860
3733
  CommandIdType,
3861
3734
  > extends BaseManager {
3862
- private constructor(
3863
- manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand,
3864
- user: User,
3865
- );
3866
- private manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand;
3735
+ private constructor(manager: ApplicationCommandManager | ApplicationCommand);
3736
+ private manager: ApplicationCommandManager | ApplicationCommand;
3867
3737
 
3868
3738
  public client: Client;
3869
3739
  public commandId: CommandIdType;
@@ -3910,71 +3780,72 @@ export class BaseGuildEmojiManager extends CachedManager<Snowflake, GuildEmoji,
3910
3780
  export class ChannelManager extends CachedManager<Snowflake, AnyChannel, ChannelResolvable> {
3911
3781
  private constructor(client: Client, iterable: Iterable<RawChannelData>);
3912
3782
  public fetch(id: Snowflake, options?: FetchChannelOptions): Promise<AnyChannel | null>;
3913
- public createGroupDM(recipients: UserResolvable[]): Promise<PartialGroupDMChannel>;
3783
+ public createGroupDM(recipients: UserResolvable[]): Promise<GroupDMChannel>;
3914
3784
  }
3915
3785
 
3916
- export type FetchGuildApplicationCommandFetchOptions = Omit<FetchApplicationCommandOptions, 'guildId'>;
3917
-
3918
- export class GuildFolderManager extends BaseManager {
3919
- private constructor(client: Client);
3920
- public cache: Collection<number, GuildFolder>;
3786
+ export class RelationshipManager extends BaseManager {
3787
+ constructor(
3788
+ client: Client,
3789
+ data: {
3790
+ user: RawUserData;
3791
+ type: RelationshipType;
3792
+ since?: string;
3793
+ nickname: string | null | undefined;
3794
+ id: Snowflake;
3795
+ }[],
3796
+ );
3797
+ public cache: Collection<Snowflake, RelationshipType>;
3798
+ public friendNicknames: Collection<Snowflake, string | null>;
3799
+ public sinceCache: Collection<Snowflake, Date>;
3800
+ public readonly friendCache: Collection<Snowflake, User>;
3801
+ public readonly blockedCache: Collection<Snowflake, User>;
3802
+ public readonly incomingCache: Collection<Snowflake, User>;
3803
+ public readonly outgoingCache: Collection<Snowflake, User>;
3804
+ public toJSON(): { type: RelationshipType; since: string; nickname: string | null | undefined; id: Snowflake }[];
3805
+ public resolveId(user: UserResolvable): Snowflake | undefined;
3806
+ public fetch(user?: UserResolvable, options?: BaseFetchOptions): Promise<RelationshipType | RelationshipManager>;
3807
+ public deleteRelationship(user: UserResolvable): Promise<boolean>;
3808
+ public sendFriendRequest(options: FriendRequestOptions): Promise<boolean>;
3809
+ public addFriend(user: UserResolvable): Promise<boolean>;
3810
+ public setNickname(user: UserResolvable, nickname: string | null | undefined): Promise<boolean>;
3811
+ public addBlocked(user: UserResolvable): Promise<boolean>;
3921
3812
  }
3922
3813
 
3923
- export interface RawGuildFolderData {
3924
- id: number | null;
3925
- name: string | null;
3926
- guild_ids: Snowflake[];
3927
- color: number | null;
3928
- }
3929
- export class GuildFolder extends Base {
3930
- private constructor(client: Client, data: RawGuildFolderData);
3931
- public id: number | null;
3932
- public name: string | null;
3933
- public guild_ids: Snowflake[];
3934
- public color: number | null;
3935
- public readonly hexColor: string | null;
3936
- public readonly guilds: Collection<Snowflake, Guild>;
3937
- public toJSON(): RawGuildFolderData;
3814
+ export class UserNoteManager extends BaseManager {
3815
+ constructor(client: Client, users: { [key: Snowflake]: string }[]);
3816
+ public cache: Collection<Snowflake, string>;
3817
+ private _reload(data: { [key: Snowflake]: string }): this;
3818
+ public updateNote(id: Snowflake, note: string | null | undefined): Promise<this>;
3819
+ public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<string>;
3938
3820
  }
3939
3821
 
3822
+ export type FetchGuildApplicationCommandFetchOptions = Omit<FetchApplicationCommandOptions, 'guildId'>;
3823
+
3940
3824
  export class ClientUserSettingManager extends BaseManager {
3941
3825
  private constructor(client: Client);
3942
- public rawSetting: RawUserSettingsData | object;
3943
- public locale: localeSetting | null;
3944
- public activityDisplay: boolean | null;
3945
- public DMfromServerMode: boolean | null;
3946
- public displayImage: boolean | null;
3947
- public linkedImageDisplay: boolean | null;
3948
- public autoplayGIF: boolean | null;
3949
- public previewLink: boolean | null;
3950
- public animatedEmojis: boolean | null;
3951
- public allowTTS: boolean | null;
3952
- public compactMode: boolean | null;
3953
- public convertEmoticons: boolean | null;
3954
- public DMScanLevel: DMScanLevel;
3955
- public theme: 'dark' | 'light' | null;
3956
- public developerMode: boolean | null;
3957
- public afkTimeout: number | null; // second
3958
- public stickerAnimationMode: stickerAnimationMode;
3959
- public showEmojiReactions: boolean | null;
3960
- public customStatus:
3961
- | {
3962
- text?: string;
3963
- expires_at?: string | null;
3964
- emoji_name?: string;
3965
- emoji_id?: Snowflake | null;
3966
- status?: PresenceStatusData;
3967
- }
3968
- | object;
3969
- public addFriendFrom: { all?: boolean; mutual_friends?: boolean; mututal_guilds?: boolean } | object;
3970
- public guildFolder: GuildFolderManager;
3971
- public disableDMfromServer: Collection<Snowflake, boolean>;
3972
- public fetch(): Promise<RawUserSettingsData>;
3826
+ public readonly raw: RawUserSettingsData;
3827
+ public locale?: string;
3828
+ public activityDisplay?: boolean;
3829
+ public allowDMsFromGuild?: boolean;
3830
+ public displayImage?: boolean;
3831
+ public linkedImageDisplay?: boolean;
3832
+ public autoplayGIF?: boolean;
3833
+ public previewLink?: boolean;
3834
+ public animatedEmoji?: boolean;
3835
+ public allowTTS?: boolean;
3836
+ public compactMode?: boolean;
3837
+ public convertEmoticons?: boolean;
3838
+ public DMScanLevel?: 0 | 1 | 2;
3839
+ public theme?: 'dark' | 'light';
3840
+ public developerMode?: boolean;
3841
+ public afkTimeout?: number;
3842
+ public stickerAnimationMode?: 0 | 1 | 2;
3843
+ public showEmojiReactions?: boolean;
3844
+ public disableDMfromGuilds: Collection<Snowflake, Guild>;
3845
+ public fetch(): Promise<this>;
3973
3846
  public edit(data: Partial<RawUserSettingsData>): Promise<this>;
3974
- public setDisplayCompactMode(value?: boolean): Promise<this>;
3975
- public setTheme(value?: 'dark' | 'light'): Promise<this>;
3976
- public setLocale(value: localeSetting): Promise<this>;
3977
- // @ts-ignore
3847
+ public toggleCompactMode(): Promise<this>;
3848
+ public setTheme(value: 'dark' | 'light'): Promise<this>;
3978
3849
  public setCustomStatus(value?: CustomStatusOption | CustomStatus): Promise<this>;
3979
3850
  public restrictedGuilds(status: boolean): Promise<void>;
3980
3851
  public addRestrictedGuild(guildId: GuildResolvable): Promise<void>;
@@ -3982,8 +3853,8 @@ export class ClientUserSettingManager extends BaseManager {
3982
3853
  }
3983
3854
 
3984
3855
  export class GuildSettingManager extends BaseManager {
3985
- private constructor(client: Client, guildId: Snowflake);
3986
- public rawSetting?: RawGuildSettingsData;
3856
+ private constructor(guild: Guild);
3857
+ public readonly raw?: RawGuildSettingsData;
3987
3858
  public suppressEveryone?: boolean;
3988
3859
  public suppressRoles?: boolean;
3989
3860
  public muteScheduledEvents?: boolean;
@@ -4001,22 +3872,81 @@ export class GuildSettingManager extends BaseManager {
4001
3872
  public edit(data: Partial<RawGuildSettingsData>): Promise<this>;
4002
3873
  }
4003
3874
 
4004
- export class GuildApplicationCommandManager extends ApplicationCommandManager<ApplicationCommand, {}, Guild> {
4005
- private constructor(guild: Guild, iterable?: Iterable<RawApplicationCommandData>);
4006
- public guild: Guild;
4007
- public create(command: ApplicationCommandDataResolvable): Promise<ApplicationCommand>;
4008
- public delete(command: ApplicationCommandResolvable): Promise<ApplicationCommand | null>;
4009
- public edit(
4010
- command: ApplicationCommandResolvable,
4011
- data: Partial<ApplicationCommandDataResolvable>,
4012
- ): Promise<ApplicationCommand>;
4013
- public fetch(id: Snowflake, options?: FetchGuildApplicationCommandFetchOptions): Promise<ApplicationCommand>;
4014
- public fetch(options: FetchGuildApplicationCommandFetchOptions): Promise<Collection<Snowflake, ApplicationCommand>>;
4015
- public fetch(
4016
- id?: undefined,
4017
- options?: FetchGuildApplicationCommandFetchOptions,
4018
- ): Promise<Collection<Snowflake, ApplicationCommand>>;
4019
- public set(commands: ApplicationCommandDataResolvable[]): Promise<Collection<Snowflake, ApplicationCommand>>;
3875
+ export interface CustomStatusOption {
3876
+ text?: string | null;
3877
+ expires_at?: string | null;
3878
+ emoji?: EmojiIdentifierResolvable | null;
3879
+ status?: PresenceStatusData | null;
3880
+ }
3881
+
3882
+ // Source: https://luna.gitlab.io/discord-unofficial-docs/user_settings.html
3883
+ export interface RawUserSettingsData {
3884
+ afk_timeout?: number;
3885
+ allow_accessibility_detection?: boolean;
3886
+ animate_emoji?: boolean;
3887
+ animate_stickers?: number;
3888
+ contact_sync_enabled?: boolean;
3889
+ convert_emoticons?: boolean;
3890
+ custom_status?: { text?: string; expires_at?: string | null; emoji_name?: string; emoji_id?: Snowflake | null };
3891
+ default_guilds_restricted?: boolean;
3892
+ detect_platform_accounts?: boolean;
3893
+ developer_mode?: boolean;
3894
+ disable_games_tab?: boolean;
3895
+ enable_tts_command?: boolean;
3896
+ explicit_content_filter?: number;
3897
+ friend_discovery_flags?: number;
3898
+ friend_source_flags?: { all?: boolean; mutual_friends?: boolean; mututal_guilds?: boolean };
3899
+ gif_auto_play?: boolean;
3900
+ guild_folders?: { id?: Snowflake; guild_ids?: Snowflake[]; name?: string }[];
3901
+ guild_positions?: number[];
3902
+ inline_attachment_media?: boolean;
3903
+ inline_embed_media?: boolean;
3904
+ locale?: string;
3905
+ message_display_compact?: boolean;
3906
+ native_phone_integration_enabled?: boolean;
3907
+ render_embeds?: boolean;
3908
+ render_reactions?: boolean;
3909
+ restricted_guilds?: any[];
3910
+ show_current_game?: boolean;
3911
+ status?: PresenceStatusData;
3912
+ stream_notifications_enabled?: boolean;
3913
+ theme?: 'dark' | 'light';
3914
+ timezone_offset?: number;
3915
+ view_nsfw_guilds?: boolean;
3916
+ }
3917
+
3918
+ export interface RawGuildSettingsData {
3919
+ guild_id: Snowflake;
3920
+ suppress_everyone: boolean;
3921
+ suppress_roles: boolean;
3922
+ mute_scheduled_events: boolean;
3923
+ message_notifications: 2;
3924
+ flags: 0;
3925
+ mobile_push: boolean;
3926
+ muted: boolean;
3927
+ mute_config?: RawMuteConfigData;
3928
+ hide_muted_channels: boolean;
3929
+ channel_overrides: RawGuildChannelSettingsData[];
3930
+ notify_highlights: number;
3931
+ version: number;
3932
+ }
3933
+
3934
+ export interface RawGuildChannelSettingsData {
3935
+ channel_id: Snowflake;
3936
+ message_notifications: number;
3937
+ muted: boolean;
3938
+ mute_config?: RawMuteConfigData;
3939
+ collapsed: boolean;
3940
+ }
3941
+
3942
+ export interface RawMuteConfigData {
3943
+ end_time: string;
3944
+ selected_time_window: number;
3945
+ }
3946
+
3947
+ export interface MuteConfigData {
3948
+ endTime: Date;
3949
+ selectedTimeWindow: number;
4020
3950
  }
4021
3951
 
4022
3952
  export type MappedGuildChannelTypes = EnumValueMapped<
@@ -4068,7 +3998,6 @@ export class GuildChannelManager extends CachedManager<Snowflake, GuildBasedChan
4068
3998
  options?: SetChannelPositionOptions,
4069
3999
  ): Promise<GuildChannel>;
4070
4000
  public setPositions(channelPositions: readonly ChannelPosition[]): Promise<Guild>;
4071
- public fetchActiveThreads(cache?: boolean): Promise<FetchedThreads>;
4072
4001
  public delete(channel: GuildChannelResolvable, reason?: string): Promise<void>;
4073
4002
  }
4074
4003
 
@@ -4107,49 +4036,35 @@ export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvabl
4107
4036
  public fetch(options?: FetchGuildsOptions): Promise<Collection<Snowflake, OAuth2Guild>>;
4108
4037
  }
4109
4038
 
4110
- export interface BruteforceOptions {
4111
- limit?: number;
4112
- delay?: number;
4113
- depth?: number;
4114
- }
4115
-
4116
4039
  export class GuildMemberManager extends CachedManager<Snowflake, GuildMember, GuildMemberResolvable> {
4117
4040
  private constructor(guild: Guild, iterable?: Iterable<RawGuildMemberData>);
4118
4041
  public guild: Guild;
4119
- public readonly me: GuildMember | null;
4042
+ public get me(): GuildMember | null;
4120
4043
  public add(
4121
4044
  user: UserResolvable,
4122
4045
  options: AddGuildMemberOptions & { fetchWhenExisting: false },
4123
4046
  ): Promise<GuildMember | null>;
4124
4047
  public add(user: UserResolvable, options: AddGuildMemberOptions): Promise<GuildMember>;
4048
+ public addRole(user: UserResolvable, role: RoleResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
4125
4049
  public ban(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>;
4126
4050
  public edit(user: UserResolvable, data: GuildMemberEditData, reason?: string): Promise<GuildMember>;
4127
4051
  public fetch(
4128
4052
  options: UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }),
4129
4053
  ): Promise<GuildMember>;
4130
4054
  public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
4131
- public fetchMemberList(
4132
- channel: GuildTextChannelResolvable,
4133
- offset?: number,
4134
- double?: boolean,
4135
- retryMax?: number,
4136
- time?: number,
4137
- ): Promise<Collection<Snowflake, GuildMember>>;
4138
- public fetchBruteforce(options?: BruteforceOptions): Promise<Collection<Snowflake, GuildMember>>;
4139
- public fetchByMemberSafety(timeout?: number): Promise<Collection<Snowflake, GuildMember>>;
4140
4055
  public fetchMe(options?: BaseFetchOptions): Promise<GuildMember>;
4141
4056
  public kick(user: UserResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
4142
4057
  public list(options?: GuildListMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
4143
4058
  public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>;
4144
4059
  public prune(options?: GuildPruneMembersOptions): Promise<number>;
4145
- public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
4146
- public unban(user: UserResolvable, reason?: string): Promise<User | null>;
4147
- public addRole(user: UserResolvable, role: RoleResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
4148
4060
  public removeRole(
4149
4061
  user: UserResolvable,
4150
4062
  role: RoleResolvable,
4151
4063
  reason?: string,
4152
4064
  ): Promise<GuildMember | User | Snowflake>;
4065
+ public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
4066
+ public unban(user: UserResolvable, reason?: string): Promise<User | null>;
4067
+ public fetchByMemberSafety(timeout?: number): Promise<Collection<Snowflake, GuildMember>>;
4153
4068
  }
4154
4069
 
4155
4070
  export class GuildBanManager extends CachedManager<Snowflake, GuildBan, GuildBanResolvable> {
@@ -4250,26 +4165,6 @@ export class MessageManager extends CachedManager<Snowflake, Message, MessageRes
4250
4165
  public search(options: MessageSearchOptions): Promise<MessageSearchResult>;
4251
4166
  }
4252
4167
 
4253
- export class InteractionManager extends CachedManager<Snowflake, Message, MessageResolvable> {
4254
- private constructor(channel: TextBasedChannel, iterable?: Iterable<RawMessageData>);
4255
- public channel: TextBasedChannel;
4256
- public cache: Collection<Snowflake, Message>;
4257
- }
4258
-
4259
- export class InteractionResponse extends Base {
4260
- private constructor(client: Client, data: object);
4261
- public readonly channel: GuildTextBasedChannel | TextBasedChannel;
4262
- public channelId: Snowflake;
4263
- public readonly createdAt: Date;
4264
- public createdTimestamp: number;
4265
- public guildId: Snowflake | null;
4266
- public readonly guild: Snowflake | null;
4267
- public id: Snowflake;
4268
- public nonce: Snowflake;
4269
- public sendData: object;
4270
- public awaitModal(time: number): Modal;
4271
- }
4272
-
4273
4168
  export interface MessageSearchOptions {
4274
4169
  authors: UserResolvable[];
4275
4170
  content: string;
@@ -4350,6 +4245,7 @@ export class RoleManager extends CachedManager<Snowflake, Role, RoleResolvable>
4350
4245
  public edit(role: RoleResolvable, options: RoleData, reason?: string): Promise<Role>;
4351
4246
  public delete(role: RoleResolvable, reason?: string): Promise<void>;
4352
4247
  public setPosition(role: RoleResolvable, position: number, options?: SetRolePositionOptions): Promise<Role>;
4248
+ public setPositions(rolePositions: readonly RolePosition[]): Promise<Guild>;
4353
4249
  public comparePositions(role1: RoleResolvable, role2: RoleResolvable): number;
4354
4250
  }
4355
4251
 
@@ -4371,10 +4267,18 @@ export class ThreadManager extends CachedManager<Snowflake, ThreadChannel, Threa
4371
4267
  public fetchActive(cache?: boolean, options?: FetchChannelThreadsOptions): Promise<FetchedThreads>;
4372
4268
  }
4373
4269
 
4270
+ export class GuildTextThreadManager<AllowedThreadType> extends ThreadManager {
4271
+ public create(options: GuildTextThreadCreateOptions<AllowedThreadType>): Promise<ThreadChannel>;
4272
+ }
4273
+
4274
+ export class GuildForumThreadManager extends ThreadManager {
4275
+ public create(options: GuildForumThreadCreateOptions): Promise<ThreadChannel>;
4276
+ }
4277
+
4374
4278
  export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember, ThreadMemberResolvable> {
4375
4279
  private constructor(thread: ThreadChannel, iterable?: Iterable<RawThreadMemberData>);
4376
4280
  public thread: ThreadChannel;
4377
- public readonly me: ThreadMember | null;
4281
+ public get me(): ThreadMember | null;
4378
4282
  public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>;
4379
4283
  public fetch(options?: FetchThreadMembersWithoutGuildMemberDataOptions): Promise<Collection<Snowflake, ThreadMember>>;
4380
4284
  public fetch(member: ThreadMember<true>, options?: FetchMemberOptions): Promise<ThreadMember<true>>;
@@ -4386,8 +4290,19 @@ export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember,
4386
4290
  options: FetchThreadMembersWithGuildMemberDataOptions,
4387
4291
  ): Promise<Collection<Snowflake, ThreadMember<true>>>;
4388
4292
  public fetch(member: UserResolvable, options?: FetchThreadMemberOptions): Promise<ThreadMember>;
4389
- /** @deprecated Use `fetch(member, options)` instead. */
4390
- public fetch(cache: boolean, options?: FetchMembersOptions): Promise<Collection<Snowflake, ThreadMember>>;
4293
+
4294
+ /** @deprecated Use `fetch(options)` instead. */
4295
+ public fetch(cache: boolean, options?: FetchThreadMembersOptions): Promise<Collection<Snowflake, ThreadMember>>;
4296
+
4297
+ public fetch(
4298
+ x: undefined,
4299
+ options: FetchThreadMembersWithGuildMemberDataOptions,
4300
+ ): Promise<Collection<Snowflake, ThreadMember<true>>>;
4301
+ public fetch(
4302
+ x: undefined,
4303
+ options?: FetchThreadMembersWithoutGuildMemberDataOptions,
4304
+ ): Promise<Collection<Snowflake, ThreadMember>>;
4305
+
4391
4306
  public fetchMe(options?: BaseFetchOptions): Promise<ThreadMember>;
4392
4307
  public remove(id: Snowflake | '@me', reason?: string): Promise<Snowflake>;
4393
4308
  }
@@ -4397,30 +4312,11 @@ export class UserManager extends CachedManager<Snowflake, User, UserResolvable>
4397
4312
  private dmChannel(userId: Snowflake): DMChannel | null;
4398
4313
  public createDM(user: UserResolvable, options?: BaseFetchOptions): Promise<DMChannel>;
4399
4314
  public deleteDM(user: UserResolvable): Promise<DMChannel>;
4400
- public fetch(user: UserResolvable, options?: BaseFetchOptions & { guildId?: Snowflake }): Promise<User>;
4315
+ public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<User>;
4401
4316
  public fetchFlags(user: UserResolvable, options?: BaseFetchOptions): Promise<UserFlags>;
4402
4317
  public send(user: UserResolvable, options: string | MessagePayload | MessageOptions): Promise<Message>;
4403
4318
  }
4404
4319
 
4405
- export class RelationshipManager {
4406
- private constructor(client: Client, users?: object[]);
4407
- public cache: Collection<Snowflake, RelationshipTypes>;
4408
- public client: Client;
4409
- public readonly friendCache: Collection<Snowflake, User>;
4410
- public readonly blockedCache: Collection<Snowflake, User>;
4411
- public readonly incomingCache: Collection<Snowflake, User>;
4412
- public readonly outgoingCache: Collection<Snowflake, User>;
4413
- public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<RelationshipTypes>;
4414
- public deleteFriend(user: UserResolvable): Promise<boolean>;
4415
- public deleteBlocked(user: UserResolvable): Promise<boolean>;
4416
- public sendFriendRequest(username: string, discriminator?: number): Promise<boolean>;
4417
- public cancelFriendRequest(user: UserResolvable): Promise<boolean>;
4418
- public addFriend(user: UserResolvable): Promise<boolean>;
4419
- public addBlocked(user: UserResolvable): Promise<boolean>;
4420
- public setNickname(user: UserResolvable, nickname: string | null): Promise<boolean>;
4421
- private __cancel(id: Snowflake): Promise<boolean>;
4422
- }
4423
-
4424
4320
  export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, typeof VoiceState> {
4425
4321
  private constructor(guild: Guild, iterable?: Iterable<RawVoiceStateData>);
4426
4322
  public guild: Guild;
@@ -4451,26 +4347,14 @@ export interface TextBasedChannelFields extends PartialTextBasedChannelFields {
4451
4347
  lastPinTimestamp: number | null;
4452
4348
  readonly lastPinAt: Date | null;
4453
4349
  messages: MessageManager;
4454
- interactions: InteractionManager;
4455
- awaitMessageComponent<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
4456
- options?: AwaitMessageCollectorOptionsParams<T, true>,
4457
- ): Promise<MappedInteractionTypes[T]>;
4458
4350
  awaitMessages(options?: AwaitMessagesOptions): Promise<Collection<Snowflake, Message>>;
4459
- bulkDelete(
4460
- messages: Collection<Snowflake, Message> | readonly MessageResolvable[] | number,
4461
- filterOld?: boolean,
4462
- ): Promise<Collection<Snowflake, Message | PartialMessage | undefined>>;
4463
- createMessageComponentCollector<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
4464
- options?: MessageChannelCollectorOptionsParams<T, true>,
4465
- ): InteractionCollector<MappedInteractionTypes[T]>;
4466
4351
  createMessageCollector(options?: MessageCollectorOptions): MessageCollector;
4467
4352
  createWebhook(name: string, options?: ChannelWebhookCreateOptions): Promise<Webhook>;
4468
4353
  setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>;
4469
4354
  setNSFW(nsfw?: boolean, reason?: string): Promise<this>;
4470
4355
  fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
4471
4356
  sendTyping(): Promise<void>;
4472
- sendSlash(bot: UserResolvable, commandName: string, ...args: any): Promise<InteractionResponse>;
4473
- searchInteraction(applicationId: Snowflake, type?: ApplicationCommandTypes): Promise<object>;
4357
+ sendSlash(target: UserResolvable, commandName: string, ...args: any[]): Promise<Message | Modal>;
4474
4358
  }
4475
4359
 
4476
4360
  export function PartialWebhookMixin<T>(Base?: Constructable<T>): Constructable<T & PartialWebhookFields>;
@@ -4503,9 +4387,6 @@ export interface WebhookFields extends PartialWebhookFields {
4503
4387
  //#endregion
4504
4388
 
4505
4389
  //#region Typedefs
4506
- export type PurchasedFlagsString = 'NITRO_CLASSIC' | 'NITRO' | 'GUILD_BOOST';
4507
-
4508
- export type PremiumUsageFlagsString = 'PREMIUM_DISCRIMINATOR' | 'ANIMATED_AVATAR' | 'PROFILE_BANNER';
4509
4390
 
4510
4391
  export type ActivityFlagsString =
4511
4392
  | 'INSTANCE'
@@ -4518,16 +4399,23 @@ export type ActivityFlagsString =
4518
4399
  | 'PARTY_PRIVACY_VOICE_CHANNEL'
4519
4400
  | 'EMBEDDED';
4520
4401
 
4521
- export type ActivitiesOptions = Omit<ActivityOptions | CustomStatus | RichPresence | SpotifyRPC, 'shardId'>;
4402
+ export type PurchasedFlagsString = 'NITRO_CLASSIC' | 'NITRO' | 'GUILD_BOOST' | 'NITRO_BASIC';
4403
+
4404
+ export type PremiumUsageFlagsString = 'PREMIUM_DISCRIMINATOR' | 'ANIMATED_AVATAR' | 'PROFILE_BANNER';
4405
+
4406
+ export type InviteFlagsString = 'GUEST' | 'VIEWED';
4407
+
4408
+ export type ActivitiesOptions = Omit<ActivityOptions, 'shardId'>;
4522
4409
 
4523
4410
  export interface ActivityOptions {
4524
- name?: string;
4411
+ name: string;
4412
+ state?: string;
4525
4413
  url?: string;
4526
- type?: ExcludeEnum<typeof ActivityTypes, 'CUSTOM'>;
4414
+ type?: ActivityType;
4527
4415
  shardId?: number | readonly number[];
4528
4416
  }
4529
4417
 
4530
- export type ActivityPlatform = 'desktop' | 'samsung' | 'xbox';
4418
+ export type ActivityPlatform = 'desktop' | 'samsung' | 'xbox' | 'ios' | 'android' | 'embedded' | 'ps4' | 'ps5';
4531
4419
 
4532
4420
  export type ActivityType = keyof typeof ActivityTypes;
4533
4421
 
@@ -4555,6 +4443,7 @@ export interface ClientApplicationInstallParams {
4555
4443
  scopes: InviteScope[];
4556
4444
  permissions: Readonly<Permissions>;
4557
4445
  }
4446
+
4558
4447
  export interface APIErrors {
4559
4448
  UNKNOWN_ACCOUNT: 10001;
4560
4449
  UNKNOWN_APPLICATION: 10002;
@@ -4612,7 +4501,6 @@ export interface APIErrors {
4612
4501
  MAXIMUM_PINS: 30003;
4613
4502
  MAXIMUM_RECIPIENTS: 30004;
4614
4503
  MAXIMUM_ROLES: 30005;
4615
- MAXIMUM_USERNAMES: 30006;
4616
4504
  MAXIMUM_WEBHOOKS: 30007;
4617
4505
  MAXIMUM_EMOJIS: 30008;
4618
4506
  MAXIMUM_REACTIONS: 30010;
@@ -4655,7 +4543,6 @@ export interface APIErrors {
4655
4543
  INVALID_AUTHENTICATION_TOKEN: 50014;
4656
4544
  NOTE_TOO_LONG: 50015;
4657
4545
  INVALID_BULK_DELETE_QUANTITY: 50016;
4658
- INVALID_MFA_LEVEL: 50017;
4659
4546
  CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL: 50019;
4660
4547
  INVALID_OR_TAKEN_INVITE_CODE: 50020;
4661
4548
  CANNOT_EXECUTE_ON_SYSTEM_MESSAGE: 50021;
@@ -4671,7 +4558,6 @@ export interface APIErrors {
4671
4558
  INVALID_API_VERSION: 50041;
4672
4559
  FILE_UPLOADED_EXCEEDS_MAXIMUM_SIZE: 50045;
4673
4560
  INVALID_FILE_UPLOADED: 50046;
4674
- GIFT_CODE_CLAIMED: 50050;
4675
4561
  CANNOT_SELF_REDEEM_GIFT: 50054;
4676
4562
  INVALID_GUILD: 50055;
4677
4563
  INVALID_MESSAGE_TYPE: 50068;
@@ -4693,7 +4579,6 @@ export interface APIErrors {
4693
4579
  YOU_CANNOT_SEND_VOICE_MESSAGES_IN_THIS_CHANNEL: 50173;
4694
4580
  CANNOT_CONVERT_PREMIUM_EMOJI_TO_NORMAL_EMOJI: 50145;
4695
4581
  TWO_FACTOR_REQUIRED: 60003;
4696
- INVALID_TWO_FACTOR_CODE: 60008;
4697
4582
  NO_USERS_WITH_DISCORDTAG_EXIST: 80004;
4698
4583
  REACTION_BLOCKED: 90001;
4699
4584
  RESOURCE_OVERLOADED: 130000;
@@ -4728,369 +4613,6 @@ export interface ApplicationAsset {
4728
4613
  type: 'BIG' | 'SMALL';
4729
4614
  }
4730
4615
 
4731
- export interface ClientEvents extends BaseClientEvents {
4732
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4733
- applicationCommandCreate: [command: ApplicationCommand];
4734
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4735
- applicationCommandDelete: [command: ApplicationCommand];
4736
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4737
- applicationCommandUpdate: [oldCommand: ApplicationCommand | null, newCommand: ApplicationCommand];
4738
- applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData];
4739
- autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution];
4740
- autoModerationRuleCreate: [autoModerationRule: AutoModerationRule];
4741
- autoModerationRuleDelete: [autoModerationRule: AutoModerationRule];
4742
- autoModerationRuleUpdate: [
4743
- oldAutoModerationRule: AutoModerationRule | null,
4744
- newAutoModerationRule: AutoModerationRule,
4745
- ];
4746
- cacheSweep: [message: string];
4747
- channelCreate: [channel: NonThreadGuildBasedChannel];
4748
- channelDelete: [channel: DMChannel | NonThreadGuildBasedChannel];
4749
- channelPinsUpdate: [channel: TextBasedChannel, date: Date];
4750
- channelRecipientAdd: [channel: PartialGroupDMChannel, user: User];
4751
- channelRecipientRemove: [channel: PartialGroupDMChannel, user: User];
4752
- channelUpdate: [
4753
- oldChannel: DMChannel | NonThreadGuildBasedChannel,
4754
- newChannel: DMChannel | NonThreadGuildBasedChannel,
4755
- ];
4756
- warn: [message: string];
4757
- emojiCreate: [emoji: GuildEmoji];
4758
- emojiDelete: [emoji: GuildEmoji];
4759
- emojiUpdate: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji];
4760
- error: [error: Error];
4761
- callCreate: [call: Call];
4762
- callDelete: [call: Call];
4763
- callUpdate: [call: Call];
4764
- guildBanAdd: [ban: GuildBan];
4765
- guildBanRemove: [ban: GuildBan];
4766
- guildCreate: [guild: Guild];
4767
- guildDelete: [guild: Guild];
4768
- guildUnavailable: [guild: Guild];
4769
- guildIntegrationsUpdate: [guild: Guild];
4770
- guildMemberAdd: [member: GuildMember];
4771
- guildMemberAvailable: [member: GuildMember | PartialGuildMember];
4772
- guildMemberRemove: [member: GuildMember | PartialGuildMember];
4773
- guildMembersChunk: [
4774
- members: Collection<Snowflake, GuildMember>,
4775
- guild: Guild,
4776
- data: { count: number; index: number; nonce: string | undefined; notFound: unknown[] },
4777
- ];
4778
- guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember];
4779
- guildMemberListUpdate: [
4780
- members: Collection<Snowflake, GuildMember>,
4781
- guild: Guild,
4782
- data: {}, // see: https://luna.gitlab.io/discord-unofficial-docs/lazy_guilds.html
4783
- ];
4784
- guildUpdate: [oldGuild: Guild, newGuild: Guild];
4785
- inviteCreate: [invite: Invite];
4786
- inviteDelete: [invite: Invite];
4787
- /** @deprecated Use messageCreate instead */
4788
- message: [message: Message];
4789
- messageAck: [channel: TextChannel, message_id: Snowflake, isRead: boolean, raw: object];
4790
- messageCreate: [message: Message];
4791
- messageDelete: [message: Message | PartialMessage];
4792
- messageReactionRemoveAll: [
4793
- message: Message | PartialMessage,
4794
- reactions: Collection<string | Snowflake, MessageReaction>,
4795
- ];
4796
- messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction];
4797
- messageDeleteBulk: [messages: Collection<Snowflake, Message | PartialMessage>];
4798
- messageReactionAdd: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
4799
- messageReactionRemove: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
4800
- messageUpdate: [oldMessage: Message | PartialMessage, newMessage: Message | PartialMessage];
4801
- presenceUpdate: [oldPresence: Presence | null, newPresence: Presence];
4802
- ready: [client: Client<true>];
4803
- invalidated: [];
4804
- roleCreate: [role: Role];
4805
- roleDelete: [role: Role];
4806
- roleUpdate: [oldRole: Role, newRole: Role];
4807
- threadCreate: [thread: ThreadChannel, newlyCreated: boolean];
4808
- threadDelete: [thread: ThreadChannel];
4809
- threadListSync: [threads: Collection<Snowflake, ThreadChannel>];
4810
- threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember];
4811
- threadMembersUpdate: [
4812
- oldMembers: Collection<Snowflake, ThreadMember>,
4813
- newMembers: Collection<Snowflake, ThreadMember>,
4814
- ];
4815
- threadUpdate: [oldThread: ThreadChannel, newThread: ThreadChannel];
4816
- typingStart: [typing: Typing];
4817
- userUpdate: [oldUser: User | PartialUser, newUser: User];
4818
- userSettingsUpdate: [setting: RawUserSettingsData];
4819
- userGuildSettingsUpdate: [guild: Guild];
4820
- voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
4821
- webhookUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel | StageChannel];
4822
- /** @deprecated Use interactionCreate instead */
4823
- interaction: [interaction: Interaction];
4824
- interactionCreate: [interaction: Interaction | { nonce: Snowflake; id: Snowflake }];
4825
- interactionSuccess: [interaction: { nonce: Snowflake; id: Snowflake }];
4826
- interactionFailure: [interaction: { nonce: Snowflake; id: Snowflake }];
4827
- interactionModalCreate: [modal: Modal];
4828
- shardDisconnect: [closeEvent: CloseEvent, shardId: number];
4829
- shardError: [error: Error, shardId: number];
4830
- shardReady: [shardId: number, unavailableGuilds: Set<Snowflake> | undefined];
4831
- shardReconnecting: [shardId: number];
4832
- shardResume: [shardId: number, replayedEvents: number];
4833
- stageInstanceCreate: [stageInstance: StageInstance];
4834
- stageInstanceUpdate: [oldStageInstance: StageInstance | null, newStageInstance: StageInstance];
4835
- stageInstanceDelete: [stageInstance: StageInstance];
4836
- stickerCreate: [sticker: Sticker];
4837
- stickerDelete: [sticker: Sticker];
4838
- stickerUpdate: [oldSticker: Sticker, newSticker: Sticker];
4839
- guildScheduledEventCreate: [guildScheduledEvent: GuildScheduledEvent];
4840
- guildScheduledEventUpdate: [oldGuildScheduledEvent: GuildScheduledEvent, newGuildScheduledEvent: GuildScheduledEvent];
4841
- guildScheduledEventDelete: [guildScheduledEvent: GuildScheduledEvent];
4842
- guildScheduledEventUserAdd: [guildScheduledEvent: GuildScheduledEvent, user: User];
4843
- guildScheduledEventUserRemove: [guildScheduledEvent: GuildScheduledEvent, user: User];
4844
- guildAuditLogEntryCreate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
4845
- relationshipAdd: [id: Snowflake, type: RelationshipTypes];
4846
- relationshipRemove: [id: Snowflake];
4847
- relationshipUpdate: [id: Snowflake, type: RelationshipTypes, data: object];
4848
- unhandledPacket: [packet: { op: GatewayOpcodes | number; d?: any; s?: number; t?: string }, shard: WebSocketShard];
4849
- update: [oldVersion: string, newVersion: string];
4850
- captchaRequired: [request: Request, captcha: Captcha];
4851
- }
4852
-
4853
- export interface ConstantsEvents {
4854
- RATE_LIMIT: 'rateLimit';
4855
- INVALID_REQUEST_WARNING: 'invalidRequestWarning';
4856
- API_RESPONSE: 'apiResponse';
4857
- API_REQUEST: 'apiRequest';
4858
- CLIENT_READY: 'ready';
4859
- APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE: 'applicationCommandAutocompleteResponse';
4860
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4861
- APPLICATION_COMMAND_CREATE: 'applicationCommandCreate';
4862
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4863
- APPLICATION_COMMAND_DELETE: 'applicationCommandDelete';
4864
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4865
- APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate';
4866
- APPLICATION_COMMAND_PERMISSIONS_UPDATE: 'applicationCommandPermissionsUpdate';
4867
- CALL_CREATE: 'callCreate';
4868
- CALL_DELETE: 'callDelete';
4869
- CALL_UPDATE: 'callUpdate';
4870
- GUILD_CREATE: 'guildCreate';
4871
- GUILD_DELETE: 'guildDelete';
4872
- GUILD_UPDATE: 'guildUpdate';
4873
- GUILD_UNAVAILABLE: 'guildUnavailable';
4874
- GUILD_MEMBER_ADD: 'guildMemberAdd';
4875
- GUILD_MEMBER_REMOVE: 'guildMemberRemove';
4876
- GUILD_MEMBER_UPDATE: 'guildMemberUpdate';
4877
- GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable';
4878
- GUILD_MEMBERS_CHUNK: 'guildMembersChunk';
4879
- GUILD_MEMBER_LIST_UPDATE: 'guildMemberListUpdate';
4880
- GUILD_INTEGRATIONS_UPDATE: 'guildIntegrationsUpdate';
4881
- GUILD_ROLE_CREATE: 'roleCreate';
4882
- GUILD_ROLE_DELETE: 'roleDelete';
4883
- INVITE_CREATE: 'inviteCreate';
4884
- INVITE_DELETE: 'inviteDelete';
4885
- GUILD_ROLE_UPDATE: 'roleUpdate';
4886
- GUILD_EMOJI_CREATE: 'emojiCreate';
4887
- GUILD_EMOJI_DELETE: 'emojiDelete';
4888
- GUILD_EMOJI_UPDATE: 'emojiUpdate';
4889
- GUILD_BAN_ADD: 'guildBanAdd';
4890
- GUILD_BAN_REMOVE: 'guildBanRemove';
4891
- CHANNEL_CREATE: 'channelCreate';
4892
- CHANNEL_DELETE: 'channelDelete';
4893
- CHANNEL_UPDATE: 'channelUpdate';
4894
- CHANNEL_PINS_UPDATE: 'channelPinsUpdate';
4895
- CHANNEL_RECIPIENT_ADD: 'channelRecipientAdd';
4896
- CHANNEL_RECIPIENT_REMOVE: 'channelRecipientRemove';
4897
- MESSAGE_ACK: 'messageAck';
4898
- MESSAGE_CREATE: 'messageCreate';
4899
- MESSAGE_DELETE: 'messageDelete';
4900
- MESSAGE_UPDATE: 'messageUpdate';
4901
- MESSAGE_BULK_DELETE: 'messageDeleteBulk';
4902
- MESSAGE_REACTION_ADD: 'messageReactionAdd';
4903
- MESSAGE_REACTION_REMOVE: 'messageReactionRemove';
4904
- MESSAGE_REACTION_REMOVE_ALL: 'messageReactionRemoveAll';
4905
- MESSAGE_REACTION_REMOVE_EMOJI: 'messageReactionRemoveEmoji';
4906
- THREAD_CREATE: 'threadCreate';
4907
- THREAD_DELETE: 'threadDelete';
4908
- THREAD_UPDATE: 'threadUpdate';
4909
- THREAD_LIST_SYNC: 'threadListSync';
4910
- THREAD_MEMBER_UPDATE: 'threadMemberUpdate';
4911
- THREAD_MEMBERS_UPDATE: 'threadMembersUpdate';
4912
- USER_UPDATE: 'userUpdate';
4913
- USER_SETTINGS_UPDATE: 'userSettingsUpdate';
4914
- USER_GUILD_SETTINGS_UPDATE: 'userGuildSettingsUpdate';
4915
- PRESENCE_UPDATE: 'presenceUpdate';
4916
- VOICE_SERVER_UPDATE: 'voiceServerUpdate';
4917
- VOICE_STATE_UPDATE: 'voiceStateUpdate';
4918
- TYPING_START: 'typingStart';
4919
- WEBHOOKS_UPDATE: 'webhookUpdate';
4920
- INTERACTION_CREATE: 'interactionCreate';
4921
- INTERACTION_SUCCESS: 'interactionSuccess';
4922
- INTERACTION_MODAL_CREATE: 'interactionModalCreate';
4923
- INTERACTION_FAILURE: 'interactionFailure';
4924
- ERROR: 'error';
4925
- WARN: 'warn';
4926
- DEBUG: 'debug';
4927
- CACHE_SWEEP: 'cacheSweep';
4928
- SHARD_DISCONNECT: 'shardDisconnect';
4929
- SHARD_ERROR: 'shardError';
4930
- SHARD_RECONNECTING: 'shardReconnecting';
4931
- SHARD_READY: 'shardReady';
4932
- SHARD_RESUME: 'shardResume';
4933
- INVALIDATED: 'invalidated';
4934
- RAW: 'raw';
4935
- STAGE_INSTANCE_CREATE: 'stageInstanceCreate';
4936
- STAGE_INSTANCE_UPDATE: 'stageInstanceUpdate';
4937
- STAGE_INSTANCE_DELETE: 'stageInstanceDelete';
4938
- GUILD_STICKER_CREATE: 'stickerCreate';
4939
- GUILD_STICKER_DELETE: 'stickerDelete';
4940
- GUILD_STICKER_UPDATE: 'stickerUpdate';
4941
- GUILD_SCHEDULED_EVENT_CREATE: 'guildScheduledEventCreate';
4942
- GUILD_SCHEDULED_EVENT_UPDATE: 'guildScheduledEventUpdate';
4943
- GUILD_SCHEDULED_EVENT_DELETE: 'guildScheduledEventDelete';
4944
- GUILD_SCHEDULED_EVENT_USER_ADD: 'guildScheduledEventUserAdd';
4945
- GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove';
4946
- GUILD_AUDIT_LOG_ENTRY_CREATE: 'guildAuditLogEntryCreate';
4947
- RELATIONSHIP_ADD: 'relationshipAdd';
4948
- RELATIONSHIP_REMOVE: 'relationshipRemove';
4949
- RELATIONSHIP_UPDATE: 'relationshipUpdate';
4950
- UNHANDLED_PACKET: 'unhandledPacket';
4951
- CAPTCHA_REQUIRED: 'captchaRequired';
4952
- }
4953
-
4954
- export interface WebEmbedOptions {
4955
- shorten?: boolean;
4956
- hidden?: boolean;
4957
- title?: string;
4958
- description?: string;
4959
- url?: string;
4960
- timestamp?: Date | number;
4961
- color?: ColorResolvable;
4962
- fields?: EmbedFieldData[];
4963
- author?: Partial<MessageEmbedAuthor> & { icon_url?: string; proxy_icon_url?: string };
4964
- thumbnail?: Partial<MessageEmbedThumbnail> & { proxy_url?: string };
4965
- image?: Partial<MessageEmbedImage> & { proxy_url?: string };
4966
- video?: Partial<MessageEmbedVideo> & { proxy_url?: string };
4967
- footer?: Partial<MessageEmbedFooter> & { icon_url?: string; proxy_icon_url?: string };
4968
- imageType?: 'thumbnail' | 'image';
4969
- }
4970
- // export interface MessageOptions
4971
- // embeds?: (WebEmbed | MessageEmbed | MessageEmbedOptions | APIEmbed)[];
4972
-
4973
- /**
4974
- * @extends https://luna.gitlab.io/discord-unofficial-docs/user_settings.html
4975
- */
4976
- export interface RawUserSettingsData {
4977
- afk_timeout?: number;
4978
- allow_accessibility_detection?: boolean;
4979
- animate_emoji?: boolean;
4980
- animate_stickers?: number;
4981
- contact_sync_enabled?: boolean;
4982
- convert_emoticons?: boolean;
4983
- custom_status?: { text?: string; expires_at?: string | null; emoji_name?: string; emoji_id?: Snowflake | null };
4984
- default_guilds_restricted?: boolean;
4985
- detect_platform_accounts?: boolean;
4986
- developer_mode?: boolean;
4987
- disable_games_tab?: boolean;
4988
- enable_tts_command?: boolean;
4989
- explicit_content_filter?: DMScanLevel;
4990
- friend_discovery_flags?: number;
4991
- friend_source_flags?: { all?: boolean; mutual_friends?: boolean; mututal_guilds?: boolean };
4992
- gif_auto_play?: boolean;
4993
- guild_folders?: { id?: Snowflake; guild_ids?: Snowflake[]; name?: string }[];
4994
- guild_positions?: number[];
4995
- inline_attachment_media?: boolean;
4996
- inline_embed_media?: boolean;
4997
- locale?: string;
4998
- message_display_compact?: boolean;
4999
- native_phone_integration_enabled?: boolean;
5000
- render_embeds?: boolean;
5001
- render_reactions?: boolean;
5002
- restricted_guilds?: any[];
5003
- show_current_game?: boolean;
5004
- status?: PresenceStatusData;
5005
- stream_notifications_enabled?: boolean;
5006
- theme?: 'dark' | 'light';
5007
- timezone_offset?: number;
5008
- view_nsfw_guilds?: boolean;
5009
- }
5010
-
5011
- export interface RawGuildSettingsData {
5012
- guild_id: Snowflake;
5013
- suppress_everyone: boolean;
5014
- suppress_roles: boolean;
5015
- mute_scheduled_events: boolean;
5016
- message_notifications: 2;
5017
- flags: 0;
5018
- mobile_push: boolean;
5019
- muted: boolean;
5020
- mute_config?: RawMuteConfigData;
5021
- hide_muted_channels: boolean;
5022
- channel_overrides: RawGuildChannelSettingsData[];
5023
- notify_highlights: number;
5024
- version: number;
5025
- }
5026
-
5027
- export interface RawGuildChannelSettingsData {
5028
- channel_id: Snowflake;
5029
- message_notifications: number;
5030
- muted: boolean;
5031
- mute_config?: RawMuteConfigData;
5032
- collapsed: boolean;
5033
- }
5034
-
5035
- export interface RawMuteConfigData {
5036
- end_time: string;
5037
- selected_time_window: number;
5038
- }
5039
-
5040
- export interface MuteConfigData {
5041
- endTime: Date;
5042
- selectedTimeWindow: number;
5043
- }
5044
-
5045
- export interface ClientOptions {
5046
- shards?: number | number[] | 'auto';
5047
- shardCount?: number;
5048
- closeTimeout?: number;
5049
- makeCache?: CacheFactory;
5050
- /** @deprecated Pass the value of this property as `lifetime` to `sweepers.messages` instead. */
5051
- messageCacheLifetime?: number;
5052
- /** @deprecated Pass the value of this property as `interval` to `sweepers.messages` instead. */
5053
- messageSweepInterval?: number;
5054
- allowedMentions?: MessageMentionOptions;
5055
- invalidRequestWarningInterval?: number;
5056
- partials?: PartialTypes[];
5057
- restWsBridgeTimeout?: number;
5058
- restTimeOffset?: number;
5059
- restRequestTimeout?: number;
5060
- restGlobalRateLimit?: number;
5061
- restSweepInterval?: number;
5062
- retryLimit?: number;
5063
- failIfNotExists?: boolean;
5064
- userAgentSuffix?: string[];
5065
- presence?: PresenceData;
5066
- intents?: BitFieldResolvable<IntentsString, number>;
5067
- waitGuildTimeout?: number;
5068
- messageCreateEventGuildTimeout?: number;
5069
- sweepers?: SweeperOptions;
5070
- ws?: WebSocketOptions;
5071
- http?: HTTPOptions;
5072
- rejectOnRateLimit?: string[] | ((data: RateLimitData) => boolean | Promise<boolean>);
5073
- // add
5074
- checkUpdate?: boolean;
5075
- syncStatus?: boolean;
5076
- autoRedeemNitro?: boolean;
5077
- patchVoice?: boolean;
5078
- password?: string;
5079
- DMSync?: boolean;
5080
- proxy?: string;
5081
- captchaService?: captchaServices;
5082
- captchaKey?: string;
5083
- captchaSolver?: (data: Captcha, userAgent: string) => Promise<string>;
5084
- captchaRetryLimit?: number;
5085
- captchaWithProxy?: boolean;
5086
- interactionTimeout?: number;
5087
- usingNewAttachmentAPI?: boolean;
5088
- }
5089
-
5090
- export type captchaServices = '2captcha' | 'capmonster';
5091
-
5092
- // end copy
5093
-
5094
4616
  export interface BaseApplicationCommandData {
5095
4617
  name: string;
5096
4618
  nameLocalizations?: LocalizationMap;
@@ -5385,16 +4907,7 @@ export type ApplicationCommandPermissionType = keyof typeof ApplicationCommandPe
5385
4907
  export type ApplicationCommandResolvable = ApplicationCommand | Snowflake;
5386
4908
 
5387
4909
  export type ApplicationFlagsString =
5388
- | 'EMBEDDED_RELEASED'
5389
- | 'MANAGED_EMOJI'
5390
- | 'EMBEDDED_IAP'
5391
- | 'GROUP_DM_CREATE'
5392
- | 'RPC_PRIVATE_BETA'
5393
4910
  | 'APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE'
5394
- | 'ALLOW_ASSETS'
5395
- | 'ALLOW_ACTIVITY_ACTION_SPECTATE'
5396
- | 'ALLOW_ACTIVITY_ACTION_JOIN_REQUEST'
5397
- | 'RPC_HAS_CONNECTED'
5398
4911
  | 'GATEWAY_PRESENCE'
5399
4912
  | 'GATEWAY_PRESENCE_LIMITED'
5400
4913
  | 'GATEWAY_GUILD_MEMBERS'
@@ -5403,10 +4916,7 @@ export type ApplicationFlagsString =
5403
4916
  | 'EMBEDDED'
5404
4917
  | 'GATEWAY_MESSAGE_CONTENT'
5405
4918
  | 'GATEWAY_MESSAGE_CONTENT_LIMITED'
5406
- | 'EMBEDDED_FIRST_PARTY'
5407
- | 'APPLICATION_COMMAND_BADGE'
5408
- | 'ACTIVE'
5409
- | 'IFRAME_MODAL';
4919
+ | 'APPLICATION_COMMAND_BADGE';
5410
4920
 
5411
4921
  export interface ApplicationRoleConnectionMetadataEditOptions {
5412
4922
  name: string;
@@ -5569,7 +5079,6 @@ export type CacheWithLimitsOptions = {
5569
5079
  ? LimitedCollectionOptions<K, V> | number
5570
5080
  : never;
5571
5081
  };
5572
-
5573
5082
  export interface CategoryCreateChannelOptions {
5574
5083
  permissionOverwrites?: OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>;
5575
5084
  topic?: string;
@@ -5594,6 +5103,7 @@ export interface CategoryCreateChannelOptions {
5594
5103
  defaultReactionEmoji?: DefaultReactionEmoji;
5595
5104
  defaultSortOrder?: SortOrderType;
5596
5105
  defaultForumLayout?: ForumLayoutType;
5106
+ defaultThreadRateLimitPerUser?: number;
5597
5107
  reason?: string;
5598
5108
  }
5599
5109
 
@@ -5658,10 +5168,166 @@ export interface BaseClientEvents {
5658
5168
  invalidRequestWarning: [invalidRequestWarningData: InvalidRequestWarningData];
5659
5169
  }
5660
5170
 
5171
+ export interface ClientEvents extends BaseClientEvents {
5172
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5173
+ applicationCommandCreate: [command: ApplicationCommand];
5174
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5175
+ applicationCommandDelete: [command: ApplicationCommand];
5176
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5177
+ applicationCommandUpdate: [oldCommand: ApplicationCommand | null, newCommand: ApplicationCommand];
5178
+ applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData];
5179
+ /** @deprecated This event is not received by user accounts. */
5180
+ autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution];
5181
+ /** @deprecated This event is not received by user accounts. */
5182
+ autoModerationRuleCreate: [autoModerationRule: AutoModerationRule];
5183
+ /** @deprecated This event is not received by user accounts. */
5184
+ autoModerationRuleDelete: [autoModerationRule: AutoModerationRule];
5185
+ /** @deprecated This event is not received by user accounts. */
5186
+ autoModerationRuleUpdate: [
5187
+ oldAutoModerationRule: AutoModerationRule | null,
5188
+ newAutoModerationRule: AutoModerationRule,
5189
+ ];
5190
+ cacheSweep: [message: string];
5191
+ channelCreate: [channel: NonThreadGuildBasedChannel];
5192
+ channelDelete: [channel: DMChannel | NonThreadGuildBasedChannel];
5193
+ channelPinsUpdate: [channel: TextBasedChannel, date: Date];
5194
+ channelUpdate: [
5195
+ oldChannel: DMChannel | NonThreadGuildBasedChannel,
5196
+ newChannel: DMChannel | NonThreadGuildBasedChannel,
5197
+ ];
5198
+ warn: [message: string];
5199
+ emojiCreate: [emoji: GuildEmoji];
5200
+ emojiDelete: [emoji: GuildEmoji];
5201
+ emojiUpdate: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji];
5202
+ error: [error: Error];
5203
+ guildAvailable: [guild: Guild];
5204
+ guildBanAdd: [ban: GuildBan];
5205
+ guildBanRemove: [ban: GuildBan];
5206
+ guildCreate: [guild: Guild];
5207
+ guildDelete: [guild: Guild];
5208
+ guildUnavailable: [guild: Guild];
5209
+ guildIntegrationsUpdate: [guild: Guild];
5210
+ guildMemberAdd: [member: GuildMember];
5211
+ guildMemberAvailable: [member: GuildMember | PartialGuildMember];
5212
+ guildMemberRemove: [member: GuildMember | PartialGuildMember];
5213
+ guildMembersChunk: [
5214
+ members: Collection<Snowflake, GuildMember>,
5215
+ guild: Guild,
5216
+ data: { count: number; index: number; nonce: string | undefined; notFound: unknown[] },
5217
+ ];
5218
+ guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember];
5219
+ guildUpdate: [oldGuild: Guild, newGuild: Guild];
5220
+ inviteCreate: [invite: Invite];
5221
+ inviteDelete: [invite: Invite];
5222
+ /** @deprecated Use messageCreate instead */
5223
+ message: [message: Message];
5224
+ messageCreate: [message: Message];
5225
+ messageDelete: [message: Message | PartialMessage];
5226
+ messageReactionRemoveAll: [
5227
+ message: Message | PartialMessage,
5228
+ reactions: Collection<string | Snowflake, MessageReaction>,
5229
+ ];
5230
+ messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction];
5231
+ messageDeleteBulk: [messages: Collection<Snowflake, Message | PartialMessage>];
5232
+ messageReactionAdd: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
5233
+ messageReactionRemove: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
5234
+ messageUpdate: [oldMessage: Message | PartialMessage, newMessage: Message | PartialMessage];
5235
+ presenceUpdate: [oldPresence: Presence | null, newPresence: Presence];
5236
+ ready: [client: Client<true>];
5237
+ invalidated: [];
5238
+ roleCreate: [role: Role];
5239
+ roleDelete: [role: Role];
5240
+ roleUpdate: [oldRole: Role, newRole: Role];
5241
+ threadCreate: [thread: ThreadChannel, newlyCreated: boolean];
5242
+ threadDelete: [thread: ThreadChannel];
5243
+ threadListSync: [threads: Collection<Snowflake, ThreadChannel>];
5244
+ threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember];
5245
+ threadMembersUpdate: [
5246
+ oldMembers: Collection<Snowflake, ThreadMember>,
5247
+ newMembers: Collection<Snowflake, ThreadMember>,
5248
+ ];
5249
+ threadUpdate: [oldThread: ThreadChannel, newThread: ThreadChannel];
5250
+ typingStart: [typing: Typing];
5251
+ userUpdate: [oldUser: User | PartialUser, newUser: User];
5252
+ voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
5253
+ webhookUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel | StageChannel];
5254
+ shardDisconnect: [closeEvent: CloseEvent, shardId: number];
5255
+ shardError: [error: Error, shardId: number];
5256
+ shardReady: [shardId: number, unavailableGuilds: Set<Snowflake> | undefined];
5257
+ shardReconnecting: [shardId: number];
5258
+ shardResume: [shardId: number, replayedEvents: number];
5259
+ stageInstanceCreate: [stageInstance: StageInstance];
5260
+ stageInstanceUpdate: [oldStageInstance: StageInstance | null, newStageInstance: StageInstance];
5261
+ stageInstanceDelete: [stageInstance: StageInstance];
5262
+ stickerCreate: [sticker: Sticker];
5263
+ stickerDelete: [sticker: Sticker];
5264
+ stickerUpdate: [oldSticker: Sticker, newSticker: Sticker];
5265
+ guildScheduledEventCreate: [guildScheduledEvent: GuildScheduledEvent];
5266
+ guildScheduledEventUpdate: [oldGuildScheduledEvent: GuildScheduledEvent, newGuildScheduledEvent: GuildScheduledEvent];
5267
+ guildScheduledEventDelete: [guildScheduledEvent: GuildScheduledEvent];
5268
+ guildScheduledEventUserAdd: [guildScheduledEvent: GuildScheduledEvent, user: User];
5269
+ guildScheduledEventUserRemove: [guildScheduledEvent: GuildScheduledEvent, user: User];
5270
+ guildAuditLogEntryCreate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
5271
+ unhandledPacket: [packet: { t?: string; d: any }, shard: number];
5272
+ relationshipAdd: [userId: Snowflake, shouldNotify: boolean];
5273
+ relationshipRemove: [userId: Snowflake, type: RelationshipType, nickname: string | null];
5274
+ relationshipUpdate: [
5275
+ userId: Snowflake,
5276
+ oldData: {
5277
+ nickname: string | null;
5278
+ since: Date;
5279
+ type: RelationshipType;
5280
+ },
5281
+ newData: {
5282
+ nickname: string | null;
5283
+ since: Date;
5284
+ type: RelationshipType;
5285
+ },
5286
+ ];
5287
+ channelRecipientAdd: [channel: GroupDMChannel, user: User];
5288
+ channelRecipientRemove: [channel: GroupDMChannel, user: User];
5289
+ interactionModalCreate: [modal: Modal];
5290
+ callCreate: [call: CallState];
5291
+ callUpdate: [call: CallState];
5292
+ callDelete: [call: CallState];
5293
+ messagePollVoteAdd: [data: MessagePollUserVote];
5294
+ messagePollVoteRemove: [data: MessagePollUserVote];
5295
+ }
5296
+
5661
5297
  export interface ClientFetchInviteOptions {
5662
5298
  guildScheduledEventId?: Snowflake;
5663
5299
  }
5664
5300
 
5301
+ export type CaptchaSolver = (captcha: Captcha, UserAgent: string) => Promise<string>;
5302
+
5303
+ export interface ClientOptions {
5304
+ DMChannelVoiceStatusSync?: number;
5305
+ captchaRetryLimit?: number;
5306
+ captchaSolver?: CaptchaSolver;
5307
+ closeTimeout?: number;
5308
+ makeCache?: CacheFactory;
5309
+ /** @deprecated Pass the value of this property as `lifetime` to `sweepers.messages` instead. */
5310
+ messageCacheLifetime?: number;
5311
+ /** @deprecated Pass the value of this property as `interval` to `sweepers.messages` instead. */
5312
+ messageSweepInterval?: number;
5313
+ allowedMentions?: MessageMentionOptions;
5314
+ invalidRequestWarningInterval?: number;
5315
+ partials?: PartialTypes[];
5316
+ restWsBridgeTimeout?: number;
5317
+ restTimeOffset?: number;
5318
+ restRequestTimeout?: number;
5319
+ restGlobalRateLimit?: number;
5320
+ restSweepInterval?: number;
5321
+ retryLimit?: number;
5322
+ failIfNotExists?: boolean;
5323
+ presence?: PresenceData;
5324
+ waitGuildTimeout?: number;
5325
+ sweepers?: SweeperOptions;
5326
+ ws?: WebSocketOptions;
5327
+ http?: HTTPOptions;
5328
+ rejectOnRateLimit?: string[] | ((data: RateLimitData) => boolean | Promise<boolean>);
5329
+ }
5330
+
5665
5331
  export type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
5666
5332
 
5667
5333
  export interface ClientPresenceStatusData {
@@ -5674,7 +5340,7 @@ export interface ClientUserEditData {
5674
5340
  username?: string;
5675
5341
  avatar?: BufferResolvable | Base64Resolvable | null;
5676
5342
  banner?: BufferResolvable | Base64Resolvable | null;
5677
- bio?: string | null;
5343
+ bio?: string;
5678
5344
  }
5679
5345
 
5680
5346
  export interface CloseEvent {
@@ -5808,6 +5474,109 @@ export interface ConstantsColors {
5808
5474
  NOT_QUITE_BLACK: 0x23272a;
5809
5475
  }
5810
5476
 
5477
+ export interface ConstantsEvents {
5478
+ RATE_LIMIT: 'rateLimit';
5479
+ INVALID_REQUEST_WARNING: 'invalidRequestWarning';
5480
+ API_RESPONSE: 'apiResponse';
5481
+ API_REQUEST: 'apiRequest';
5482
+ CLIENT_READY: 'ready';
5483
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5484
+ APPLICATION_COMMAND_CREATE: 'applicationCommandCreate';
5485
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5486
+ APPLICATION_COMMAND_DELETE: 'applicationCommandDelete';
5487
+ APPLICATION_COMMAND_PERMISSIONS_UPDATE: 'applicationCommandPermissionsUpdate';
5488
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5489
+ APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate';
5490
+ /** @deprecated This event is not received by user accounts. */
5491
+ AUTO_MODERATION_ACTION_EXECUTION: 'autoModerationActionExecution';
5492
+ /** @deprecated This event is not received by user accounts. */
5493
+ AUTO_MODERATION_RULE_CREATE: 'autoModerationRuleCreate';
5494
+ /** @deprecated This event is not received by user accounts. */
5495
+ AUTO_MODERATION_RULE_DELETE: 'autoModerationRuleDelete';
5496
+ /** @deprecated This event is not received by user accounts. */
5497
+ AUTO_MODERATION_RULE_UPDATE: 'autoModerationRuleUpdate';
5498
+ GUILD_AVAILABLE: 'guildAvailable';
5499
+ GUILD_CREATE: 'guildCreate';
5500
+ GUILD_DELETE: 'guildDelete';
5501
+ GUILD_UPDATE: 'guildUpdate';
5502
+ GUILD_UNAVAILABLE: 'guildUnavailable';
5503
+ GUILD_MEMBER_ADD: 'guildMemberAdd';
5504
+ GUILD_MEMBER_REMOVE: 'guildMemberRemove';
5505
+ GUILD_MEMBER_UPDATE: 'guildMemberUpdate';
5506
+ GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable';
5507
+ GUILD_MEMBERS_CHUNK: 'guildMembersChunk';
5508
+ GUILD_INTEGRATIONS_UPDATE: 'guildIntegrationsUpdate';
5509
+ GUILD_ROLE_CREATE: 'roleCreate';
5510
+ GUILD_ROLE_DELETE: 'roleDelete';
5511
+ INVITE_CREATE: 'inviteCreate';
5512
+ INVITE_DELETE: 'inviteDelete';
5513
+ GUILD_ROLE_UPDATE: 'roleUpdate';
5514
+ GUILD_EMOJI_CREATE: 'emojiCreate';
5515
+ GUILD_EMOJI_DELETE: 'emojiDelete';
5516
+ GUILD_EMOJI_UPDATE: 'emojiUpdate';
5517
+ GUILD_BAN_ADD: 'guildBanAdd';
5518
+ GUILD_BAN_REMOVE: 'guildBanRemove';
5519
+ CHANNEL_CREATE: 'channelCreate';
5520
+ CHANNEL_DELETE: 'channelDelete';
5521
+ CHANNEL_UPDATE: 'channelUpdate';
5522
+ CHANNEL_PINS_UPDATE: 'channelPinsUpdate';
5523
+ MESSAGE_CREATE: 'messageCreate';
5524
+ MESSAGE_DELETE: 'messageDelete';
5525
+ MESSAGE_UPDATE: 'messageUpdate';
5526
+ MESSAGE_BULK_DELETE: 'messageDeleteBulk';
5527
+ MESSAGE_REACTION_ADD: 'messageReactionAdd';
5528
+ MESSAGE_REACTION_REMOVE: 'messageReactionRemove';
5529
+ MESSAGE_REACTION_REMOVE_ALL: 'messageReactionRemoveAll';
5530
+ MESSAGE_REACTION_REMOVE_EMOJI: 'messageReactionRemoveEmoji';
5531
+ THREAD_CREATE: 'threadCreate';
5532
+ THREAD_DELETE: 'threadDelete';
5533
+ THREAD_UPDATE: 'threadUpdate';
5534
+ THREAD_LIST_SYNC: 'threadListSync';
5535
+ THREAD_MEMBER_UPDATE: 'threadMemberUpdate';
5536
+ THREAD_MEMBERS_UPDATE: 'threadMembersUpdate';
5537
+ USER_UPDATE: 'userUpdate';
5538
+ PRESENCE_UPDATE: 'presenceUpdate';
5539
+ VOICE_SERVER_UPDATE: 'voiceServerUpdate';
5540
+ VOICE_STATE_UPDATE: 'voiceStateUpdate';
5541
+ TYPING_START: 'typingStart';
5542
+ WEBHOOKS_UPDATE: 'webhookUpdate';
5543
+ ERROR: 'error';
5544
+ WARN: 'warn';
5545
+ DEBUG: 'debug';
5546
+ CACHE_SWEEP: 'cacheSweep';
5547
+ SHARD_DISCONNECT: 'shardDisconnect';
5548
+ SHARD_ERROR: 'shardError';
5549
+ SHARD_RECONNECTING: 'shardReconnecting';
5550
+ SHARD_READY: 'shardReady';
5551
+ SHARD_RESUME: 'shardResume';
5552
+ INVALIDATED: 'invalidated';
5553
+ RAW: 'raw';
5554
+ STAGE_INSTANCE_CREATE: 'stageInstanceCreate';
5555
+ STAGE_INSTANCE_UPDATE: 'stageInstanceUpdate';
5556
+ STAGE_INSTANCE_DELETE: 'stageInstanceDelete';
5557
+ GUILD_STICKER_CREATE: 'stickerCreate';
5558
+ GUILD_STICKER_DELETE: 'stickerDelete';
5559
+ GUILD_STICKER_UPDATE: 'stickerUpdate';
5560
+ GUILD_SCHEDULED_EVENT_CREATE: 'guildScheduledEventCreate';
5561
+ GUILD_SCHEDULED_EVENT_UPDATE: 'guildScheduledEventUpdate';
5562
+ GUILD_SCHEDULED_EVENT_DELETE: 'guildScheduledEventDelete';
5563
+ GUILD_SCHEDULED_EVENT_USER_ADD: 'guildScheduledEventUserAdd';
5564
+ GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove';
5565
+ GUILD_AUDIT_LOG_ENTRY_CREATE: 'guildAuditLogEntryCreate';
5566
+ UNHANDLED_PACKET: 'unhandledPacket';
5567
+ RELATIONSHIP_ADD: 'relationshipAdd';
5568
+ RELATIONSHIP_UPDATE: 'relationshipUpdate';
5569
+ RELATIONSHIP_REMOVE: 'relationshipRemove';
5570
+ CHANNEL_RECIPIENT_ADD: 'channelRecipientAdd';
5571
+ CHANNEL_RECIPIENT_REMOVE: 'channelRecipientRemove';
5572
+ INTERACTION_MODAL_CREATE: 'interactionModalCreate';
5573
+ CALL_CREATE: 'callCreate';
5574
+ CALL_UPDATE: 'callUpdate';
5575
+ CALL_DELETE: 'callDelete';
5576
+ MESSAGE_POLL_VOTE_ADD: 'messagePollVoteAdd';
5577
+ MESSAGE_POLL_VOTE_REMOVE: 'messagePollVoteRemove';
5578
+ }
5579
+
5811
5580
  export interface ConstantsOpcodes {
5812
5581
  DISPATCH: 0;
5813
5582
  HEARTBEAT: 1;
@@ -5821,6 +5590,31 @@ export interface ConstantsOpcodes {
5821
5590
  INVALID_SESSION: 9;
5822
5591
  HELLO: 10;
5823
5592
  HEARTBEAT_ACK: 11;
5593
+ GUILD_SYNC: 12;
5594
+ DM_UPDATE: 13;
5595
+ GUILD_SUBSCRIPTIONS: 14;
5596
+ LOBBY_CONNECT: 15;
5597
+ LOBBY_DISCONNECT: 16;
5598
+ LOBBY_VOICE_STATE_UPDATE: 17;
5599
+ STREAM_CREATE: 18;
5600
+ STREAM_DELETE: 19;
5601
+ STREAM_WATCH: 20;
5602
+ STREAM_PING: 21;
5603
+ STREAM_SET_PAUSED: 22;
5604
+ REQUEST_GUILD_APPLICATION_COMMANDS: 24;
5605
+ EMBEDDED_ACTIVITY_LAUNCH: 25;
5606
+ EMBEDDED_ACTIVITY_CLOSE: 26;
5607
+ EMBEDDED_ACTIVITY_UPDATE: 27;
5608
+ REQUEST_FORUM_UNREADS: 28;
5609
+ REMOTE_COMMAND: 29;
5610
+ GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH: 30;
5611
+ REQUEST_SOUNDBOARD_SOUNDS: 31;
5612
+ SPEED_TEST_CREATE: 32;
5613
+ SPEED_TEST_DELETE: 33;
5614
+ REQUEST_LAST_MESSAGES: 34;
5615
+ SEARCH_RECENT_MEMBERS: 35;
5616
+ REQUEST_CHANNEL_STATUSES: 36;
5617
+ GUILD_SUBSCRIPTIONS_BULK: 37;
5824
5618
  }
5825
5619
 
5826
5620
  export interface ConstantsShardEvents {
@@ -5945,7 +5739,7 @@ export type ExplicitContentFilterLevel = keyof typeof ExplicitContentFilterLevel
5945
5739
 
5946
5740
  export interface FetchApplicationCommandOptions extends BaseFetchOptions {
5947
5741
  guildId?: Snowflake;
5948
- locale?: localeSetting;
5742
+ locale?: LocaleString;
5949
5743
  withLocalizations?: boolean;
5950
5744
  }
5951
5745
 
@@ -6041,6 +5835,7 @@ export interface FetchReactionUsersOptions {
6041
5835
  export interface FetchThreadMemberOptions extends BaseFetchOptions {
6042
5836
  withMember?: boolean;
6043
5837
  }
5838
+
6044
5839
  export interface FetchThreadMembersWithGuildMemberDataOptions {
6045
5840
  withMember: true;
6046
5841
  after?: Snowflake;
@@ -6049,7 +5844,7 @@ export interface FetchThreadMembersWithGuildMemberDataOptions {
6049
5844
  }
6050
5845
 
6051
5846
  export interface FetchThreadMembersWithoutGuildMemberDataOptions {
6052
- withMember: false;
5847
+ withMember?: false;
6053
5848
  cache?: boolean;
6054
5849
  }
6055
5850
 
@@ -6339,6 +6134,12 @@ export interface GuildEditData {
6339
6134
  features?: GuildFeatures[];
6340
6135
  }
6341
6136
 
6137
+ export interface GroupDMChannelEditData {
6138
+ name?: string;
6139
+ icon?: BufferResolvable | Base64Resolvable | null;
6140
+ owner?: UserResolvable;
6141
+ }
6142
+
6342
6143
  export interface GuildEmojiCreateOptions {
6343
6144
  roles?: Collection<Snowflake, Role> | RoleResolvable[];
6344
6145
  reason?: string;
@@ -6364,7 +6165,6 @@ export type GuildFeatures =
6364
6165
  | 'ANIMATED_ICON'
6365
6166
  | 'AUTO_MODERATION'
6366
6167
  | 'BANNER'
6367
- | 'CLYDE_ENABLED'
6368
6168
  | 'COMMERCE'
6369
6169
  | 'COMMUNITY'
6370
6170
  | 'CREATOR_MONETIZABLE_PROVISIONAL'
@@ -6386,8 +6186,8 @@ export type GuildFeatures =
6386
6186
  | 'THREE_DAY_THREAD_ARCHIVE'
6387
6187
  | 'SEVEN_DAY_THREAD_ARCHIVE'
6388
6188
  | 'PRIVATE_THREADS'
6389
- | 'RAID_ALERTS_DISABLED'
6390
6189
  | 'ROLE_ICONS'
6190
+ | 'RAID_ALERTS_DISABLED'
6391
6191
  | 'ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE'
6392
6192
  | 'ROLE_SUBSCRIPTIONS_ENABLED';
6393
6193
 
@@ -6517,6 +6317,7 @@ export interface HTTPAttachmentData {
6517
6317
  export interface HTTPErrorData {
6518
6318
  json: unknown;
6519
6319
  files: HTTPAttachmentData[];
6320
+ headers?: Record<string, string>;
6520
6321
  }
6521
6322
 
6522
6323
  export interface HTTPOptions {
@@ -6592,13 +6393,6 @@ export type IntentsString =
6592
6393
  | 'AUTO_MODERATION_CONFIGURATION'
6593
6394
  | 'AUTO_MODERATION_EXECUTION';
6594
6395
 
6595
- export interface InviteGenerationOptions {
6596
- permissions?: PermissionResolvable;
6597
- guild?: GuildResolvable;
6598
- disableGuildSelect?: boolean;
6599
- scopes: InviteScope[];
6600
- }
6601
-
6602
6396
  export type GuildInvitableChannelResolvable =
6603
6397
  | TextChannel
6604
6398
  | VoiceChannel
@@ -6634,7 +6428,8 @@ export type InviteScope =
6634
6428
  | 'guilds'
6635
6429
  | 'guilds.join'
6636
6430
  | 'gdm.join'
6637
- | 'webhook.incoming';
6431
+ | 'webhook.incoming'
6432
+ | 'role_connections.write';
6638
6433
 
6639
6434
  export interface LifetimeFilterOptions<K, V> {
6640
6435
  excludeFromSweep?: (value: V, key: K, collection: LimitedCollection<K, V>) => boolean;
@@ -6686,6 +6481,7 @@ export interface MessageActivity {
6686
6481
  }
6687
6482
 
6688
6483
  export interface BaseButtonOptions extends BaseMessageComponentOptions {
6484
+ type: 'BUTTON' | MessageComponentTypes.BUTTON;
6689
6485
  disabled?: boolean;
6690
6486
  emoji?: EmojiIdentifierResolvable;
6691
6487
  label?: string;
@@ -6732,35 +6528,16 @@ export type MessageComponentType = keyof typeof MessageComponentTypes;
6732
6528
 
6733
6529
  export type MessageComponentTypeResolvable = MessageComponentType | MessageComponentTypes;
6734
6530
 
6531
+ export type GuildForumThreadMessageCreateOptions = MessageOptions & Pick<MessageOptions, 'flags' | 'stickers'>;
6532
+
6735
6533
  export interface MessageEditOptions {
6736
6534
  attachments?: MessageAttachment[];
6737
6535
  content?: string | null;
6738
- id?: Snowflake | number;
6739
- parentId?: Snowflake | number;
6740
- type?: ExcludeEnum<
6741
- typeof ChannelTypes,
6742
- | 'DM'
6743
- | 'GROUP_DM'
6744
- | 'GUILD_NEWS'
6745
- | 'GUILD_STORE'
6746
- | 'UNKNOWN'
6747
- | 'GUILD_NEWS_THREAD'
6748
- | 'GUILD_PUBLIC_THREAD'
6749
- | 'GUILD_PRIVATE_THREAD'
6750
- | 'GUILD_STAGE_VOICE'
6751
- >;
6752
- name: string;
6753
- topic?: string;
6754
- nsfw?: boolean;
6755
- bitrate?: number;
6756
- userLimit?: number;
6757
- rtcRegion?: string | null;
6758
- videoQualityMode?: VideoQualityMode;
6759
- permissionOverwrites?: PartialOverwriteData[];
6760
- rateLimitPerUser?: number;
6761
- availableTags?: GuildForumTagData[];
6762
- defaultReactionEmoji?: DefaultReactionEmoji;
6763
- defaultThreadRateLimitPerUser?: number;
6536
+ embeds?: (MessageEmbed | MessageEmbedOptions | APIEmbed)[] | null;
6537
+ files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
6538
+ flags?: BitFieldResolvable<MessageFlagsString, number>;
6539
+ allowedMentions?: MessageMentionOptions;
6540
+ components?: (MessageActionRow | (Required<BaseMessageComponentOptions> & MessageActionRowOptions))[];
6764
6541
  }
6765
6542
 
6766
6543
  export interface MessageEmbedAuthor {
@@ -6863,15 +6640,15 @@ export interface MessageOptions {
6863
6640
  tts?: boolean;
6864
6641
  nonce?: string | number;
6865
6642
  content?: string | null;
6866
- embeds?: (WebEmbed | MessageEmbed | MessageEmbedOptions | APIEmbed)[];
6643
+ embeds?: (MessageEmbed | MessageEmbedOptions | APIEmbed)[];
6867
6644
  components?: (MessageActionRow | (Required<BaseMessageComponentOptions> & MessageActionRowOptions))[];
6868
6645
  allowedMentions?: MessageMentionOptions;
6869
6646
  files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
6870
6647
  reply?: ReplyOptions;
6871
6648
  stickers?: StickerResolvable[];
6872
6649
  attachments?: MessageAttachment[];
6873
- flags?: BitFieldResolvable<'SUPPRESS_EMBEDS' | 'SUPPRESS_NOTIFICATIONS', number>;
6874
- usingNewAttachmentAPI?: boolean;
6650
+ flags?: BitFieldResolvable<'SUPPRESS_EMBEDS' | 'SUPPRESS_NOTIFICATIONS' | 'IS_VOICE_MESSAGE', number>;
6651
+ poll?: MessagePoll;
6875
6652
  }
6876
6653
 
6877
6654
  export type MessageReactionResolvable = MessageReaction | Snowflake | string;
@@ -6892,12 +6669,9 @@ export interface BaseMessageSelectMenuOptions {
6892
6669
  minValues?: number;
6893
6670
  placeholder?: string;
6894
6671
  }
6672
+
6895
6673
  export interface StringMessageSelectMenuOptions extends BaseMessageSelectMenuOptions {
6896
- type?:
6897
- | 'STRING_SELECT'
6898
- | 'SELECT_MENU'
6899
- | SelectMenuComponentTypes.STRING_SELECT
6900
- | SelectMenuComponentTypes.SELECT_MENU;
6674
+ type?: 'STRING_SELECT' | SelectMenuComponentTypes.STRING_SELECT;
6901
6675
  options?: MessageSelectOptionData[];
6902
6676
  }
6903
6677
 
@@ -7050,7 +6824,14 @@ export type PermissionString =
7050
6824
  | 'MANAGE_EVENTS'
7051
6825
  | 'VIEW_CREATOR_MONETIZATION_ANALYTICS'
7052
6826
  | 'USE_SOUNDBOARD'
7053
- | 'SEND_VOICE_MESSAGES';
6827
+ | 'CREATE_GUILD_EXPRESSIONS'
6828
+ | 'CREATE_EVENTS'
6829
+ | 'USE_EXTERNAL_SOUNDS'
6830
+ | 'SEND_VOICE_MESSAGES'
6831
+ | 'USE_CLYDE_AI'
6832
+ | 'SET_VOICE_CHANNEL_STATUS'
6833
+ | 'SEND_POLLS'
6834
+ | 'USE_EXTERNAL_APPS';
7054
6835
 
7055
6836
  export type RecursiveArray<T> = ReadonlyArray<T | RecursiveArray<T>>;
7056
6837
 
@@ -7065,7 +6846,7 @@ export type PremiumTier = keyof typeof PremiumTiers;
7065
6846
  export interface PresenceData {
7066
6847
  status?: PresenceStatusData;
7067
6848
  afk?: boolean;
7068
- activities?: ActivitiesOptions[];
6849
+ activities?: (ActivitiesOptions | RichPresence | SpotifyRPC | CustomStatus)[];
7069
6850
  shardId?: number | number[];
7070
6851
  }
7071
6852
 
@@ -7095,6 +6876,9 @@ export interface PartialChannelData {
7095
6876
  videoQualityMode?: VideoQualityMode;
7096
6877
  permissionOverwrites?: PartialOverwriteData[];
7097
6878
  rateLimitPerUser?: number;
6879
+ availableTags?: GuildForumTagData[];
6880
+ defaultReactionEmoji?: DefaultReactionEmoji;
6881
+ defaultThreadRateLimitPerUser?: number;
7098
6882
  }
7099
6883
 
7100
6884
  export type Partialize<
@@ -7255,11 +7039,6 @@ export interface StartThreadOptions {
7255
7039
  rateLimitPerUser?: number;
7256
7040
  }
7257
7041
 
7258
- export interface MessageButtonLocation {
7259
- row: number;
7260
- col: number;
7261
- }
7262
-
7263
7042
  export type Status = number;
7264
7043
 
7265
7044
  export type StickerFormatType = keyof typeof StickerFormatTypes;
@@ -7278,6 +7057,10 @@ export type SystemChannelFlagsString =
7278
7057
 
7279
7058
  export type SystemChannelFlagsResolvable = BitFieldResolvable<SystemChannelFlagsString, number>;
7280
7059
 
7060
+ export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString, number>;
7061
+
7062
+ export type SelectMenuComponentType = keyof typeof SelectMenuComponentTypes;
7063
+
7281
7064
  export type SystemMessageType = Exclude<
7282
7065
  MessageType,
7283
7066
  'DEFAULT' | 'REPLY' | 'APPLICATION_COMMAND' | 'CONTEXT_MENU_COMMAND'
@@ -7352,13 +7135,9 @@ export type AnyChannel =
7352
7135
  | TextChannel
7353
7136
  | ThreadChannel
7354
7137
  | VoiceChannel
7355
- | ForumChannel
7356
- | PartialGroupDMChannel;
7138
+ | ForumChannel;
7357
7139
 
7358
- export type TextBasedChannel = Exclude<
7359
- Extract<AnyChannel, { messages: MessageManager; interactions: InteractionManager }>,
7360
- ForumChannel
7361
- >;
7140
+ export type TextBasedChannel = Exclude<Extract<AnyChannel, { messages: MessageManager }>, ForumChannel>;
7362
7141
 
7363
7142
  export type TextBasedChannelTypes = TextBasedChannel['type'];
7364
7143
 
@@ -7406,6 +7185,11 @@ export interface GuildTextThreadCreateOptions<AllowedThreadType> extends StartTh
7406
7185
  rateLimitPerUser?: number;
7407
7186
  }
7408
7187
 
7188
+ export interface GuildForumThreadCreateOptions extends StartThreadOptions {
7189
+ message: GuildForumThreadMessageCreateOptions | MessagePayload;
7190
+ appliedTags?: Snowflake[];
7191
+ }
7192
+
7409
7193
  export interface ThreadEditData {
7410
7194
  name?: string;
7411
7195
  archived?: boolean;
@@ -7426,38 +7210,17 @@ export type UserFlagsString =
7426
7210
  | 'PARTNERED_SERVER_OWNER'
7427
7211
  | 'HYPESQUAD_EVENTS'
7428
7212
  | 'BUGHUNTER_LEVEL_1'
7429
- | 'MFA_SMS'
7430
- | 'PREMIUM_PROMO_DISMISSED'
7431
7213
  | 'HOUSE_BRAVERY'
7432
7214
  | 'HOUSE_BRILLIANCE'
7433
7215
  | 'HOUSE_BALANCE'
7434
7216
  | 'EARLY_SUPPORTER'
7435
7217
  | 'TEAM_USER'
7436
- | 'INTERNAL_APPLICATION'
7437
- | 'SYSTEM'
7438
- | 'HAS_UNREAD_URGENT_MESSAGES'
7439
7218
  | 'BUGHUNTER_LEVEL_2'
7440
- | 'UNDERAGE_DELETED'
7441
7219
  | 'VERIFIED_BOT'
7442
7220
  | 'EARLY_VERIFIED_BOT_DEVELOPER'
7443
7221
  | 'DISCORD_CERTIFIED_MODERATOR'
7444
7222
  | 'BOT_HTTP_INTERACTIONS'
7445
- | 'SPAMMER'
7446
- | 'DISABLE_PREMIUM'
7447
- | 'ACTIVE_DEVELOPER'
7448
- | 'HIGH_GLOBAL_RATE_LIMIT'
7449
- | 'DELETED'
7450
- | 'DISABLED_SUSPICIOUS_ACTIVITY'
7451
- | 'SELF_DELETED'
7452
- | 'PREMIUM_DISCRIMINATOR'
7453
- | 'USED_DESKTOP_CLIENT'
7454
- | 'USED_WEB_CLIENT'
7455
- | 'USED_MOBILE_CLIENT'
7456
- | 'DISABLED'
7457
- | 'VERIFIED_EMAIL'
7458
- | 'QUARANTINED'
7459
- | 'COLLABORATOR'
7460
- | 'RESTRICTED_COLLABORATOR';
7223
+ | 'ACTIVE_DEVELOPER';
7461
7224
 
7462
7225
  export type UserMention = `<@${Snowflake}>`;
7463
7226
 
@@ -7487,6 +7250,15 @@ export interface WebhookClientDataURL {
7487
7250
  url: string;
7488
7251
  }
7489
7252
 
7253
+ export type FriendRequestOptions =
7254
+ | {
7255
+ user: UserResolvable;
7256
+ }
7257
+ | {
7258
+ username: string;
7259
+ discriminator: number | null;
7260
+ };
7261
+
7490
7262
  export type WebhookClientOptions = Pick<
7491
7263
  ClientOptions,
7492
7264
  'allowedMentions' | 'restTimeOffset' | 'restRequestTimeout' | 'retryLimit' | 'http'
@@ -7502,7 +7274,6 @@ export type WebhookEditMessageOptions = Pick<
7502
7274
  WebhookMessageOptions,
7503
7275
  'content' | 'embeds' | 'files' | 'allowedMentions' | 'components' | 'attachments' | 'threadId'
7504
7276
  >;
7505
-
7506
7277
  export interface InteractionEditReplyOptions extends WebhookEditMessageOptions {
7507
7278
  message?: MessageResolvable | '@original';
7508
7279
  }
@@ -7522,6 +7293,7 @@ export interface WebhookMessageOptions extends Omit<MessageOptions, 'reply' | 's
7522
7293
  export type WebhookType = keyof typeof WebhookTypes;
7523
7294
 
7524
7295
  export interface WebSocketOptions {
7296
+ agent?: Omit<AgentOptions, 'keepAlive'>;
7525
7297
  compress?: boolean;
7526
7298
  properties?: WebSocketProperties;
7527
7299
  }
@@ -7563,11 +7335,10 @@ export interface WelcomeScreenEditData {
7563
7335
  export type WSEventType =
7564
7336
  | 'READY'
7565
7337
  | 'RESUMED'
7566
- | 'APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE'
7567
7338
  | 'APPLICATION_COMMAND_CREATE'
7568
7339
  | 'APPLICATION_COMMAND_DELETE'
7569
- | 'APPLICATION_COMMAND_UPDATE'
7570
7340
  | 'APPLICATION_COMMAND_PERMISSIONS_UPDATE'
7341
+ | 'APPLICATION_COMMAND_UPDATE'
7571
7342
  | 'AUTO_MODERATION_ACTION_EXECUTION'
7572
7343
  | 'AUTO_MODERATION_RULE_CREATE'
7573
7344
  | 'AUTO_MODERATION_RULE_DELETE'
@@ -7658,85 +7429,4 @@ export type InternalDiscordGatewayAdapterCreator = (
7658
7429
  methods: InternalDiscordGatewayAdapterLibraryMethods,
7659
7430
  ) => InternalDiscordGatewayAdapterImplementerMethods;
7660
7431
 
7661
- // GuildForum
7662
- export type ChannelFlagsString = 'PINNED' | 'REQUIRE_TAG';
7663
- export class ChannelFlags extends BitField<ChannelFlagsString> {
7664
- public static FLAGS: Record<ChannelFlagsString, number>;
7665
- public static resolve(bit?: BitFieldResolvable<ChannelFlagsString, number>): number;
7666
- }
7667
-
7668
- export interface GuildForumTagEmoji {
7669
- id: Snowflake | null;
7670
- name: string | null;
7671
- }
7672
-
7673
- export interface GuildForumTag {
7674
- id: Snowflake;
7675
- name: string;
7676
- moderated: boolean;
7677
- emoji: GuildForumTagEmoji | null;
7678
- }
7679
-
7680
- export type GuildForumTagData = Partial<GuildForumTag> & { name: string };
7681
-
7682
- export interface DefaultReactionEmoji {
7683
- id: Snowflake | null;
7684
- name: string | null;
7685
- }
7686
-
7687
- export class ForumChannel extends TextBasedChannelMixin(GuildChannel, [
7688
- 'send',
7689
- 'lastMessage',
7690
- 'lastPinAt',
7691
- 'bulkDelete',
7692
- 'sendTyping',
7693
- 'createMessageCollector',
7694
- 'awaitMessages',
7695
- 'createMessageComponentCollector',
7696
- 'awaitMessageComponent',
7697
- ]) {
7698
- public type: 'GUILD_FORUM';
7699
- public threads: GuildForumThreadManager;
7700
- public availableTags: GuildForumTag[];
7701
- public defaultReactionEmoji: DefaultReactionEmoji | null;
7702
- public defaultThreadRateLimitPerUser: number | null;
7703
- public rateLimitPerUser: number | null;
7704
- public defaultAutoArchiveDuration: ThreadAutoArchiveDuration | null;
7705
- public nsfw: boolean;
7706
- public topic: string | null;
7707
- public defaultSortOrder: SortOrderType | null;
7708
- public defaultForumLayout: ForumLayoutType;
7709
- public setAvailableTags(tags: GuildForumTagData[], reason?: string): Promise<this>;
7710
- public setDefaultReactionEmoji(emojiId: DefaultReactionEmoji | null, reason?: string): Promise<this>;
7711
- public setDefaultThreadRateLimitPerUser(rateLimit: number, reason?: string): Promise<this>;
7712
- public createInvite(options?: CreateInviteOptions): Promise<Invite>;
7713
- public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
7714
- public setDefaultAutoArchiveDuration(
7715
- defaultAutoArchiveDuration: ThreadAutoArchiveDuration,
7716
- reason?: string,
7717
- ): Promise<this>;
7718
- public setTopic(topic: string | null, reason?: string): Promise<this>;
7719
- public setDefaultSortOrder(defaultSortOrder: SortOrderType | null, reason?: string): Promise<this>;
7720
- public setDefaultForumLayout(defaultForumLayout: ForumLayoutType, reason?: string): Promise<this>;
7721
- }
7722
-
7723
- export class GuildTextThreadManager<AllowedThreadType> extends ThreadManager {
7724
- public create(options: GuildTextThreadCreateOptions<AllowedThreadType>): Promise<ThreadChannel>;
7725
- }
7726
-
7727
- export class GuildForumThreadManager extends ThreadManager {
7728
- public create(options: GuildForumThreadCreateOptions): Promise<ThreadChannel>;
7729
- }
7730
-
7731
- export type GuildForumThreadMessageCreateOptions = MessageOptions & Pick<MessageOptions, 'flags' | 'stickers'>;
7732
-
7733
- export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString, number>;
7734
-
7735
- export type SelectMenuComponentType = keyof typeof SelectMenuComponentTypes;
7736
-
7737
- export interface GuildForumThreadCreateOptions extends StartThreadOptions {
7738
- message: GuildForumThreadMessageCreateOptions | MessagePayload;
7739
- appliedTags?: Snowflake[];
7740
- }
7741
-
7742
7432
  //#endregion