djs-selfbot-v13 1.0.0 → 3.1.4

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 (152) hide show
  1. package/README.md +15 -42
  2. package/package.json +9 -24
  3. package/src/client/BaseClient.js +2 -3
  4. package/src/client/Client.js +187 -539
  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 +1 -1
  12. package/src/client/actions/GuildMemberUpdate.js +1 -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 +7 -0
  23. package/src/client/websocket/handlers/GUILD_MEMBER_ADD.js +1 -1
  24. package/src/client/websocket/handlers/INTERACTION_MODAL_CREATE.js +1 -0
  25. package/src/client/websocket/handlers/READY.js +47 -137
  26. package/src/client/websocket/handlers/RELATIONSHIP_ADD.js +7 -5
  27. package/src/client/websocket/handlers/RELATIONSHIP_REMOVE.js +6 -4
  28. package/src/client/websocket/handlers/RELATIONSHIP_UPDATE.js +32 -9
  29. package/src/client/websocket/handlers/USER_GUILD_SETTINGS_UPDATE.js +2 -8
  30. package/src/client/websocket/handlers/USER_NOTE_UPDATE.js +1 -1
  31. package/src/client/websocket/handlers/USER_REQUIRED_ACTION_UPDATE.js +78 -0
  32. package/src/client/websocket/handlers/USER_SETTINGS_UPDATE.js +1 -5
  33. package/src/client/websocket/handlers/VOICE_CHANNEL_STATUS_UPDATE.js +12 -0
  34. package/src/client/websocket/handlers/index.js +15 -20
  35. package/src/errors/Messages.js +24 -69
  36. package/src/index.js +12 -43
  37. package/src/managers/ApplicationCommandManager.js +9 -12
  38. package/src/managers/ApplicationCommandPermissionsManager.js +3 -11
  39. package/src/managers/ChannelManager.js +3 -4
  40. package/src/managers/ClientUserSettingManager.js +161 -279
  41. package/src/managers/GuildBanManager.js +1 -1
  42. package/src/managers/GuildChannelManager.js +2 -0
  43. package/src/managers/GuildForumThreadManager.js +22 -28
  44. package/src/managers/GuildMemberManager.js +40 -216
  45. package/src/managers/GuildSettingManager.js +22 -15
  46. package/src/managers/MessageManager.js +42 -44
  47. package/src/managers/PermissionOverwriteManager.js +1 -1
  48. package/src/managers/ReactionUserManager.js +5 -5
  49. package/src/managers/RelationshipManager.js +81 -74
  50. package/src/managers/ThreadManager.js +12 -45
  51. package/src/managers/ThreadMemberManager.js +1 -1
  52. package/src/managers/UserManager.js +6 -10
  53. package/src/managers/UserNoteManager.js +53 -0
  54. package/src/rest/APIRequest.js +42 -20
  55. package/src/rest/DiscordAPIError.js +17 -16
  56. package/src/rest/RESTManager.js +1 -21
  57. package/src/rest/RequestHandler.js +35 -21
  58. package/src/structures/ApplicationCommand.js +19 -456
  59. package/src/structures/ApplicationRoleConnectionMetadata.js +3 -0
  60. package/src/structures/AutoModerationRule.js +5 -5
  61. package/src/structures/AutocompleteInteraction.js +1 -0
  62. package/src/structures/BaseGuildTextChannel.js +10 -12
  63. package/src/structures/BaseGuildVoiceChannel.js +16 -18
  64. package/src/structures/{Call.js → CallState.js} +17 -12
  65. package/src/structures/CategoryChannel.js +2 -0
  66. package/src/structures/Channel.js +2 -3
  67. package/src/structures/ClientPresence.js +12 -8
  68. package/src/structures/ClientUser.js +124 -310
  69. package/src/structures/ContextMenuInteraction.js +1 -1
  70. package/src/structures/DMChannel.js +29 -92
  71. package/src/structures/ForumChannel.js +0 -10
  72. package/src/structures/GroupDMChannel.js +387 -0
  73. package/src/structures/Guild.js +135 -271
  74. package/src/structures/GuildAuditLogs.js +0 -5
  75. package/src/structures/GuildChannel.js +16 -2
  76. package/src/structures/GuildMember.js +27 -145
  77. package/src/structures/Interaction.js +1 -62
  78. package/src/structures/Invite.js +35 -52
  79. package/src/structures/Message.js +250 -202
  80. package/src/structures/MessageAttachment.js +11 -0
  81. package/src/structures/MessageButton.js +1 -67
  82. package/src/structures/MessageEmbed.js +1 -1
  83. package/src/structures/MessageMentions.js +3 -2
  84. package/src/structures/MessagePayload.js +4 -46
  85. package/src/structures/MessageReaction.js +1 -1
  86. package/src/structures/MessageSelectMenu.js +1 -252
  87. package/src/structures/Modal.js +75 -180
  88. package/src/structures/Presence.js +2 -2
  89. package/src/structures/RichPresence.js +14 -34
  90. package/src/structures/Role.js +18 -2
  91. package/src/structures/SelectMenuInteraction.js +2 -151
  92. package/src/structures/Team.js +0 -49
  93. package/src/structures/TextInputComponent.js +0 -70
  94. package/src/structures/ThreadChannel.js +0 -19
  95. package/src/structures/User.js +117 -345
  96. package/src/structures/UserContextMenuInteraction.js +2 -2
  97. package/src/structures/VoiceState.js +74 -39
  98. package/src/structures/WebEmbed.js +38 -52
  99. package/src/structures/Webhook.js +17 -11
  100. package/src/structures/interfaces/Application.js +146 -23
  101. package/src/structures/interfaces/TextBasedChannel.js +411 -256
  102. package/src/util/ApplicationFlags.js +1 -1
  103. package/src/util/AttachmentFlags.js +38 -0
  104. package/src/util/Constants.js +106 -284
  105. package/src/util/Formatters.js +16 -2
  106. package/src/util/InviteFlags.js +29 -0
  107. package/src/util/LimitedCollection.js +1 -1
  108. package/src/util/Options.js +48 -68
  109. package/src/util/Permissions.js +5 -0
  110. package/src/util/PurchasedFlags.js +2 -0
  111. package/src/util/RemoteAuth.js +221 -356
  112. package/src/util/RoleFlags.js +37 -0
  113. package/src/util/Sweepers.js +1 -1
  114. package/src/util/Util.js +76 -36
  115. package/typings/enums.d.ts +18 -73
  116. package/typings/index.d.ts +874 -1225
  117. package/typings/rawDataTypes.d.ts +68 -9
  118. package/LICENSE +0 -674
  119. package/src/client/actions/InteractionCreate.js +0 -115
  120. package/src/client/websocket/handlers/APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE.js +0 -23
  121. package/src/client/websocket/handlers/GUILD_APPLICATION_COMMANDS_UPDATE.js +0 -11
  122. package/src/client/websocket/handlers/GUILD_MEMBER_LIST_UPDATE.js +0 -55
  123. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUNDS_UPDATE.js +0 -0
  124. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_CREATE.js +0 -0
  125. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_DELETE.js +0 -0
  126. package/src/client/websocket/handlers/GUILD_SOUNDBOARD_SOUND_UPDATE.js +0 -0
  127. package/src/client/websocket/handlers/INTERACTION_CREATE.js +0 -16
  128. package/src/client/websocket/handlers/INTERACTION_FAILURE.js +0 -18
  129. package/src/client/websocket/handlers/INTERACTION_SUCCESS.js +0 -30
  130. package/src/client/websocket/handlers/MESSAGE_ACK.js +0 -16
  131. package/src/client/websocket/handlers/SOUNDBOARD_SOUNDS.js +0 -0
  132. package/src/client/websocket/handlers/VOICE_CHANNEL_EFFECT_SEND.js +0 -0
  133. package/src/managers/DeveloperPortalManager.js +0 -104
  134. package/src/managers/GuildApplicationCommandManager.js +0 -28
  135. package/src/managers/GuildFolderManager.js +0 -24
  136. package/src/managers/SessionManager.js +0 -57
  137. package/src/rest/CaptchaSolver.js +0 -132
  138. package/src/structures/ClientApplication.js +0 -204
  139. package/src/structures/DeveloperPortalApplication.js +0 -520
  140. package/src/structures/GuildFolder.js +0 -75
  141. package/src/structures/InteractionResponse.js +0 -114
  142. package/src/structures/PartialGroupDMChannel.js +0 -433
  143. package/src/structures/Session.js +0 -81
  144. package/src/util/Voice.js +0 -1456
  145. package/src/util/arRPC/index.js +0 -229
  146. package/src/util/arRPC/process/detectable.json +0 -1
  147. package/src/util/arRPC/process/index.js +0 -102
  148. package/src/util/arRPC/process/native/index.js +0 -5
  149. package/src/util/arRPC/process/native/linux.js +0 -37
  150. package/src/util/arRPC/process/native/win32.js +0 -25
  151. package/src/util/arRPC/transports/ipc.js +0 -281
  152. 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,13 @@ 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
+ RelationshipTypes,
102
+ SelectMenuComponentTypes,
103
+ InviteType,
112
104
  } from './enums';
113
105
  import {
114
106
  APIApplicationRoleConnectionMetadata,
@@ -120,7 +112,6 @@ import {
120
112
  RawApplicationData,
121
113
  RawBaseGuildData,
122
114
  RawChannelData,
123
- RawClientApplicationData,
124
115
  RawDMChannelData,
125
116
  RawEmojiData,
126
117
  RawGuildAuditLogData,
@@ -173,107 +164,10 @@ import {
173
164
  RawWidgetData,
174
165
  RawWidgetMemberData,
175
166
  } 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
167
 
261
- export interface RPCActivityData {
262
- activity?: RichPresence;
263
- pid: number;
264
- socketId: string;
265
- }
168
+ //#region Classes
266
169
 
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
- // RPC by aiko-chan-ai
170
+ // RPC by 002-sans
277
171
  export interface RichButton {
278
172
  name: string;
279
173
  url: string;
@@ -298,9 +192,9 @@ export class RichPresence {
298
192
  public type: ActivityType;
299
193
  public url: string | null;
300
194
  public ipc: boolean;
301
- public setAssetsLargeImage(image?: any): this;
195
+ public setAssetsLargeImage(image?: string): this;
302
196
  public setAssetsLargeText(text?: string): this;
303
- public setAssetsSmallImage(image?: any): this;
197
+ public setAssetsSmallImage(image?: string): this;
304
198
  public setAssetsSmallText(text?: string): this;
305
199
  public setName(name?: string): this;
306
200
  public setURL(url?: string): this;
@@ -319,11 +213,31 @@ export class RichPresence {
319
213
  image1: string,
320
214
  image2: string,
321
215
  ): Promise<ExternalAssets[]>;
322
- public static getUUID(): string;
323
216
  public toJSON(): object;
324
217
  public toString(): string;
325
218
  }
326
219
 
220
+ export class DiscordAuthWebsocket extends EventEmitter {
221
+ constructor();
222
+ public token: string;
223
+ public readonly user: {
224
+ id: Snowflake;
225
+ username: string;
226
+ discriminator: number;
227
+ avatar: string;
228
+ };
229
+ public readonly exprire: Date;
230
+ public readonly AuthURL: string;
231
+ public connect(client?: Client): Promise<void>;
232
+ public destroy(): void;
233
+ public generateQR(): void;
234
+ public on(event: 'ready', listener: (client: this) => void): this;
235
+ public on(event: 'finish', listener: (token: string) => void): this;
236
+ public on(event: 'cancel' | 'pending', listener: (user: RawUserData) => void): this;
237
+ public on(event: 'closed', listener: () => void): this;
238
+ public on(event: string, listener: (...args: any[]) => Awaitable<void>): this;
239
+ }
240
+
327
241
  export interface ExternalAssets {
328
242
  url: string;
329
243
  external_asset_path: string;
@@ -420,6 +334,11 @@ export class PremiumUsageFlags extends BitField<PremiumUsageFlagsString> {
420
334
  public static resolve(bit?: BitFieldResolvable<PremiumUsageFlagsString, number>): number;
421
335
  }
422
336
 
337
+ export class InviteFlags extends BitField<InviteFlagsString> {
338
+ public static FLAGS: Record<InviteFlagsString, number>;
339
+ public static resolve(bit?: BitFieldResolvable<InviteFlagsString, number>): number;
340
+ }
341
+
423
342
  export abstract class AnonymousGuild extends BaseGuild {
424
343
  protected constructor(client: Client, data: RawAnonymousGuildData, immediatePatch?: boolean);
425
344
  public banner: string | null;
@@ -442,103 +361,43 @@ export abstract class Application extends Base {
442
361
  public id: Snowflake;
443
362
  public name: string | null;
444
363
  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);
364
+ public approximateGuildCount: number | null;
474
365
  public botPublic: boolean | null;
475
366
  public botRequireCodeGrant: boolean | null;
476
367
  public commands: ApplicationCommandManager;
477
368
  public cover: string | null;
478
369
  public flags: Readonly<ApplicationFlags>;
370
+ public guildId: Snowflake | null;
371
+ public readonly guild: Guild | null;
479
372
  public tags: string[];
480
373
  public installParams: ClientApplicationInstallParams | null;
481
374
  public customInstallURL: string | null;
482
375
  public owner: User | Team | null;
483
376
  public readonly partial: boolean;
484
377
  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>;
378
+ public fetch(): Promise<Application>;
379
+ public fetchRoleConnectionMetadataRecords(): Promise<ApplicationRoleConnectionMetadata[]>;
499
380
  public coverURL(options?: StaticImageURLOptions): string | null;
500
381
  /** @deprecated This method is deprecated as it is unsupported and will be removed in the next major version. */
501
382
  public fetchAssets(): Promise<ApplicationAsset[]>;
502
383
  public iconURL(options?: StaticImageURLOptions): string | null;
503
384
  public toJSON(): unknown;
504
385
  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
386
  }
530
387
 
531
388
  export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
532
- private constructor(client: Client, data: RawApplicationCommandData);
389
+ private constructor(client: Client, data: RawApplicationCommandData, guild?: Guild, guildId?: Snowflake);
533
390
  public applicationId: Snowflake;
534
391
  public readonly createdAt: Date;
535
392
  public readonly createdTimestamp: number;
536
393
  /** @deprecated Use {@link defaultMemberPermissions} and {@link dmPermission} instead. */
537
394
  public defaultPermission: boolean;
395
+ public defaultMemberPermissions: Readonly<Permissions> | null;
538
396
  public description: string;
539
397
  public descriptionLocalizations: LocalizationMap | null;
540
398
  public descriptionLocalized: string | null;
541
- public readonly guild: Guild | null;
399
+ public dmPermission: boolean | null;
400
+ public guild: Guild | null;
542
401
  public guildId: Snowflake | null;
543
402
  public readonly manager: ApplicationCommandManager;
544
403
  public id: Snowflake;
@@ -587,13 +446,6 @@ export class ApplicationCommand<PermissionsFetchType = {}> extends Base {
587
446
  private static transformOption(option: ApplicationCommandOptionData, received?: boolean): unknown;
588
447
  private static transformCommand(command: ApplicationCommandData): RESTPostAPIApplicationCommandsJSONBody;
589
448
  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
449
  }
598
450
 
599
451
  export class ApplicationRoleConnectionMetadata {
@@ -768,6 +620,7 @@ export class BaseGuildEmoji extends Emoji {
768
620
  export class BaseGuildTextChannel extends TextBasedChannelMixin(GuildChannel) {
769
621
  protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean);
770
622
  public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
623
+ public defaultThreadRateLimitPerUser: number | null;
771
624
  public rateLimitPerUser: number | null;
772
625
  public nsfw: boolean;
773
626
  public threads: GuildTextThreadManager<AllowedThreadTypeForTextChannel | AllowedThreadTypeForNewsChannel>;
@@ -794,6 +647,7 @@ export class BaseGuildVoiceChannel extends TextBasedChannelMixin(GuildChannel, [
794
647
  public rateLimitPerUser: number | null;
795
648
  public userLimit: number;
796
649
  public videoQualityMode: VideoQualityMode | null;
650
+ public status?: string;
797
651
  public createInvite(options?: CreateInviteOptions): Promise<Invite>;
798
652
  public setRTCRegion(rtcRegion: string | null, reason?: string): Promise<this>;
799
653
  public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
@@ -885,7 +739,6 @@ export class CategoryChannel extends GuildChannel {
885
739
  name: string,
886
740
  options: CategoryCreateChannelOptions & { type: T },
887
741
  ): Promise<MappedChannelCategoryTypes[T]>;
888
-
889
742
  /** @deprecated See [Self-serve Game Selling Deprecation](https://support-dev.discord.com/hc/en-us/articles/6309018858647) for more information */
890
743
  public createChannel(
891
744
  name: string,
@@ -917,31 +770,12 @@ export abstract class Channel extends Base {
917
770
 
918
771
  export type If<T extends boolean, A, B = null> = T extends true ? A : T extends false ? B : A | B;
919
772
 
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
773
  export class Client<Ready extends boolean = boolean> extends BaseClient {
929
- public constructor(options?: ClientOptions); /* Bug report by Mavri#0001 [721347809667973141] */
774
+ public constructor(options?: ClientOptions);
930
775
  private actions: unknown;
931
776
  private presence: ClientPresence;
932
777
  private _eval(script: string): unknown;
933
778
  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
779
  public channels: ChannelManager;
946
780
  public readonly emojis: BaseGuildEmojiManager;
947
781
  public guilds: GuildManager;
@@ -956,36 +790,36 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
956
790
  public users: UserManager;
957
791
  public voice: ClientVoiceManager;
958
792
  public ws: WebSocketManager;
959
- public password: string | null;
960
- public readonly sessionId: string | null;
793
+ public notes: UserNoteManager;
794
+ public relationships: RelationshipManager;
795
+ public voiceStates: VoiceStateManager;
796
+ public presences: PresenceManager;
797
+ public billing: BillingManager;
798
+ public settings: ClientUserSettingManager;
799
+ public readonly sessionId: If<Ready, string, undefined>;
961
800
  public destroy(): void;
962
- public logout(): Promise<void>;
963
801
  public fetchGuildPreview(guild: GuildResolvable): Promise<GuildPreview>;
964
802
  public fetchInvite(invite: InviteResolvable, options?: ClientFetchInviteOptions): Promise<Invite>;
965
- public acceptInvite(invite: InviteResolvable): Promise<undefined>;
966
803
  public fetchGuildTemplate(template: GuildTemplateResolvable): Promise<GuildTemplate>;
967
804
  public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
968
805
  public fetchSticker(id: Snowflake): Promise<Sticker>;
969
806
  public fetchPremiumStickerPacks(): Promise<Collection<Snowflake, StickerPack>>;
970
807
  public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
971
808
  public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>;
972
- public redeemNitro(code: string, channel?: TextChannelResolvable, paymentSourceId?: Snowflake): object;
973
- public generateInvite(options?: InviteGenerationOptions): string;
809
+ public sleep(timeout: number): Promise<void>;
974
810
  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>;
811
+ public QRLogin(): Promise<void>;
812
+ public logout(): Promise<void>;
981
813
  public isReady(): this is Client<true>;
982
814
  /** @deprecated Use {@link Sweepers#sweepMessages} instead */
983
815
  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
816
  public toJSON(): unknown;
817
+ public acceptInvite(
818
+ invite: InviteResolvable,
819
+ options?: AcceptInviteOptions,
820
+ ): Promise<Guild | DMChannel | GroupDMChannel>;
821
+ public redeemNitro(nitro: string, channel?: TextChannelResolvable, paymentSourceId?: Snowflake): Promise<any>;
822
+ public authorizeURL(url: string, options?: OAuth2AuthorizeOptions): Promise<any>;
989
823
 
990
824
  public on<K extends keyof ClientEvents>(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>): this;
991
825
  public on<S extends string | symbol>(
@@ -1012,25 +846,17 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
1012
846
  public removeAllListeners<S extends string | symbol>(event?: Exclude<S, keyof ClientEvents>): this;
1013
847
  }
1014
848
 
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[]>;
849
+ export interface AcceptInviteOptions {
850
+ bypassOnboarding: boolean;
851
+ bypassVerify: boolean;
852
+ }
853
+
854
+ export interface OAuth2AuthorizeOptions {
855
+ guild_id?: Snowflake;
856
+ permissions?: PermissionResolvable;
857
+ authorize?: boolean;
858
+ code?: string;
859
+ webhook_channel_id?: Snowflake;
1034
860
  }
1035
861
 
1036
862
  export class ClientPresence extends Presence {
@@ -1044,57 +870,38 @@ export class ClientUser extends User {
1044
870
  public mfaEnabled: boolean;
1045
871
  public readonly presence: ClientPresence;
1046
872
  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
873
  public edit(data: ClientUserEditData): Promise<this>;
1053
- public setActivity(options?: ActivitiesOptions): ClientPresence;
1054
- public setActivity(name: string, options?: ActivityOptions): ClientPresence;
874
+ public setActivity(options?: ActivityOptions): ClientPresence;
875
+ public setActivity(name: string, options?: Omit<ActivityOptions, 'name'>): ClientPresence;
1055
876
  public setAFK(afk?: boolean, shardId?: number | number[]): ClientPresence;
1056
877
  public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<this>;
1057
- public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>;
1058
878
  public setPresence(data: PresenceData): ClientPresence;
1059
879
  public setStatus(status: PresenceStatusData, shardId?: number | number[]): ClientPresence;
1060
880
  public setUsername(username: string, password: string): Promise<this>;
1061
- public setHypeSquad(type: HypeSquadType): Promise<void>;
881
+ public purchasedFlags: Readonly<PurchasedFlags>;
882
+ public premiumUsageFlags: Readonly<PremiumUsageFlags>;
883
+ public phone: string | null;
884
+ public nsfwAllowed?: boolean;
885
+ public email: string | null;
886
+ public bio?: string;
887
+ public pronouns?: string;
888
+ public premiumType: number;
889
+ public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<this>;
890
+ public setHypeSquad(
891
+ hypesquad: 0 | 1 | 2 | 3 | 'LEAVE' | 'HOUSE_BRAVERY' | 'HOUSE_BRILLIANCE' | 'HOUSE_BALANCE',
892
+ ): Promise<void>;
1062
893
  public setAccentColor(color: ColorResolvable): Promise<this>;
1063
- public setDiscriminator(discriminator: string, password: string): Promise<this>;
1064
894
  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
895
  public createFriendInvite(): Promise<Invite>;
1072
896
  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;
897
+ public revokeAllFriendInvites(): Promise<void>;
898
+ public setSamsungActivity(packageName: string, type: 'START' | 'UPDATE' | 'STOP'): Promise<this>;
1091
899
  public stopRinging(channel: ChannelResolvable): Promise<void>;
1092
- public setGlobalName(globalName?: string): Promise<this>;
1093
- public setPronouns(pronouns?: string): Promise<this>;
900
+ public fetchBurstCredit(): Promise<number>;
901
+ public setPronouns(pronouns?: string | null): Promise<this>;
902
+ public setGlobalName(globalName?: string | null): Promise<this>;
1094
903
  }
1095
904
 
1096
- type NitroType = 'NONE' | 'NITRO_CLASSIC' | 'NITRO_BOOST' | 'NITRO_BASIC';
1097
-
1098
905
  export class Options extends null {
1099
906
  private constructor();
1100
907
  public static defaultMakeCacheSettings: CacheWithLimitsOptions;
@@ -1118,6 +925,12 @@ export interface CollectorEventTypes<K, V, F extends unknown[] = []> {
1118
925
  end: [collected: Collection<K, V>, reason: string];
1119
926
  }
1120
927
 
928
+ export type ChannelFlagsString = 'PINNED' | 'REQUIRE_TAG';
929
+ export class ChannelFlags extends BitField<ChannelFlagsString> {
930
+ public static FLAGS: Record<ChannelFlagsString, number>;
931
+ public static resolve(bit?: BitFieldResolvable<ChannelFlagsString, number>): number;
932
+ }
933
+
1121
934
  export abstract class Collector<K, V, F extends unknown[] = []> extends EventEmitter {
1122
935
  protected constructor(client: Client, options?: CollectorOptions<[V, ...F]>);
1123
936
  private _timeout: NodeJS.Timeout | null;
@@ -1303,27 +1116,28 @@ export class DataResolver extends null {
1303
1116
  public static resolveGuildTemplateCode(data: GuildTemplateResolvable): string;
1304
1117
  }
1305
1118
 
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
1119
  export class DiscordAPIError extends Error {
1314
1120
  private constructor(error: unknown, status: number, request: unknown);
1315
1121
  private static flattenErrors(obj: unknown, key: string): string[];
1316
- public captcha?: Captcha;
1122
+
1317
1123
  public code: number;
1318
1124
  public method: string;
1319
1125
  public path: string;
1320
1126
  public httpStatus: number;
1321
1127
  public requestData: HTTPErrorData;
1322
1128
  public retries: number;
1129
+ public captcha: Captcha | null;
1130
+ }
1131
+
1132
+ export interface Captcha {
1133
+ captcha_key: string[];
1134
+ captcha_sitekey: string;
1135
+ captcha_service: 'hcaptcha';
1136
+ captcha_rqdata?: string;
1137
+ captcha_rqtoken?: string;
1323
1138
  }
1324
1139
 
1325
1140
  export class DMChannel extends TextBasedChannelMixin(Channel, [
1326
- 'bulkDelete',
1327
1141
  'fetchWebhooks',
1328
1142
  'createWebhook',
1329
1143
  'setRateLimitPerUser',
@@ -1333,19 +1147,16 @@ export class DMChannel extends TextBasedChannelMixin(Channel, [
1333
1147
  public recipient: User;
1334
1148
  public type: 'DM';
1335
1149
  public flags: Readonly<ChannelFlags>;
1150
+ public messageRequest?: boolean;
1151
+ public messageRequestTimestamp?: number;
1336
1152
  public fetch(force?: boolean): Promise<this>;
1153
+ public acceptMessageRequest(): Promise<this>;
1154
+ public cancelMessageRequest(): Promise<this>;
1155
+ public sync(): void;
1156
+ public ring(): Promise<void>;
1337
1157
  public readonly voiceAdapterCreator: InternalDiscordGatewayAdapterCreator;
1338
- public call(options?: CallOptions): Promise<VoiceConnection>;
1339
- public sync(): undefined;
1340
1158
  public readonly shard: WebSocketShard;
1341
1159
  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
1160
  }
1350
1161
 
1351
1162
  export class Emoji extends Base {
@@ -1369,17 +1180,17 @@ export class Guild extends AnonymousGuild {
1369
1180
  private _sortedChannels(channel: NonThreadGuildBasedChannel): Collection<Snowflake, NonThreadGuildBasedChannel>;
1370
1181
 
1371
1182
  public readonly afkChannel: VoiceChannel | null;
1372
- public topEmojis(): Promise<Collection<number, Emoji>>;
1373
1183
  public afkChannelId: Snowflake | null;
1374
1184
  public afkTimeout: number;
1375
1185
  public applicationId: Snowflake | null;
1186
+ public maxVideoChannelUsers: number | null;
1187
+ public maxStageVideoChannelUsers: number | null;
1376
1188
  public approximateMemberCount: number | null;
1377
1189
  public approximatePresenceCount: number | null;
1378
1190
  public autoModerationRules: AutoModerationRuleManager;
1379
1191
  public available: boolean;
1380
1192
  public bans: GuildBanManager;
1381
1193
  public channels: GuildChannelManager;
1382
- // public commands: GuildApplicationCommandManager;
1383
1194
  public defaultMessageNotifications: DefaultMessageNotificationLevel | number;
1384
1195
  /** @deprecated This will be removed in the next major version, see https://github.com/discordjs/discord.js/issues/7091 */
1385
1196
  public deleted: boolean;
@@ -1392,8 +1203,6 @@ export class Guild extends AnonymousGuild {
1392
1203
  public large: boolean;
1393
1204
  public maximumMembers: number | null;
1394
1205
  public maximumPresences: number | null;
1395
- public maxStageVideoChannelUsers: number | null;
1396
- public maxVideoChannelUsers: number | null;
1397
1206
  /** @deprecated Use {@link GuildMemberManager.me} instead. */
1398
1207
  public readonly me: GuildMember | null;
1399
1208
  public memberCount: number;
@@ -1401,11 +1210,9 @@ export class Guild extends AnonymousGuild {
1401
1210
  public mfaLevel: MFALevel;
1402
1211
  public ownerId: Snowflake;
1403
1212
  public preferredLocale: string;
1404
- public premiumSubscriptionCount: number | null;
1405
1213
  public premiumProgressBarEnabled: boolean;
1406
1214
  public premiumTier: PremiumTier;
1407
1215
  public presences: PresenceManager;
1408
- public readonly disableDM: boolean;
1409
1216
  public readonly publicUpdatesChannel: TextChannel | null;
1410
1217
  public publicUpdatesChannelId: Snowflake | null;
1411
1218
  public roles: RoleManager;
@@ -1414,6 +1221,7 @@ export class Guild extends AnonymousGuild {
1414
1221
  public readonly safetyAlertsChannel: TextChannel | null;
1415
1222
  public safetyAlertsChannelId: Snowflake | null;
1416
1223
  public scheduledEvents: GuildScheduledEventManager;
1224
+ public settings: GuildSettingManager;
1417
1225
  public readonly shard: WebSocketShard;
1418
1226
  public shardId: number;
1419
1227
  public stageInstances: StageInstanceManager;
@@ -1429,8 +1237,7 @@ export class Guild extends AnonymousGuild {
1429
1237
  public widgetEnabled: boolean | null;
1430
1238
  public readonly maximumBitrate: number;
1431
1239
  public createTemplate(name: string, description?: string): Promise<GuildTemplate>;
1432
- public delete(mfaCode?: string): Promise<Guild>;
1433
- public read(): Promise<undefined>;
1240
+ public delete(): Promise<Guild>;
1434
1241
  public discoverySplashURL(options?: StaticImageURLOptions): string | null;
1435
1242
  public edit(data: GuildEditData, reason?: string): Promise<Guild>;
1436
1243
  public editWelcomeScreen(data: WelcomeScreenEditData): Promise<WelcomeScreen>;
@@ -1438,7 +1245,6 @@ export class Guild extends AnonymousGuild {
1438
1245
  public fetchAuditLogs<T extends GuildAuditLogsResolvable = 'ALL'>(
1439
1246
  options?: GuildAuditLogsFetchOptions<T>,
1440
1247
  ): Promise<GuildAuditLogs<T>>;
1441
- public mute(mute: boolean, time: number | null): boolean;
1442
1248
  public fetchIntegrations(): Promise<Collection<Snowflake | string, Integration>>;
1443
1249
  public fetchOwner(options?: BaseFetchOptions): Promise<GuildMember>;
1444
1250
  public fetchPreview(): Promise<GuildPreview>;
@@ -1448,8 +1254,8 @@ export class Guild extends AnonymousGuild {
1448
1254
  public fetchWelcomeScreen(): Promise<WelcomeScreen>;
1449
1255
  public fetchWidget(): Promise<Widget>;
1450
1256
  public fetchWidgetSettings(): Promise<GuildWidgetSettings>;
1451
- public disableInvites(disabled?: boolean): Promise<Guild>;
1452
1257
  public leave(): Promise<Guild>;
1258
+ public disableInvites(disabled?: boolean): Promise<Guild>;
1453
1259
  public setAFKChannel(afkChannel: VoiceChannelResolvable | null, reason?: string): Promise<Guild>;
1454
1260
  public setAFKTimeout(afkTimeout: number, reason?: string): Promise<Guild>;
1455
1261
  public setBanner(banner: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
@@ -1470,8 +1276,7 @@ export class Guild extends AnonymousGuild {
1470
1276
  public setIcon(icon: BufferResolvable | Base64Resolvable | null, reason?: string): Promise<Guild>;
1471
1277
  public setName(name: string, reason?: string): Promise<Guild>;
1472
1278
  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>;
1279
+ public setPreferredLocale(preferredLocale: string | null, reason?: string): Promise<Guild>;
1475
1280
  public setPublicUpdatesChannel(publicUpdatesChannel: TextChannelResolvable | null, reason?: string): Promise<Guild>;
1476
1281
  /** @deprecated Use {@link RoleManager.setPositions} instead */
1477
1282
  public setRolePositions(rolePositions: readonly RolePosition[]): Promise<Guild>;
@@ -1482,15 +1287,17 @@ export class Guild extends AnonymousGuild {
1482
1287
  public setSystemChannelFlags(systemChannelFlags: SystemChannelFlagsResolvable, reason?: string): Promise<Guild>;
1483
1288
  public setVerificationLevel(verificationLevel: VerificationLevel | number | null, reason?: string): Promise<Guild>;
1484
1289
  public setPremiumProgressBarEnabled(enabled?: boolean, reason?: string): Promise<Guild>;
1290
+ public setWidgetSettings(settings: GuildWidgetSettingsData, reason?: string): Promise<Guild>;
1291
+ public toJSON(): unknown;
1292
+ public markAsRead(): Promise<void>;
1485
1293
  public setCommunity(
1486
1294
  stats: boolean,
1487
- publicUpdatesChannel: TextChannelResolvable,
1488
- rulesChannel: TextChannelResolvable,
1295
+ publicUpdatesChannel?: GuildTextChannelResolvable,
1296
+ rulesChannel?: GuildTextChannelResolvable,
1489
1297
  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;
1298
+ ): Promise<this>;
1299
+ public topEmojis(): Promise<Collection<number, GuildEmoji>>;
1300
+ public setVanityCode(code?: string): Promise<this>;
1494
1301
  }
1495
1302
 
1496
1303
  export class GuildAuditLogs<T extends GuildAuditLogsResolvable = 'ALL'> {
@@ -1541,8 +1348,6 @@ export class GuildAuditLogsEntry<
1541
1348
  : Role | GuildEmoji | { id: Snowflake } | null;
1542
1349
  public targetType: TTargetType;
1543
1350
  public toJSON(): unknown;
1544
- public addIntegration(applicationId: Snowflake): Promise<boolean>;
1545
- public addBot(bot: UserResolvable | Snowflake, permissions?: PermissionResolvable): Promise<boolean>;
1546
1351
  }
1547
1352
 
1548
1353
  export class GuildBan extends Base {
@@ -1558,7 +1363,6 @@ export abstract class GuildChannel extends Channel {
1558
1363
  public constructor(guild: Guild, data?: RawGuildChannelData, client?: Client, immediatePatch?: boolean);
1559
1364
  private memberPermissions(member: GuildMember, checkAdmin: boolean): Readonly<Permissions>;
1560
1365
  private rolePermissions(role: Role, checkAdmin: boolean): Readonly<Permissions>;
1561
-
1562
1366
  public readonly createdAt: Date;
1563
1367
  public readonly createdTimestamp: number;
1564
1368
  public readonly calculatedPosition: number;
@@ -1609,14 +1413,6 @@ export class GuildEmoji extends BaseGuildEmoji {
1609
1413
  public setName(name: string, reason?: string): Promise<GuildEmoji>;
1610
1414
  }
1611
1415
 
1612
- export interface UserBadge {
1613
- name: string;
1614
- description: string;
1615
- icon: string;
1616
- link?: string;
1617
- iconURL(): string;
1618
- }
1619
-
1620
1416
  export class GuildMember extends PartialTextBasedChannel(Base) {
1621
1417
  private constructor(client: Client, data: RawGuildMemberData, guild: Guild);
1622
1418
  private _roles: Snowflake[];
@@ -1647,9 +1443,6 @@ export class GuildMember extends PartialTextBasedChannel(Base) {
1647
1443
  public readonly roles: GuildMemberRoleManager;
1648
1444
  public user: User;
1649
1445
  public readonly voice: VoiceState;
1650
- public themeColors?: [number, number];
1651
- public readonly hexThemeColor: [string, string] | null;
1652
- public badges: UserBadge[] | null;
1653
1446
  public avatarURL(options?: ImageURLOptions): string | null;
1654
1447
  public ban(options?: BanOptions): Promise<GuildMember>;
1655
1448
  public disableCommunicationUntil(timeout: DateResolvable | null, reason?: string): Promise<GuildMember>;
@@ -1667,14 +1460,12 @@ export class GuildMember extends PartialTextBasedChannel(Base) {
1667
1460
  public permissionsIn(channel: GuildChannelResolvable): Readonly<Permissions>;
1668
1461
  public setNickname(nickname: string | null, reason?: string): Promise<GuildMember>;
1669
1462
  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
1463
  public toJSON(): unknown;
1675
1464
  public toString(): MemberMention;
1676
1465
  public valueOf(): string;
1677
- public setThemeColors(primary?: ColorResolvable, accent?: ColorResolvable): GuildMember;
1466
+ public setAvatar(avatar: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
1467
+ public setBanner(banner: BufferResolvable | Base64Resolvable | null): Promise<GuildMember>;
1468
+ public setAboutMe(bio: string | null): Promise<GuildMember>;
1678
1469
  }
1679
1470
 
1680
1471
  export class GuildMemberFlags extends BitField<GuildMemberFlagsString> {
@@ -1728,6 +1519,7 @@ export class GuildScheduledEvent<S extends GuildScheduledEventStatus = GuildSche
1728
1519
  public readonly scheduledEndAt: Date | null;
1729
1520
  public readonly channel: VoiceChannel | StageChannel | null;
1730
1521
  public readonly guild: Guild | null;
1522
+ public readonly url: string;
1731
1523
  public readonly image: string | null;
1732
1524
  public coverImageURL(options?: StaticImageURLOptions): string | null;
1733
1525
  public createInviteURL(options?: CreateGuildScheduledEventInviteURLOptions): Promise<string>;
@@ -1838,6 +1630,7 @@ export class IntegrationApplication extends Application {
1838
1630
  export class Intents extends BitField<IntentsString> {
1839
1631
  public static FLAGS: Record<IntentsString, number>;
1840
1632
  public static resolve(bit?: BitFieldResolvable<IntentsString, number>): number;
1633
+ public static ALL: number;
1841
1634
  }
1842
1635
 
1843
1636
  export type CacheType = 'cached' | 'raw' | undefined;
@@ -1895,14 +1688,7 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
1895
1688
  public isMessageContextMenu(): this is MessageContextMenuInteraction<Cached>;
1896
1689
  public isMessageComponent(): this is MessageComponentInteraction<Cached>;
1897
1690
  public isModalSubmit(): this is ModalSubmitInteraction<Cached>;
1898
- public isAnySelectMenu(): this is SelectMenuInteraction<Cached>;
1899
- /** @deprecated Use {@link Interaction#isStringSelect()} instead */
1900
- public isSelectMenu(): this is StringSelectInteraction<Cached>;
1901
- public isStringSelect(): this is StringSelectInteraction<Cached>;
1902
- public isUserSelect(): this is UserSelectInteraction<Cached>;
1903
- public isMentionableSelect(): this is MentionableSelectInteraction<Cached>;
1904
- public isRoleSelect(): this is RoleSelectInteraction<Cached>;
1905
- public isChannelSelect(): this is ChannelSelectInteraction<Cached>;
1691
+ public isSelectMenu(): this is SelectMenuInteraction<Cached>;
1906
1692
  public isRepliable(): this is this & InteractionResponseFields<Cached>;
1907
1693
  }
1908
1694
 
@@ -1942,8 +1728,8 @@ export class InteractionWebhook extends PartialWebhookMixin() {
1942
1728
 
1943
1729
  export class Invite extends Base {
1944
1730
  private constructor(client: Client, data: RawInviteData);
1945
- public channel: NonThreadGuildBasedChannel | PartialGroupDMChannel;
1946
- public channelId: Snowflake;
1731
+ public channel?: NonThreadGuildBasedChannel | GroupDMChannel;
1732
+ public channelId?: Snowflake;
1947
1733
  public code: string;
1948
1734
  public readonly deletable: boolean;
1949
1735
  public readonly createdAt: Date | null;
@@ -1957,6 +1743,7 @@ export class Invite extends Base {
1957
1743
  public maxUses: number | null;
1958
1744
  public memberCount: number;
1959
1745
  public presenceCount: number;
1746
+ public type: InviteType | null;
1960
1747
  public targetApplication: IntegrationApplication | null;
1961
1748
  public targetUser: User | null;
1962
1749
  public targetType: InviteTargetType | null;
@@ -1966,10 +1753,10 @@ export class Invite extends Base {
1966
1753
  public delete(reason?: string): Promise<Invite>;
1967
1754
  public toJSON(): unknown;
1968
1755
  public toString(): string;
1969
- public acceptInvite(autoVerify?: boolean): Promise<Guild>;
1970
1756
  public static INVITES_PATTERN: RegExp;
1971
1757
  public stageInstance: InviteStageInstance | null;
1972
1758
  public guildScheduledEvent: GuildScheduledEvent | null;
1759
+ public flags: Readonly<InviteFlags>;
1973
1760
  }
1974
1761
 
1975
1762
  export class InviteStageInstance extends Base {
@@ -2002,32 +1789,30 @@ export class LimitedCollection<K, V> extends Collection<K, V> {
2002
1789
  public static filterByLifetime<K, V>(options?: LifetimeFilterOptions<K, V>): SweepFilter<K, V>;
2003
1790
  }
2004
1791
 
2005
- export type MessageCollectorOptionsParams<T extends MessageComponentTypeResolvable, Cached extends boolean = boolean> =
2006
- | {
2007
- componentType?: T;
2008
- } & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
1792
+ export type MessageCollectorOptionsParams<
1793
+ T extends MessageComponentTypeResolvable,
1794
+ Cached extends boolean = boolean,
1795
+ > = {
1796
+ componentType?: T;
1797
+ } & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
2009
1798
 
2010
1799
  export type MessageChannelCollectorOptionsParams<
2011
1800
  T extends MessageComponentTypeResolvable,
2012
1801
  Cached extends boolean = boolean,
2013
- > =
2014
- | {
2015
- componentType?: T;
2016
- } & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
1802
+ > = {
1803
+ componentType?: T;
1804
+ } & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
2017
1805
 
2018
1806
  export type AwaitMessageCollectorOptionsParams<
2019
1807
  T extends MessageComponentTypeResolvable,
2020
1808
  Cached extends boolean = boolean,
2021
- > =
2022
- | { componentType?: T } & Pick<
2023
- InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>,
2024
- keyof AwaitMessageComponentOptions<any>
2025
- >;
1809
+ > = { componentType?: T } & Pick<
1810
+ InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>,
1811
+ keyof AwaitMessageComponentOptions<any>
1812
+ >;
2026
1813
 
2027
1814
  export interface StringMappedInteractionTypes<Cached extends CacheType = CacheType> {
2028
1815
  BUTTON: ButtonInteraction<Cached>;
2029
- /** @deprecated */
2030
- SELECT_MENU: SelectMenuInteraction<Cached>;
2031
1816
  STRING_SELECT: SelectMenuInteraction<Cached>;
2032
1817
  USER_SELECT: SelectMenuInteraction<Cached>;
2033
1818
  ROLE_SELECT: SelectMenuInteraction<Cached>;
@@ -2042,8 +1827,6 @@ export type MappedInteractionTypes<Cached extends boolean = boolean> = EnumValue
2042
1827
  typeof MessageComponentTypes,
2043
1828
  {
2044
1829
  BUTTON: ButtonInteraction<WrapBooleanCache<Cached>>;
2045
- /** @deprecated */
2046
- SELECT_MENU: StringSelectInteraction<WrapBooleanCache<Cached>>;
2047
1830
  STRING_SELECT: StringSelectInteraction<WrapBooleanCache<Cached>>;
2048
1831
  USER_SELECT: UserSelectInteraction<WrapBooleanCache<Cached>>;
2049
1832
  ROLE_SELECT: RoleSelectInteraction<WrapBooleanCache<Cached>>;
@@ -2063,7 +1846,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
2063
1846
  public applicationId: Snowflake | null;
2064
1847
  public attachments: Collection<Snowflake, MessageAttachment>;
2065
1848
  public author: User;
2066
- public readonly bulkDeletable: boolean;
1849
+ public get bulkDeletable(): boolean;
2067
1850
  public readonly channel: If<Cached, GuildTextBasedChannel, TextBasedChannel>;
2068
1851
  public channelId: Snowflake;
2069
1852
  public readonly cleanContent: string;
@@ -2079,7 +1862,7 @@ export class Message<Cached extends boolean = boolean> extends Base {
2079
1862
  public readonly editedAt: Date | null;
2080
1863
  public editedTimestamp: number | null;
2081
1864
  public embeds: MessageEmbed[];
2082
- public groupActivityApplication: ClientApplication | null;
1865
+ public groupActivityApplication: Application | null;
2083
1866
  public guildId: If<Cached, Snowflake>;
2084
1867
  public readonly guild: If<Cached, Guild>;
2085
1868
  public readonly hasThread: boolean;
@@ -2102,14 +1885,8 @@ export class Message<Cached extends boolean = boolean> extends Base {
2102
1885
  public flags: Readonly<MessageFlags>;
2103
1886
  public reference: MessageReference | null;
2104
1887
  public position: number | null;
2105
- public awaitMessageComponent<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
2106
- options?: AwaitMessageCollectorOptionsParams<T, Cached>,
2107
- ): Promise<MappedInteractionTypes<Cached>[T]>;
2108
1888
  public awaitReactions(options?: AwaitReactionsOptions): Promise<Collection<Snowflake | string, MessageReaction>>;
2109
1889
  public createReactionCollector(options?: ReactionCollectorOptions): ReactionCollector;
2110
- public createMessageComponentCollector<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
2111
- options?: MessageCollectorOptionsParams<T, Cached>,
2112
- ): InteractionCollector<MappedInteractionTypes<Cached>[T]>;
2113
1890
  public delete(): Promise<Message>;
2114
1891
  public edit(content: string | MessageEditOptions | MessagePayload): Promise<Message>;
2115
1892
  public equals(message: Message, rawData: unknown): boolean;
@@ -2128,13 +1905,25 @@ export class Message<Cached extends boolean = boolean> extends Base {
2128
1905
  public toString(): string;
2129
1906
  public unpin(reason?: string): Promise<Message>;
2130
1907
  public inGuild(): this is Message<true> & this;
2131
- // Added
2132
- public markUnread(): Promise<boolean>;
2133
- public markRead(): Promise<boolean>;
2134
- public clickButton(button?: MessageButton | MessageButtonLocation | string): Promise<InteractionResponse>;
2135
- public selectMenu(menuID: MessageSelectMenu | Snowflake | number, options: any[]): Promise<InteractionResponse>;
2136
- public selectMenu(options: any[]): Promise<InteractionResponse>;
2137
- public contextMenu(botID: Snowflake, commandName: string): Promise<InteractionResponse>;
1908
+
1909
+ public readonly isMessage: true;
1910
+ public clickButton(button?: { X: number; Y: number } | string): Promise<Message | Modal>;
1911
+ public selectMenu(
1912
+ menu: 0 | 1 | 2 | 3 | 4 | string,
1913
+ vales: (UserResolvable | RoleResolvable | ChannelResolvable | string)[],
1914
+ ): Promise<Message | Modal>;
1915
+ public markUnread(): Promise<void>;
1916
+ public markRead(): Promise<void>;
1917
+ public report(breadcrumbs: number[], elements?: object): Promise<{ report_id: Snowflake }>;
1918
+ }
1919
+
1920
+ export class CallState extends Base {
1921
+ private constructor(client: Client, data: any);
1922
+ public channelId: Snowflake;
1923
+ public region: string;
1924
+ public readonly channel?: DMChannel | GroupDMChannel;
1925
+ public readonly ringing: Collection<Snowflake, User>;
1926
+ public setRTCRegion(): Promise<void>;
2138
1927
  }
2139
1928
 
2140
1929
  export class MessageActionRow<
@@ -2144,6 +1933,7 @@ export class MessageActionRow<
2144
1933
  ? APIActionRowComponent<APIModalActionRowComponent>
2145
1934
  : APIActionRowComponent<APIMessageActionRowComponent>,
2146
1935
  > extends BaseMessageComponent {
1936
+ // tslint:disable-next-line:ban-ts-ignore
2147
1937
  // @ts-ignore (TS:2344, Caused by TypeScript 4.8)
2148
1938
  // Fixed in DiscordJS >= 14.x / DiscordApiTypes >= 0.37.x, ignoring the type error here.
2149
1939
  public constructor(data?: MessageActionRow<T> | MessageActionRowOptions<U> | V);
@@ -2163,6 +1953,7 @@ export class MessageAttachment {
2163
1953
  public description: string | null;
2164
1954
  public duration: number | null;
2165
1955
  public ephemeral: boolean;
1956
+ public flags: Readonly<AttachmentFlags>;
2166
1957
  public height: number | null;
2167
1958
  public id: Snowflake;
2168
1959
  public name: string | null;
@@ -2179,11 +1970,13 @@ export class MessageAttachment {
2179
1970
  public toJSON(): unknown;
2180
1971
  }
2181
1972
 
2182
- export interface InteractionResponseBody {
2183
- id: Snowflake;
2184
- nonce: Snowflake;
1973
+ export class AttachmentFlags extends BitField<AttachmentFlagsString> {
1974
+ public static FLAGS: Record<AttachmentFlagsString, number>;
1975
+ public static resolve(bit?: BitFieldResolvable<AttachmentFlagsString, number>): number;
2185
1976
  }
2186
1977
 
1978
+ export type AttachmentFlagsString = 'IS_REMIX';
1979
+
2187
1980
  export class MessageButton extends BaseMessageComponent {
2188
1981
  public constructor(data?: MessageButton | MessageButtonOptions | APIButtonComponent);
2189
1982
  public customId: string | null;
@@ -2200,7 +1993,6 @@ export class MessageButton extends BaseMessageComponent {
2200
1993
  public setStyle(style: MessageButtonStyleResolvable): this;
2201
1994
  public setURL(url: string): this;
2202
1995
  public toJSON(): APIButtonComponent;
2203
- public click(message: Message): Promise<InteractionResponse>;
2204
1996
  private static resolveStyle(style: MessageButtonStyleResolvable): MessageButtonStyle;
2205
1997
  }
2206
1998
 
@@ -2313,6 +2105,22 @@ export class MessageEmbed {
2313
2105
  public static normalizeFields(...fields: EmbedFieldData[] | EmbedFieldData[][]): Required<EmbedFieldData>[];
2314
2106
  }
2315
2107
 
2108
+ export interface WebEmbedOptions {
2109
+ title?: string;
2110
+ description?: string;
2111
+ url?: string;
2112
+ timestamp?: Date | number;
2113
+ color?: ColorResolvable;
2114
+ fields?: EmbedFieldData[];
2115
+ author?: Partial<MessageEmbedAuthor> & { icon_url?: string; proxy_icon_url?: string };
2116
+ thumbnail?: Partial<MessageEmbedThumbnail> & { proxy_url?: string };
2117
+ image?: Partial<MessageEmbedImage> & { proxy_url?: string };
2118
+ video?: Partial<MessageEmbedVideo> & { proxy_url?: string };
2119
+ footer?: Partial<MessageEmbedFooter> & { icon_url?: string; proxy_icon_url?: string };
2120
+ imageType?: 'thumbnail' | 'image';
2121
+ redirect?: string;
2122
+ }
2123
+
2316
2124
  export class WebEmbed {
2317
2125
  public constructor(data?: WebEmbedOptions);
2318
2126
  public author: MessageEmbedAuthor | null;
@@ -2324,9 +2132,8 @@ export class WebEmbed {
2324
2132
  public title: string | null;
2325
2133
  public url: string | null;
2326
2134
  public video: MessageEmbedVideo | null;
2327
- public hidden: boolean;
2328
- public shorten: boolean;
2329
2135
  public imageType: 'thumbnail' | 'image';
2136
+ public redirect?: string;
2330
2137
  public setAuthor(options: EmbedAuthorData | null): this;
2331
2138
  public setColor(color: ColorResolvable): this;
2332
2139
  public setDescription(description: string): this;
@@ -2336,7 +2143,33 @@ export class WebEmbed {
2336
2143
  public setTitle(title: string): this;
2337
2144
  public setURL(url: string): this;
2338
2145
  public setProvider(options: MessageEmbedProvider | null): this;
2339
- public toMessage(): Promise<string>;
2146
+ public setRedirect(url: string): this;
2147
+ public toString(): string;
2148
+ public static hiddenEmbed: string;
2149
+ }
2150
+
2151
+ export class BillingManager extends BaseManager {
2152
+ constructor(client: Client);
2153
+ public paymentSources: Collection<Snowflake, object>;
2154
+ public fetchPaymentSources(): Promise<Collection<Snowflake, object>>;
2155
+ public guildBoosts: Collection<Snowflake, GuildBoost>;
2156
+ public fetchGuildBoosts(): Promise<Collection<Snowflake, GuildBoost>>;
2157
+ public currentSubscription: Collection<Snowflake, object>;
2158
+ public fetchCurrentSubscription(): Promise<Collection<Snowflake, object>>;
2159
+ }
2160
+
2161
+ export class GuildBoost extends Base {
2162
+ constructor(client: Client, data: object);
2163
+ public id: Snowflake;
2164
+ public guildId?: Snowflake;
2165
+ public readonly guild: Guild | null;
2166
+ public subscriptionId: Snowflake;
2167
+ public premiumGuildSubscriptionId?: Snowflake;
2168
+ public ended?: boolean;
2169
+ public canceled: boolean;
2170
+ public cooldownEndsAt: Date;
2171
+ public unsubscribe(): Promise<this>;
2172
+ public subscribe(guild: GuildResolvable): Promise<this>;
2340
2173
  }
2341
2174
 
2342
2175
  export class MessageFlags extends BitField<MessageFlagsString> {
@@ -2356,6 +2189,7 @@ export class MessageMentions {
2356
2189
  private readonly _content: string;
2357
2190
  private _members: Collection<Snowflake, GuildMember> | null;
2358
2191
  private _parsedUsers: Collection<Snowflake, User> | null;
2192
+
2359
2193
  public readonly channels: Collection<Snowflake, AnyChannel>;
2360
2194
  public readonly client: Client;
2361
2195
  public everyone: boolean;
@@ -2378,7 +2212,6 @@ export class MessageMentions {
2378
2212
  export class MessagePayload {
2379
2213
  public constructor(target: MessageTarget, options: MessageOptions | WebhookMessageOptions);
2380
2214
  public data: RawMessagePayloadData | null;
2381
- public readonly usingNewAttachmentAPI: boolean;
2382
2215
  public readonly isUser: boolean;
2383
2216
  public readonly isWebhook: boolean;
2384
2217
  public readonly isMessage: boolean;
@@ -2406,14 +2239,14 @@ export class MessageReaction {
2406
2239
  private constructor(client: Client, data: RawMessageReactionData, message: Message);
2407
2240
  private _emoji: GuildEmoji | ReactionEmoji;
2408
2241
 
2409
- public readonly client: Client;
2242
+ public burstColors: string[];
2243
+ public readonly client: Client<true>;
2410
2244
  public count: number;
2411
2245
  public burstCount: number;
2412
- public burstColors: string[];
2246
+ public countDetails: ReactionCountDetailsData;
2413
2247
  public isBurst: boolean;
2414
2248
  public readonly emoji: GuildEmoji | ReactionEmoji;
2415
2249
  public me: boolean;
2416
- public countDetails: ReactionCountDetailsData;
2417
2250
  public message: Message | PartialMessage;
2418
2251
  public readonly partial: false;
2419
2252
  public users: ReactionUserManager;
@@ -2437,23 +2270,19 @@ export class MessageSelectMenu extends BaseMessageComponent {
2437
2270
  public options: MessageSelectOption[];
2438
2271
  public placeholder: string | null;
2439
2272
  public type: SelectMenuComponentType;
2440
- public addChannelTypes(...channelTypes: ChannelTypes[]): this;
2441
2273
  public addOptions(...options: MessageSelectOptionData[] | MessageSelectOptionData[][]): this;
2442
2274
  public setOptions(...options: MessageSelectOptionData[] | MessageSelectOptionData[][]): this;
2443
- public setChannelTypes(...channelTypes: ChannelTypes[]): this;
2444
2275
  public setCustomId(customId: string): this;
2445
2276
  public setDisabled(disabled?: boolean): this;
2446
2277
  public setMaxValues(maxValues: number): this;
2447
2278
  public setMinValues(minValues: number): this;
2448
2279
  public setPlaceholder(placeholder: string): this;
2449
- public setType(type: SelectMenuComponentType | SelectMenuComponentTypes): this;
2450
2280
  public spliceOptions(
2451
2281
  index: number,
2452
2282
  deleteCount: number,
2453
2283
  ...options: MessageSelectOptionData[] | MessageSelectOptionData[][]
2454
2284
  ): this;
2455
2285
  public toJSON(): APISelectMenuComponent;
2456
- public select(message: Message, values?: any[]): Promise<InteractionResponse>;
2457
2286
  }
2458
2287
 
2459
2288
  export class Modal {
@@ -2461,45 +2290,13 @@ export class Modal {
2461
2290
  public components: MessageActionRow<ModalActionRowComponent>[];
2462
2291
  public customId: string | null;
2463
2292
  public title: string | null;
2464
- public application: object | null;
2465
- public client: Client | null;
2466
- public nonce: Snowflake | null;
2467
- public readonly sendFromInteraction: InteractionResponse | null;
2468
- public addComponents(
2469
- ...components: (
2470
- | MessageActionRow<ModalActionRowComponent>
2471
- | (Required<BaseMessageComponentOptions> & MessageActionRowOptions<ModalActionRowComponentResolvable>)
2472
- )[]
2473
- ): this;
2474
- public setComponents(
2475
- ...components: (
2476
- | MessageActionRow<ModalActionRowComponent>
2477
- | (Required<BaseMessageComponentOptions> & MessageActionRowOptions<ModalActionRowComponentResolvable>)
2478
- )[]
2479
- ): this;
2480
- public setCustomId(customId: string): this;
2481
- public spliceComponents(
2482
- index: number,
2483
- deleteCount: number,
2484
- ...components: (
2485
- | MessageActionRow<ModalActionRowComponent>
2486
- | (Required<BaseMessageComponentOptions> & MessageActionRowOptions<ModalActionRowComponentResolvable>)
2487
- )[]
2488
- ): this;
2489
- public setTitle(title: string): this;
2293
+ public readonly isMessage: false;
2294
+ public readonly guildId: Snowflake | null;
2295
+ public channelId: Snowflake;
2296
+ public readonly channel: TextBasedChannel;
2297
+ public readonly guild: Guild | null;
2298
+ public reply(): Promise<Message | Modal>;
2490
2299
  public toJSON(): RawModalSubmitInteractionData;
2491
- public reply(data: ModalReplyData): Promise<InteractionResponse>;
2492
- }
2493
-
2494
- export interface ModalReplyData {
2495
- guild?: GuildResolvable;
2496
- channel?: TextChannelResolvable;
2497
- data?: TextInputComponentReplyData[];
2498
- }
2499
-
2500
- export interface TextInputComponentReplyData {
2501
- customId: string;
2502
- value: string;
2503
2300
  }
2504
2301
 
2505
2302
  export class ModalSubmitFieldsResolver {
@@ -2562,45 +2359,37 @@ export class OAuth2Guild extends BaseGuild {
2562
2359
  public permissions: Readonly<Permissions>;
2563
2360
  }
2564
2361
 
2565
- export class PartialGroupDMChannel extends TextBasedChannelMixin(Channel, [
2566
- 'bulkDelete',
2362
+ export class GroupDMChannel extends TextBasedChannelMixin(Channel, [
2567
2363
  'fetchWebhooks',
2568
2364
  'createWebhook',
2569
2365
  'setRateLimitPerUser',
2570
2366
  'setNSFW',
2571
2367
  ]) {
2572
2368
  private constructor(client: Client, data: RawPartialGroupDMChannelData);
2573
- public type: 'GROUP_DM';
2574
2369
  public name: string | null;
2575
2370
  public icon: string | null;
2371
+ public flags: Readonly<ChannelFlags>;
2372
+ private _recipients: RawUserData[];
2373
+ public type: 'GROUP_DM';
2374
+ public ownerId: Snowflake;
2576
2375
  public readonly recipients: Collection<Snowflake, User>;
2577
- public messages: MessageManager;
2578
- public invites: Collection<string, Invite>;
2579
- public lastMessageId: Snowflake | null;
2580
- public lastPinTimestamp: number | null;
2581
- public owner: User | null;
2582
- public ownerId: Snowflake | null;
2583
- public flags: null;
2584
- public messageRequest: boolean | undefined;
2585
- public messageRequestTimestamp: Date | undefined;
2586
- public acceptMessageRequest(): Promise<this>;
2587
- public cancelMessageRequest(): Promise<this>;
2376
+ public readonly owner: User;
2588
2377
  public iconURL(options?: StaticImageURLOptions): string | null;
2589
- public addMember(user: User): Promise<PartialGroupDMChannel>;
2590
- public removeMember(user: User): Promise<PartialGroupDMChannel>;
2591
- public setName(name: string): Promise<PartialGroupDMChannel>;
2592
- public setIcon(icon: Base64Resolvable | null): Promise<PartialGroupDMChannel>;
2378
+ public leave(slient?: boolean): Promise<this>;
2379
+ public edit(data: GroupDMChannelEditData): Promise<this>;
2380
+ public setIcon(icon: BufferResolvable | Base64Resolvable | null): Promise<this>;
2381
+ public setName(name: string): Promise<this>;
2382
+ public setOwner(owner: UserResolvable): Promise<this>;
2383
+ public addUser(user: UserResolvable): Promise<this>;
2384
+ public removeUser(user: UserResolvable): Promise<this>;
2593
2385
  public getInvite(): Promise<Invite>;
2594
- public fetchInvite(force: boolean): Promise<Invite>;
2595
- public removeInvite(invite: Invite): Promise<PartialGroupDMChannel>;
2596
- public delete(slient?: boolean): Promise<this>;
2597
- public setOwner(user: UserResolvable): Promise<PartialGroupDMChannel>;
2386
+ public fetchAllInvite(): Promise<Collection<string, Invite>>;
2387
+ public deleteInvite(invite: InviteResolvable): Promise<this>;
2388
+ public sync(): void;
2389
+ public ring(recipients?: UserResolvable[]): Promise<void>;
2598
2390
  public readonly voiceAdapterCreator: InternalDiscordGatewayAdapterCreator;
2599
- public call(options?: CallOptions): Promise<VoiceConnection>;
2600
- public sync(): undefined;
2601
2391
  public readonly shard: WebSocketShard;
2602
2392
  public readonly voiceUsers: Collection<Snowflake, User>;
2603
- public readonly voiceConnection?: VoiceConnection;
2604
2393
  }
2605
2394
 
2606
2395
  export class PermissionOverwrites extends Base {
@@ -2636,8 +2425,9 @@ export class Permissions extends BitField<PermissionString, bigint> {
2636
2425
 
2637
2426
  export class Presence extends Base {
2638
2427
  protected constructor(client: Client, data?: RawPresenceData);
2639
- public activities: Activity[];
2428
+ public activities: (Activity | CustomStatus | RichPresence | SpotifyRPC)[];
2640
2429
  public clientStatus: ClientPresenceStatusData | null;
2430
+ public lastModified: number | null;
2641
2431
  public guild: Guild | null;
2642
2432
  public readonly member: GuildMember | null;
2643
2433
  public status: PresenceStatus;
@@ -2701,6 +2491,7 @@ export class Role extends Base {
2701
2491
  /** @deprecated This will be removed in the next major version, see https://github.com/discordjs/discord.js/issues/7091 */
2702
2492
  public deleted: boolean;
2703
2493
  public readonly editable: boolean;
2494
+ public flags: Readonly<RoleFlags>;
2704
2495
  public guild: Guild;
2705
2496
  public readonly hexColor: HexColorString;
2706
2497
  public hoist: boolean;
@@ -2736,6 +2527,13 @@ export class Role extends Base {
2736
2527
  public static comparePositions(role1: Role, role2: Role): number;
2737
2528
  }
2738
2529
 
2530
+ export class RoleFlags extends BitField<RoleFlagsString> {
2531
+ public static FLAGS: Record<RoleFlagsString, number>;
2532
+ public static resolve(bit?: BitFieldResolvable<RoleFlagsString, number>): number;
2533
+ }
2534
+
2535
+ export type RoleFlagsString = 'IN_PROMPT';
2536
+
2739
2537
  export class BaseSelectMenuInteraction<
2740
2538
  Cached extends CacheType = CacheType,
2741
2539
  > extends MessageComponentInteraction<Cached> {
@@ -2828,6 +2626,7 @@ export interface ShardEventTypes {
2828
2626
  error: [error: Error];
2829
2627
  message: [message: any];
2830
2628
  }
2629
+
2831
2630
  export class Shard extends EventEmitter {
2832
2631
  private constructor(manager: ShardingManager, id: number);
2833
2632
  private _evals: Map<string, Promise<unknown>>;
@@ -2931,6 +2730,11 @@ export class ShardingManager extends EventEmitter {
2931
2730
  public once(event: 'shardCreate', listener: (shard: Shard) => Awaitable<void>): this;
2932
2731
  }
2933
2732
 
2733
+ export interface FetchRecommendedShardsOptions {
2734
+ guildsPerShard?: number;
2735
+ multipleOf?: number;
2736
+ }
2737
+
2934
2738
  export class SnowflakeUtil extends null {
2935
2739
  private constructor();
2936
2740
  public static deconstruct(snowflake: Snowflake): DeconstructedSnowflake;
@@ -3106,9 +2910,6 @@ export class Team extends Base {
3106
2910
  public readonly createdTimestamp: number;
3107
2911
 
3108
2912
  public iconURL(options?: StaticImageURLOptions): string | null;
3109
- public inviteMemeber(user: User, MFACode: number): Promise<TeamMember>;
3110
- public removeMemeber(userID: Snowflake): boolean;
3111
- public delete(MFACode: string): Promise<boolean>;
3112
2913
  public toJSON(): unknown;
3113
2914
  public toString(): string;
3114
2915
  }
@@ -3130,6 +2931,58 @@ export class TextChannel extends BaseGuildTextChannel {
3130
2931
  public type: 'GUILD_TEXT';
3131
2932
  }
3132
2933
 
2934
+ export interface GuildForumTagEmoji {
2935
+ id: Snowflake | null;
2936
+ name: string | null;
2937
+ }
2938
+
2939
+ export interface GuildForumTag {
2940
+ id: Snowflake;
2941
+ name: string;
2942
+ moderated: boolean;
2943
+ emoji: GuildForumTagEmoji | null;
2944
+ }
2945
+
2946
+ export type GuildForumTagData = Partial<GuildForumTag> & { name: string };
2947
+
2948
+ export interface DefaultReactionEmoji {
2949
+ id: Snowflake | null;
2950
+ name: string | null;
2951
+ }
2952
+
2953
+ export class ForumChannel extends TextBasedChannelMixin(GuildChannel, [
2954
+ 'send',
2955
+ 'lastMessage',
2956
+ 'lastPinAt',
2957
+ 'sendTyping',
2958
+ 'createMessageCollector',
2959
+ 'awaitMessages',
2960
+ ]) {
2961
+ public type: 'GUILD_FORUM';
2962
+ public threads: GuildForumThreadManager;
2963
+ public availableTags: GuildForumTag[];
2964
+ public defaultReactionEmoji: DefaultReactionEmoji | null;
2965
+ public defaultThreadRateLimitPerUser: number | null;
2966
+ public rateLimitPerUser: number | null;
2967
+ public defaultAutoArchiveDuration: ThreadAutoArchiveDuration | null;
2968
+ public nsfw: boolean;
2969
+ public topic: string | null;
2970
+ public defaultSortOrder: SortOrderType | null;
2971
+ public defaultForumLayout: ForumLayoutType;
2972
+ public setAvailableTags(tags: GuildForumTagData[], reason?: string): Promise<this>;
2973
+ public setDefaultReactionEmoji(emojiId: DefaultReactionEmoji | null, reason?: string): Promise<this>;
2974
+ public setDefaultThreadRateLimitPerUser(rateLimit: number, reason?: string): Promise<this>;
2975
+ public createInvite(options?: CreateInviteOptions): Promise<Invite>;
2976
+ public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
2977
+ public setDefaultAutoArchiveDuration(
2978
+ defaultAutoArchiveDuration: ThreadAutoArchiveDuration,
2979
+ reason?: string,
2980
+ ): Promise<this>;
2981
+ public setTopic(topic: string | null, reason?: string): Promise<this>;
2982
+ public setDefaultSortOrder(defaultSortOrder: SortOrderType | null, reason?: string): Promise<this>;
2983
+ public setDefaultForumLayout(defaultForumLayout: ForumLayoutType, reason?: string): Promise<this>;
2984
+ }
2985
+
3133
2986
  export class TextInputComponent extends BaseMessageComponent {
3134
2987
  public constructor(data?: TextInputComponent | TextInputComponentOptions);
3135
2988
  public customId: string | null;
@@ -3140,13 +2993,6 @@ export class TextInputComponent extends BaseMessageComponent {
3140
2993
  public placeholder: string | null;
3141
2994
  public style: TextInputStyle;
3142
2995
  public value: string | null;
3143
- public setCustomId(customId: string): this;
3144
- public setLabel(label: string): this;
3145
- public setRequired(required?: boolean): this;
3146
- public setMaxLength(maxLength: number): this;
3147
- public setMinLength(minLength: number): this;
3148
- public setPlaceholder(placeholder: string): this;
3149
- public setStyle(style: TextInputStyleResolvable): this;
3150
2996
  public setValue(value: string): this;
3151
2997
  public toJSON(): RawTextInputComponentData;
3152
2998
  public static resolveStyle(style: TextInputStyleResolvable): TextInputStyle;
@@ -3155,7 +3001,6 @@ export class TextInputComponent extends BaseMessageComponent {
3155
3001
  export class ThreadChannel extends TextBasedChannelMixin(Channel, ['fetchWebhooks', 'createWebhook', 'setNSFW']) {
3156
3002
  private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client);
3157
3003
  public archived: boolean | null;
3158
- public readonly firstMessage: Message | null;
3159
3004
  public readonly archivedAt: Date | null;
3160
3005
  public archiveTimestamp: number | null;
3161
3006
  public readonly createdAt: Date | null;
@@ -3251,15 +3096,15 @@ export class Typing extends Base {
3251
3096
  export class User extends PartialTextBasedChannel(Base) {
3252
3097
  protected constructor(client: Client, data: RawUserData);
3253
3098
  private _equals(user: APIUser): boolean;
3254
- public application: ClientApplication;
3099
+
3255
3100
  public accentColor: number | null | undefined;
3256
3101
  public avatar: string | null;
3257
3102
  public avatarDecoration: string | null;
3103
+ public avatarDecorationSKUId: Snowflake | null;
3258
3104
  public banner: string | null | undefined;
3105
+ public bannerColor: string | null | undefined;
3259
3106
  public bot: boolean;
3260
- public pronouns: string | null;
3261
3107
  public readonly createdAt: Date;
3262
- public readonly relationships: RelationshipTypes;
3263
3108
  public readonly createdTimestamp: number;
3264
3109
  public discriminator: string;
3265
3110
  public readonly displayName: string;
@@ -3267,22 +3112,16 @@ export class User extends PartialTextBasedChannel(Base) {
3267
3112
  public readonly dmChannel: DMChannel | null;
3268
3113
  public flags: Readonly<UserFlags> | null;
3269
3114
  public globalName: string | null;
3270
- public botInGuildsCount: number | null | undefined;
3271
3115
  public readonly hexAccentColor: HexColorString | null | undefined;
3272
3116
  public id: Snowflake;
3273
3117
  public readonly partial: false;
3274
3118
  public system: boolean;
3275
3119
  public readonly tag: string;
3276
3120
  public username: string;
3277
- public readonly note: string | null;
3278
- public readonly nickname: string | null;
3279
- public connectedAccounts: object[];
3280
- public premiumSince: Date;
3281
- public premiumGuildSince: Date;
3282
- public bio: string | null;
3283
- public readonly mutualGuilds: Collection<Snowflake, object>;
3284
- public readonly mutualFriends: Promise<Collection<Snowflake, User>>;
3285
- public readonly voice: VoiceState;
3121
+ public readonly note: string | undefined;
3122
+ public readonly voice?: VoiceState;
3123
+ public readonly relationship: RelationshipTypes;
3124
+ public readonly friendNickname: string | null | undefined;
3286
3125
  public avatarURL(options?: ImageURLOptions): string | null;
3287
3126
  public avatarDecorationURL(options?: StaticImageURLOptions): string | null;
3288
3127
  public bannerURL(options?: ImageURLOptions): string | null;
@@ -3292,18 +3131,12 @@ export class User extends PartialTextBasedChannel(Base) {
3292
3131
  public equals(user: User): boolean;
3293
3132
  public fetch(force?: boolean): Promise<User>;
3294
3133
  public fetchFlags(force?: boolean): Promise<UserFlags>;
3295
- public setFriend(): Promise<User>;
3296
- public setBlock(): Promise<User>;
3297
- public sendFriendRequest(): Promise<User>;
3298
- public unFriend(): Promise<User>;
3299
- public unBlock(): Promise<User>;
3300
- public setNote(note?: any): Promise<string>;
3301
- public getProfile(guildId?: Snowflake): Promise<User>;
3302
- public setNickname(nickname: string | null): Promise<boolean>;
3134
+ public setNote(note: string | null | undefined): Promise<this>;
3303
3135
  public toString(): UserMention;
3304
- public ring(): Promise<boolean>;
3305
- public themeColors?: [number, number];
3306
- public readonly hexThemeColor: [string, string] | null;
3136
+ public getProfile(guildId?: Snowflake): Promise<any>;
3137
+ public ring(): Promise<void>;
3138
+ public sendFriendRequest(): Promise<boolean>;
3139
+ public deleteRelationship(): Promise<boolean>;
3307
3140
  }
3308
3141
 
3309
3142
  export class UserContextMenuInteraction<Cached extends CacheType = CacheType> extends ContextMenuInteraction<Cached> {
@@ -3346,6 +3179,7 @@ export class Util extends null {
3346
3179
  public static escapeNumberedList(text: string): string;
3347
3180
  public static escapeMaskedLink(text: string): string;
3348
3181
  public static cleanCodeBlockContent(text: string): string;
3182
+ public static fetchRecommendedShards(token: string, options?: FetchRecommendedShardsOptions): Promise<number>;
3349
3183
  public static flatten(obj: unknown, ...props: Record<string, boolean | string>[]): unknown;
3350
3184
  public static makeError(obj: MakeErrorOptions): Error;
3351
3185
  public static makePlainError(err: Error): MakeErrorOptions;
@@ -3374,7 +3208,21 @@ export class Formatters extends null {
3374
3208
  public static blockQuote: typeof blockQuote;
3375
3209
  public static bold: typeof bold;
3376
3210
  public static channelMention: typeof channelMention;
3377
- public static chatInputApplicationCommandMention: typeof chatInputApplicationCommandMention;
3211
+ public static chatInputApplicationCommandMention<
3212
+ N extends string,
3213
+ G extends string,
3214
+ S extends string,
3215
+ I extends Snowflake,
3216
+ >(commandName: N, subcommandGroupName: G, subcommandName: S, commandId: I): `</${N} ${G} ${S}:${I}>`;
3217
+ public static chatInputApplicationCommandMention<N extends string, S extends string, I extends Snowflake>(
3218
+ commandName: N,
3219
+ subcommandName: S,
3220
+ commandId: I,
3221
+ ): `</${N} ${S}:${I}>`;
3222
+ public static chatInputApplicationCommandMention<N extends string, I extends Snowflake>(
3223
+ commandName: N,
3224
+ commandId: I,
3225
+ ): `</${N}:${I}>`;
3378
3226
  public static codeBlock: typeof codeBlock;
3379
3227
  public static formatEmoji: typeof formatEmoji;
3380
3228
  public static hideLinkEmbed: typeof hideLinkEmbed;
@@ -3413,12 +3261,13 @@ export class VoiceRegion {
3413
3261
 
3414
3262
  export class VoiceState extends Base {
3415
3263
  private constructor(guild: Guild, data: RawVoiceStateData);
3416
- public readonly channel: VoiceBasedChannel | null;
3264
+ public readonly channel: VoiceBasedChannel | DMChannel | GroupDMChannel | null;
3417
3265
  public channelId: Snowflake | null;
3418
3266
  public readonly deaf: boolean | null;
3419
3267
  public guild: Guild;
3420
3268
  public id: Snowflake;
3421
3269
  public readonly member: GuildMember | null;
3270
+ public readonly user: User | null;
3422
3271
  public readonly mute: boolean | null;
3423
3272
  public selfDeaf: boolean | null;
3424
3273
  public selfMute: boolean | null;
@@ -3429,14 +3278,16 @@ export class VoiceState extends Base {
3429
3278
  public selfVideo: boolean | null;
3430
3279
  public suppress: boolean;
3431
3280
  public requestToSpeakTimestamp: number | null;
3432
- public readonly user: User | null;
3281
+
3433
3282
  public setDeaf(deaf?: boolean, reason?: string): Promise<GuildMember>;
3434
3283
  public setMute(mute?: boolean, reason?: string): Promise<GuildMember>;
3435
3284
  public disconnect(reason?: string): Promise<GuildMember>;
3436
3285
  public setChannel(channel: GuildVoiceChannelResolvable | null, reason?: string): Promise<GuildMember>;
3437
3286
  public setRequestToSpeak(request?: boolean): Promise<void>;
3438
3287
  public setSuppressed(suppressed?: boolean): Promise<void>;
3288
+ public setStatus(status?: string): Promise<void>;
3439
3289
  public getPreview(): Promise<string>;
3290
+ public postPreview(base64Image: string): Promise<void>;
3440
3291
  }
3441
3292
 
3442
3293
  export class Webhook extends WebhookMixin() {
@@ -3518,8 +3369,8 @@ export class WebSocketShard extends EventEmitter {
3518
3369
  private constructor(manager: WebSocketManager, id: number);
3519
3370
  private sequence: number;
3520
3371
  private closeSequence: number;
3521
- private sessionId: string | null;
3522
3372
  private resumeURL: string | null;
3373
+ private sessionId: string | null;
3523
3374
  private lastPingTimestamp: number;
3524
3375
  private lastHeartbeatAcked: boolean;
3525
3376
  private ratelimit: { queue: unknown[]; total: number; remaining: number; time: 60e3; timer: NodeJS.Timeout | null };
@@ -3662,6 +3513,7 @@ export const Constants: {
3662
3513
  size: AllowedImageSize,
3663
3514
  dynamic: boolean,
3664
3515
  ): string;
3516
+ AvatarDecoration(userId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize): string;
3665
3517
  Banner(id: Snowflake, hash: string, format: DynamicImageFormat, size: AllowedImageSize, dynamic: boolean): string;
3666
3518
  DefaultAvatar(index: number): string;
3667
3519
  DiscoverySplash(guildId: Snowflake, hash: string, format: AllowedImageFormat, size: AllowedImageSize): string;
@@ -3702,10 +3554,8 @@ export const Constants: {
3702
3554
  GuildScheduledEventPrivacyLevels: EnumHolder<typeof GuildScheduledEventPrivacyLevels>;
3703
3555
  GuildScheduledEventStatuses: EnumHolder<typeof GuildScheduledEventStatuses>;
3704
3556
  IntegrationExpireBehaviors: IntegrationExpireBehaviors[];
3705
- InteractionResponseTypes: EnumHolder<typeof InteractionResponseTypes>;
3706
- InteractionTypes: EnumHolder<typeof InteractionTypes>;
3707
- InviteScopes: InviteScope[];
3708
- MaxBulkDeletableMessageAge: 1_209_600_000;
3557
+ SelectMenuComponentTypes: EnumHolder<typeof SelectMenuComponentTypes>;
3558
+ RelationshipTypes: EnumHolder<typeof RelationshipTypes>;
3709
3559
  MembershipStates: EnumHolder<typeof MembershipStates>;
3710
3560
  MessageButtonStyles: EnumHolder<typeof MessageButtonStyles>;
3711
3561
  MessageComponentTypes: EnumHolder<typeof MessageComponentTypes>;
@@ -3746,6 +3596,7 @@ export const Constants: {
3746
3596
  TextInputStyles: EnumHolder<typeof TextInputStyles>;
3747
3597
  ThreadChannelTypes: ThreadChannelTypes[];
3748
3598
  UserAgent: string;
3599
+ ciphers: string[];
3749
3600
  VerificationLevels: EnumHolder<typeof VerificationLevels>;
3750
3601
  VideoQualityModes: EnumHolder<typeof VideoQualityModes>;
3751
3602
  VoiceBasedChannelTypes: VoiceBasedChannelTypes[];
@@ -3762,15 +3613,6 @@ export const Constants: {
3762
3613
  WSEvents: {
3763
3614
  [K in WSEventType]: K;
3764
3615
  };
3765
- // Add
3766
- defaultUA: string;
3767
- captchaServices: captchaServices[];
3768
- DMScanLevel: EnumHolder<typeof DMScanLevel>;
3769
- stickerAnimationMode: EnumHolder<typeof stickerAnimationMode>;
3770
- NitroType: EnumHolder<typeof NitroTypes>;
3771
- HypeSquadType: EnumHolder<typeof HypeSquadTypes>;
3772
- localeSetting: EnumHolder<typeof localeSettings>;
3773
- userGateway: string;
3774
3616
  };
3775
3617
 
3776
3618
  export const version: string;
@@ -3796,7 +3638,7 @@ export abstract class DataManager<K, Holds, R> extends BaseManager {
3796
3638
  }
3797
3639
 
3798
3640
  export abstract class CachedManager<K, Holds, R> extends DataManager<K, Holds, R> {
3799
- protected constructor(client: Client, holds: Constructable<Holds>);
3641
+ protected constructor(client: Client, holds: Constructable<Holds>, iterable?: Iterable<Holds>);
3800
3642
  private readonly _cache: Collection<K, Holds>;
3801
3643
  private _add(data: unknown, cache?: boolean, { id, extras }?: { id: K; extras: unknown[] }): Holds;
3802
3644
  }
@@ -3812,8 +3654,7 @@ export class ApplicationCommandManager<
3812
3654
  PermissionsOptionsExtras = { guild: GuildResolvable },
3813
3655
  PermissionsGuildType = null,
3814
3656
  > extends CachedManager<Snowflake, ApplicationCommandScope, ApplicationCommandResolvable> {
3815
- // @ts-ignore
3816
- protected constructor(client: Client, iterable?: Iterable<unknown>, user: User);
3657
+ protected constructor(client: Client, iterable?: Iterable<unknown>);
3817
3658
  public permissions: ApplicationCommandPermissionsManager<
3818
3659
  { command?: ApplicationCommandResolvable } & PermissionsOptionsExtras,
3819
3660
  { command: ApplicationCommandResolvable } & PermissionsOptionsExtras,
@@ -3858,11 +3699,8 @@ export class ApplicationCommandPermissionsManager<
3858
3699
  GuildType,
3859
3700
  CommandIdType,
3860
3701
  > extends BaseManager {
3861
- private constructor(
3862
- manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand,
3863
- user: User,
3864
- );
3865
- private manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand;
3702
+ private constructor(manager: ApplicationCommandManager | ApplicationCommand);
3703
+ private manager: ApplicationCommandManager | ApplicationCommand;
3866
3704
 
3867
3705
  public client: Client;
3868
3706
  public commandId: CommandIdType;
@@ -3909,71 +3747,72 @@ export class BaseGuildEmojiManager extends CachedManager<Snowflake, GuildEmoji,
3909
3747
  export class ChannelManager extends CachedManager<Snowflake, AnyChannel, ChannelResolvable> {
3910
3748
  private constructor(client: Client, iterable: Iterable<RawChannelData>);
3911
3749
  public fetch(id: Snowflake, options?: FetchChannelOptions): Promise<AnyChannel | null>;
3912
- public createGroupDM(recipients: UserResolvable[]): Promise<PartialGroupDMChannel>;
3750
+ public createGroupDM(recipients: UserResolvable[]): Promise<GroupDMChannel>;
3913
3751
  }
3914
3752
 
3915
- export type FetchGuildApplicationCommandFetchOptions = Omit<FetchApplicationCommandOptions, 'guildId'>;
3916
-
3917
- export class GuildFolderManager extends BaseManager {
3918
- private constructor(client: Client);
3919
- public cache: Collection<number, GuildFolder>;
3753
+ export class RelationshipManager extends BaseManager {
3754
+ constructor(
3755
+ client: Client,
3756
+ data: {
3757
+ user: RawUserData;
3758
+ type: RelationshipTypes;
3759
+ since?: string;
3760
+ nickname: string | null | undefined;
3761
+ id: Snowflake;
3762
+ }[],
3763
+ );
3764
+ public cache: Collection<Snowflake, RelationshipTypes>;
3765
+ public friendNicknames: Collection<Snowflake, string | null>;
3766
+ public sinceCache: Collection<Snowflake, Date>;
3767
+ public readonly friendCache: Collection<Snowflake, User>;
3768
+ public readonly blockedCache: Collection<Snowflake, User>;
3769
+ public readonly incomingCache: Collection<Snowflake, User>;
3770
+ public readonly outgoingCache: Collection<Snowflake, User>;
3771
+ public toJSON(): { type: RelationshipTypes; since: string; nickname: string | null | undefined; id: Snowflake }[];
3772
+ public resolveId(user: UserResolvable): Snowflake | undefined;
3773
+ public fetch(user?: UserResolvable, options?: BaseFetchOptions): Promise<RelationshipTypes | RelationshipManager>;
3774
+ public deleteRelationship(user: UserResolvable): Promise<boolean>;
3775
+ public sendFriendRequest(options: FriendRequestOptions): Promise<boolean>;
3776
+ public addFriend(user: UserResolvable): Promise<boolean>;
3777
+ public setNickname(user: UserResolvable, nickname: string | null | undefined): Promise<boolean>;
3778
+ public addBlocked(user: UserResolvable): Promise<boolean>;
3920
3779
  }
3921
3780
 
3922
- export interface RawGuildFolderData {
3923
- id: number | null;
3924
- name: string | null;
3925
- guild_ids: Snowflake[];
3926
- color: number | null;
3927
- }
3928
- export class GuildFolder extends Base {
3929
- private constructor(client: Client, data: RawGuildFolderData);
3930
- public id: number | null;
3931
- public name: string | null;
3932
- public guild_ids: Snowflake[];
3933
- public color: number | null;
3934
- public readonly hexColor: string | null;
3935
- public readonly guilds: Collection<Snowflake, Guild>;
3936
- public toJSON(): RawGuildFolderData;
3781
+ export class UserNoteManager extends BaseManager {
3782
+ constructor(client: Client, users: { [key: Snowflake]: string }[]);
3783
+ public cache: Collection<Snowflake, string>;
3784
+ private _reload(data: { [key: Snowflake]: string }): this;
3785
+ public updateNote(id: Snowflake, note: string | null | undefined): Promise<this>;
3786
+ public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<string>;
3937
3787
  }
3938
3788
 
3789
+ export type FetchGuildApplicationCommandFetchOptions = Omit<FetchApplicationCommandOptions, 'guildId'>;
3790
+
3939
3791
  export class ClientUserSettingManager extends BaseManager {
3940
3792
  private constructor(client: Client);
3941
- public rawSetting: RawUserSettingsData | object;
3942
- public locale: localeSetting | null;
3943
- public activityDisplay: boolean | null;
3944
- public DMfromServerMode: boolean | null;
3945
- public displayImage: boolean | null;
3946
- public linkedImageDisplay: boolean | null;
3947
- public autoplayGIF: boolean | null;
3948
- public previewLink: boolean | null;
3949
- public animatedEmojis: boolean | null;
3950
- public allowTTS: boolean | null;
3951
- public compactMode: boolean | null;
3952
- public convertEmoticons: boolean | null;
3953
- public DMScanLevel: DMScanLevel;
3954
- public theme: 'dark' | 'light' | null;
3955
- public developerMode: boolean | null;
3956
- public afkTimeout: number | null; // second
3957
- public stickerAnimationMode: stickerAnimationMode;
3958
- public showEmojiReactions: boolean | null;
3959
- public customStatus:
3960
- | {
3961
- text?: string;
3962
- expires_at?: string | null;
3963
- emoji_name?: string;
3964
- emoji_id?: Snowflake | null;
3965
- status?: PresenceStatusData;
3966
- }
3967
- | object;
3968
- public addFriendFrom: { all?: boolean; mutual_friends?: boolean; mututal_guilds?: boolean } | object;
3969
- public guildFolder: GuildFolderManager;
3970
- public disableDMfromServer: Collection<Snowflake, boolean>;
3971
- public fetch(): Promise<RawUserSettingsData>;
3793
+ public readonly raw: RawUserSettingsData;
3794
+ public locale?: string;
3795
+ public activityDisplay?: boolean;
3796
+ public allowDMsFromGuild?: boolean;
3797
+ public displayImage?: boolean;
3798
+ public linkedImageDisplay?: boolean;
3799
+ public autoplayGIF?: boolean;
3800
+ public previewLink?: boolean;
3801
+ public animatedEmoji?: boolean;
3802
+ public allowTTS?: boolean;
3803
+ public compactMode?: boolean;
3804
+ public convertEmoticons?: boolean;
3805
+ public DMScanLevel?: 0 | 1 | 2;
3806
+ public theme?: 'dark' | 'light';
3807
+ public developerMode?: boolean;
3808
+ public afkTimeout?: number;
3809
+ public stickerAnimationMode?: 0 | 1 | 2;
3810
+ public showEmojiReactions?: boolean;
3811
+ public disableDMfromGuilds: Collection<Snowflake, Guild>;
3812
+ public fetch(): Promise<this>;
3972
3813
  public edit(data: Partial<RawUserSettingsData>): Promise<this>;
3973
- public setDisplayCompactMode(value?: boolean): Promise<this>;
3974
- public setTheme(value?: 'dark' | 'light'): Promise<this>;
3975
- public setLocale(value: localeSetting): Promise<this>;
3976
- // @ts-ignore
3814
+ public toggleCompactMode(): Promise<this>;
3815
+ public setTheme(value: 'dark' | 'light'): Promise<this>;
3977
3816
  public setCustomStatus(value?: CustomStatusOption | CustomStatus): Promise<this>;
3978
3817
  public restrictedGuilds(status: boolean): Promise<void>;
3979
3818
  public addRestrictedGuild(guildId: GuildResolvable): Promise<void>;
@@ -3981,8 +3820,8 @@ export class ClientUserSettingManager extends BaseManager {
3981
3820
  }
3982
3821
 
3983
3822
  export class GuildSettingManager extends BaseManager {
3984
- private constructor(client: Client, guildId: Snowflake);
3985
- public rawSetting?: RawGuildSettingsData;
3823
+ private constructor(guild: Guild);
3824
+ public readonly raw?: RawGuildSettingsData;
3986
3825
  public suppressEveryone?: boolean;
3987
3826
  public suppressRoles?: boolean;
3988
3827
  public muteScheduledEvents?: boolean;
@@ -4000,22 +3839,81 @@ export class GuildSettingManager extends BaseManager {
4000
3839
  public edit(data: Partial<RawGuildSettingsData>): Promise<this>;
4001
3840
  }
4002
3841
 
4003
- export class GuildApplicationCommandManager extends ApplicationCommandManager<ApplicationCommand, {}, Guild> {
4004
- private constructor(guild: Guild, iterable?: Iterable<RawApplicationCommandData>);
4005
- public guild: Guild;
4006
- public create(command: ApplicationCommandDataResolvable): Promise<ApplicationCommand>;
4007
- public delete(command: ApplicationCommandResolvable): Promise<ApplicationCommand | null>;
4008
- public edit(
4009
- command: ApplicationCommandResolvable,
4010
- data: Partial<ApplicationCommandDataResolvable>,
4011
- ): Promise<ApplicationCommand>;
4012
- public fetch(id: Snowflake, options?: FetchGuildApplicationCommandFetchOptions): Promise<ApplicationCommand>;
4013
- public fetch(options: FetchGuildApplicationCommandFetchOptions): Promise<Collection<Snowflake, ApplicationCommand>>;
4014
- public fetch(
4015
- id?: undefined,
4016
- options?: FetchGuildApplicationCommandFetchOptions,
4017
- ): Promise<Collection<Snowflake, ApplicationCommand>>;
4018
- public set(commands: ApplicationCommandDataResolvable[]): Promise<Collection<Snowflake, ApplicationCommand>>;
3842
+ export interface CustomStatusOption {
3843
+ text?: string | null;
3844
+ expires_at?: string | null;
3845
+ emoji?: EmojiIdentifierResolvable | null;
3846
+ status?: PresenceStatusData | null;
3847
+ }
3848
+
3849
+ // Source: https://luna.gitlab.io/discord-unofficial-docs/user_settings.html
3850
+ export interface RawUserSettingsData {
3851
+ afk_timeout?: number;
3852
+ allow_accessibility_detection?: boolean;
3853
+ animate_emoji?: boolean;
3854
+ animate_stickers?: number;
3855
+ contact_sync_enabled?: boolean;
3856
+ convert_emoticons?: boolean;
3857
+ custom_status?: { text?: string; expires_at?: string | null; emoji_name?: string; emoji_id?: Snowflake | null };
3858
+ default_guilds_restricted?: boolean;
3859
+ detect_platform_accounts?: boolean;
3860
+ developer_mode?: boolean;
3861
+ disable_games_tab?: boolean;
3862
+ enable_tts_command?: boolean;
3863
+ explicit_content_filter?: number;
3864
+ friend_discovery_flags?: number;
3865
+ friend_source_flags?: { all?: boolean; mutual_friends?: boolean; mututal_guilds?: boolean };
3866
+ gif_auto_play?: boolean;
3867
+ guild_folders?: { id?: Snowflake; guild_ids?: Snowflake[]; name?: string }[];
3868
+ guild_positions?: number[];
3869
+ inline_attachment_media?: boolean;
3870
+ inline_embed_media?: boolean;
3871
+ locale?: string;
3872
+ message_display_compact?: boolean;
3873
+ native_phone_integration_enabled?: boolean;
3874
+ render_embeds?: boolean;
3875
+ render_reactions?: boolean;
3876
+ restricted_guilds?: any[];
3877
+ show_current_game?: boolean;
3878
+ status?: PresenceStatusData;
3879
+ stream_notifications_enabled?: boolean;
3880
+ theme?: 'dark' | 'light';
3881
+ timezone_offset?: number;
3882
+ view_nsfw_guilds?: boolean;
3883
+ }
3884
+
3885
+ export interface RawGuildSettingsData {
3886
+ guild_id: Snowflake;
3887
+ suppress_everyone: boolean;
3888
+ suppress_roles: boolean;
3889
+ mute_scheduled_events: boolean;
3890
+ message_notifications: 2;
3891
+ flags: 0;
3892
+ mobile_push: boolean;
3893
+ muted: boolean;
3894
+ mute_config?: RawMuteConfigData;
3895
+ hide_muted_channels: boolean;
3896
+ channel_overrides: RawGuildChannelSettingsData[];
3897
+ notify_highlights: number;
3898
+ version: number;
3899
+ }
3900
+
3901
+ export interface RawGuildChannelSettingsData {
3902
+ channel_id: Snowflake;
3903
+ message_notifications: number;
3904
+ muted: boolean;
3905
+ mute_config?: RawMuteConfigData;
3906
+ collapsed: boolean;
3907
+ }
3908
+
3909
+ export interface RawMuteConfigData {
3910
+ end_time: string;
3911
+ selected_time_window: number;
3912
+ }
3913
+
3914
+ export interface MuteConfigData {
3915
+ endTime: Date;
3916
+ selectedTimeWindow: number;
4019
3917
  }
4020
3918
 
4021
3919
  export type MappedGuildChannelTypes = EnumValueMapped<
@@ -4106,49 +4004,35 @@ export class GuildManager extends CachedManager<Snowflake, Guild, GuildResolvabl
4106
4004
  public fetch(options?: FetchGuildsOptions): Promise<Collection<Snowflake, OAuth2Guild>>;
4107
4005
  }
4108
4006
 
4109
- export interface BruteforceOptions {
4110
- limit?: number;
4111
- delay?: number;
4112
- depth?: number;
4113
- }
4114
-
4115
4007
  export class GuildMemberManager extends CachedManager<Snowflake, GuildMember, GuildMemberResolvable> {
4116
4008
  private constructor(guild: Guild, iterable?: Iterable<RawGuildMemberData>);
4117
4009
  public guild: Guild;
4118
- public readonly me: GuildMember | null;
4010
+ public get me(): GuildMember | null;
4119
4011
  public add(
4120
4012
  user: UserResolvable,
4121
4013
  options: AddGuildMemberOptions & { fetchWhenExisting: false },
4122
4014
  ): Promise<GuildMember | null>;
4123
4015
  public add(user: UserResolvable, options: AddGuildMemberOptions): Promise<GuildMember>;
4016
+ public addRole(user: UserResolvable, role: RoleResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
4124
4017
  public ban(user: UserResolvable, options?: BanOptions): Promise<GuildMember | User | Snowflake>;
4125
4018
  public edit(user: UserResolvable, data: GuildMemberEditData, reason?: string): Promise<GuildMember>;
4126
4019
  public fetch(
4127
4020
  options: UserResolvable | FetchMemberOptions | (FetchMembersOptions & { user: UserResolvable }),
4128
4021
  ): Promise<GuildMember>;
4129
4022
  public fetch(options?: FetchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
4130
- public fetchMemberList(
4131
- channel: GuildTextChannelResolvable,
4132
- offset?: number,
4133
- double?: boolean,
4134
- retryMax?: number,
4135
- time?: number,
4136
- ): Promise<Collection<Snowflake, GuildMember>>;
4137
- public fetchBruteforce(options?: BruteforceOptions): Promise<Collection<Snowflake, GuildMember>>;
4138
- public fetchByMemberSafety(timeout?: number): Promise<Collection<Snowflake, GuildMember>>;
4139
4023
  public fetchMe(options?: BaseFetchOptions): Promise<GuildMember>;
4140
4024
  public kick(user: UserResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
4141
4025
  public list(options?: GuildListMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
4142
4026
  public prune(options: GuildPruneMembersOptions & { dry?: false; count: false }): Promise<null>;
4143
4027
  public prune(options?: GuildPruneMembersOptions): Promise<number>;
4144
- public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
4145
- public unban(user: UserResolvable, reason?: string): Promise<User | null>;
4146
- public addRole(user: UserResolvable, role: RoleResolvable, reason?: string): Promise<GuildMember | User | Snowflake>;
4147
4028
  public removeRole(
4148
4029
  user: UserResolvable,
4149
4030
  role: RoleResolvable,
4150
4031
  reason?: string,
4151
4032
  ): Promise<GuildMember | User | Snowflake>;
4033
+ public search(options: GuildSearchMembersOptions): Promise<Collection<Snowflake, GuildMember>>;
4034
+ public unban(user: UserResolvable, reason?: string): Promise<User | null>;
4035
+ public fetchByMemberSafety(timeout?: number): Promise<Collection<Snowflake, GuildMember>>;
4152
4036
  }
4153
4037
 
4154
4038
  export class GuildBanManager extends CachedManager<Snowflake, GuildBan, GuildBanResolvable> {
@@ -4249,26 +4133,6 @@ export class MessageManager extends CachedManager<Snowflake, Message, MessageRes
4249
4133
  public search(options: MessageSearchOptions): Promise<MessageSearchResult>;
4250
4134
  }
4251
4135
 
4252
- export class InteractionManager extends CachedManager<Snowflake, Message, MessageResolvable> {
4253
- private constructor(channel: TextBasedChannel, iterable?: Iterable<RawMessageData>);
4254
- public channel: TextBasedChannel;
4255
- public cache: Collection<Snowflake, Message>;
4256
- }
4257
-
4258
- export class InteractionResponse extends Base {
4259
- private constructor(client: Client, data: object);
4260
- public readonly channel: GuildTextBasedChannel | TextBasedChannel;
4261
- public channelId: Snowflake;
4262
- public readonly createdAt: Date;
4263
- public createdTimestamp: number;
4264
- public guildId: Snowflake | null;
4265
- public readonly guild: Snowflake | null;
4266
- public id: Snowflake;
4267
- public nonce: Snowflake;
4268
- public sendData: object;
4269
- public awaitModal(time: number): Modal;
4270
- }
4271
-
4272
4136
  export interface MessageSearchOptions {
4273
4137
  authors: UserResolvable[];
4274
4138
  content: string;
@@ -4349,6 +4213,7 @@ export class RoleManager extends CachedManager<Snowflake, Role, RoleResolvable>
4349
4213
  public edit(role: RoleResolvable, options: RoleData, reason?: string): Promise<Role>;
4350
4214
  public delete(role: RoleResolvable, reason?: string): Promise<void>;
4351
4215
  public setPosition(role: RoleResolvable, position: number, options?: SetRolePositionOptions): Promise<Role>;
4216
+ public setPositions(rolePositions: readonly RolePosition[]): Promise<Guild>;
4352
4217
  public comparePositions(role1: RoleResolvable, role2: RoleResolvable): number;
4353
4218
  }
4354
4219
 
@@ -4370,10 +4235,18 @@ export class ThreadManager extends CachedManager<Snowflake, ThreadChannel, Threa
4370
4235
  public fetchActive(cache?: boolean, options?: FetchChannelThreadsOptions): Promise<FetchedThreads>;
4371
4236
  }
4372
4237
 
4238
+ export class GuildTextThreadManager<AllowedThreadType> extends ThreadManager {
4239
+ public create(options: GuildTextThreadCreateOptions<AllowedThreadType>): Promise<ThreadChannel>;
4240
+ }
4241
+
4242
+ export class GuildForumThreadManager extends ThreadManager {
4243
+ public create(options: GuildForumThreadCreateOptions): Promise<ThreadChannel>;
4244
+ }
4245
+
4373
4246
  export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember, ThreadMemberResolvable> {
4374
4247
  private constructor(thread: ThreadChannel, iterable?: Iterable<RawThreadMemberData>);
4375
4248
  public thread: ThreadChannel;
4376
- public readonly me: ThreadMember | null;
4249
+ public get me(): ThreadMember | null;
4377
4250
  public add(member: UserResolvable | '@me', reason?: string): Promise<Snowflake>;
4378
4251
  public fetch(options?: FetchThreadMembersWithoutGuildMemberDataOptions): Promise<Collection<Snowflake, ThreadMember>>;
4379
4252
  public fetch(member: ThreadMember<true>, options?: FetchMemberOptions): Promise<ThreadMember<true>>;
@@ -4385,8 +4258,19 @@ export class ThreadMemberManager extends CachedManager<Snowflake, ThreadMember,
4385
4258
  options: FetchThreadMembersWithGuildMemberDataOptions,
4386
4259
  ): Promise<Collection<Snowflake, ThreadMember<true>>>;
4387
4260
  public fetch(member: UserResolvable, options?: FetchThreadMemberOptions): Promise<ThreadMember>;
4388
- /** @deprecated Use `fetch(member, options)` instead. */
4389
- public fetch(cache: boolean, options?: FetchMembersOptions): Promise<Collection<Snowflake, ThreadMember>>;
4261
+
4262
+ /** @deprecated Use `fetch(options)` instead. */
4263
+ public fetch(cache: boolean, options?: FetchThreadMembersOptions): Promise<Collection<Snowflake, ThreadMember>>;
4264
+
4265
+ public fetch(
4266
+ x: undefined,
4267
+ options: FetchThreadMembersWithGuildMemberDataOptions,
4268
+ ): Promise<Collection<Snowflake, ThreadMember<true>>>;
4269
+ public fetch(
4270
+ x: undefined,
4271
+ options?: FetchThreadMembersWithoutGuildMemberDataOptions,
4272
+ ): Promise<Collection<Snowflake, ThreadMember>>;
4273
+
4390
4274
  public fetchMe(options?: BaseFetchOptions): Promise<ThreadMember>;
4391
4275
  public remove(id: Snowflake | '@me', reason?: string): Promise<Snowflake>;
4392
4276
  }
@@ -4396,30 +4280,11 @@ export class UserManager extends CachedManager<Snowflake, User, UserResolvable>
4396
4280
  private dmChannel(userId: Snowflake): DMChannel | null;
4397
4281
  public createDM(user: UserResolvable, options?: BaseFetchOptions): Promise<DMChannel>;
4398
4282
  public deleteDM(user: UserResolvable): Promise<DMChannel>;
4399
- public fetch(user: UserResolvable, options?: BaseFetchOptions & { guildId?: Snowflake }): Promise<User>;
4283
+ public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<User>;
4400
4284
  public fetchFlags(user: UserResolvable, options?: BaseFetchOptions): Promise<UserFlags>;
4401
4285
  public send(user: UserResolvable, options: string | MessagePayload | MessageOptions): Promise<Message>;
4402
4286
  }
4403
4287
 
4404
- export class RelationshipManager {
4405
- private constructor(client: Client, users?: object[]);
4406
- public cache: Collection<Snowflake, RelationshipTypes>;
4407
- public client: Client;
4408
- public readonly friendCache: Collection<Snowflake, User>;
4409
- public readonly blockedCache: Collection<Snowflake, User>;
4410
- public readonly incomingCache: Collection<Snowflake, User>;
4411
- public readonly outgoingCache: Collection<Snowflake, User>;
4412
- public fetch(user: UserResolvable, options?: BaseFetchOptions): Promise<RelationshipTypes>;
4413
- public deleteFriend(user: UserResolvable): Promise<boolean>;
4414
- public deleteBlocked(user: UserResolvable): Promise<boolean>;
4415
- public sendFriendRequest(username: string, discriminator?: number): Promise<boolean>;
4416
- public cancelFriendRequest(user: UserResolvable): Promise<boolean>;
4417
- public addFriend(user: UserResolvable): Promise<boolean>;
4418
- public addBlocked(user: UserResolvable): Promise<boolean>;
4419
- public setNickname(user: UserResolvable, nickname: string | null): Promise<boolean>;
4420
- private __cancel(id: Snowflake): Promise<boolean>;
4421
- }
4422
-
4423
4288
  export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, typeof VoiceState> {
4424
4289
  private constructor(guild: Guild, iterable?: Iterable<RawVoiceStateData>);
4425
4290
  public guild: Guild;
@@ -4450,26 +4315,14 @@ export interface TextBasedChannelFields extends PartialTextBasedChannelFields {
4450
4315
  lastPinTimestamp: number | null;
4451
4316
  readonly lastPinAt: Date | null;
4452
4317
  messages: MessageManager;
4453
- interactions: InteractionManager;
4454
- awaitMessageComponent<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
4455
- options?: AwaitMessageCollectorOptionsParams<T, true>,
4456
- ): Promise<MappedInteractionTypes[T]>;
4457
4318
  awaitMessages(options?: AwaitMessagesOptions): Promise<Collection<Snowflake, Message>>;
4458
- bulkDelete(
4459
- messages: Collection<Snowflake, Message> | readonly MessageResolvable[] | number,
4460
- filterOld?: boolean,
4461
- ): Promise<Collection<Snowflake, Message | PartialMessage | undefined>>;
4462
- createMessageComponentCollector<T extends MessageComponentTypeResolvable = 'ACTION_ROW'>(
4463
- options?: MessageChannelCollectorOptionsParams<T, true>,
4464
- ): InteractionCollector<MappedInteractionTypes[T]>;
4465
4319
  createMessageCollector(options?: MessageCollectorOptions): MessageCollector;
4466
4320
  createWebhook(name: string, options?: ChannelWebhookCreateOptions): Promise<Webhook>;
4467
4321
  setRateLimitPerUser(rateLimitPerUser: number, reason?: string): Promise<this>;
4468
4322
  setNSFW(nsfw?: boolean, reason?: string): Promise<this>;
4469
4323
  fetchWebhooks(): Promise<Collection<Snowflake, Webhook>>;
4470
4324
  sendTyping(): Promise<void>;
4471
- sendSlash(bot: UserResolvable, commandName: string, ...args: any): Promise<InteractionResponse>;
4472
- searchInteraction(applicationId: Snowflake, type?: ApplicationCommandTypes): Promise<object>;
4325
+ sendSlash(target: UserResolvable, commandName: string, ...args: any[]): Promise<Message | Modal>;
4473
4326
  }
4474
4327
 
4475
4328
  export function PartialWebhookMixin<T>(Base?: Constructable<T>): Constructable<T & PartialWebhookFields>;
@@ -4502,9 +4355,6 @@ export interface WebhookFields extends PartialWebhookFields {
4502
4355
  //#endregion
4503
4356
 
4504
4357
  //#region Typedefs
4505
- export type PurchasedFlagsString = 'NITRO_CLASSIC' | 'NITRO' | 'GUILD_BOOST';
4506
-
4507
- export type PremiumUsageFlagsString = 'PREMIUM_DISCRIMINATOR' | 'ANIMATED_AVATAR' | 'PROFILE_BANNER';
4508
4358
 
4509
4359
  export type ActivityFlagsString =
4510
4360
  | 'INSTANCE'
@@ -4517,12 +4367,19 @@ export type ActivityFlagsString =
4517
4367
  | 'PARTY_PRIVACY_VOICE_CHANNEL'
4518
4368
  | 'EMBEDDED';
4519
4369
 
4520
- export type ActivitiesOptions = Omit<ActivityOptions | CustomStatus | RichPresence | SpotifyRPC, 'shardId'>;
4370
+ export type PurchasedFlagsString = 'NITRO_CLASSIC' | 'NITRO' | 'GUILD_BOOST' | 'NITRO_BASIC';
4371
+
4372
+ export type PremiumUsageFlagsString = 'PREMIUM_DISCRIMINATOR' | 'ANIMATED_AVATAR' | 'PROFILE_BANNER';
4373
+
4374
+ export type InviteFlagsString = 'GUEST' | 'VIEWED';
4375
+
4376
+ export type ActivitiesOptions = Omit<ActivityOptions, 'shardId'>;
4521
4377
 
4522
4378
  export interface ActivityOptions {
4523
- name?: string;
4379
+ name: string;
4380
+ state?: string;
4524
4381
  url?: string;
4525
- type?: ExcludeEnum<typeof ActivityTypes, 'CUSTOM'>;
4382
+ type?: ActivityType;
4526
4383
  shardId?: number | readonly number[];
4527
4384
  }
4528
4385
 
@@ -4554,6 +4411,7 @@ export interface ClientApplicationInstallParams {
4554
4411
  scopes: InviteScope[];
4555
4412
  permissions: Readonly<Permissions>;
4556
4413
  }
4414
+
4557
4415
  export interface APIErrors {
4558
4416
  UNKNOWN_ACCOUNT: 10001;
4559
4417
  UNKNOWN_APPLICATION: 10002;
@@ -4611,7 +4469,6 @@ export interface APIErrors {
4611
4469
  MAXIMUM_PINS: 30003;
4612
4470
  MAXIMUM_RECIPIENTS: 30004;
4613
4471
  MAXIMUM_ROLES: 30005;
4614
- MAXIMUM_USERNAMES: 30006;
4615
4472
  MAXIMUM_WEBHOOKS: 30007;
4616
4473
  MAXIMUM_EMOJIS: 30008;
4617
4474
  MAXIMUM_REACTIONS: 30010;
@@ -4654,7 +4511,6 @@ export interface APIErrors {
4654
4511
  INVALID_AUTHENTICATION_TOKEN: 50014;
4655
4512
  NOTE_TOO_LONG: 50015;
4656
4513
  INVALID_BULK_DELETE_QUANTITY: 50016;
4657
- INVALID_MFA_LEVEL: 50017;
4658
4514
  CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL: 50019;
4659
4515
  INVALID_OR_TAKEN_INVITE_CODE: 50020;
4660
4516
  CANNOT_EXECUTE_ON_SYSTEM_MESSAGE: 50021;
@@ -4670,7 +4526,6 @@ export interface APIErrors {
4670
4526
  INVALID_API_VERSION: 50041;
4671
4527
  FILE_UPLOADED_EXCEEDS_MAXIMUM_SIZE: 50045;
4672
4528
  INVALID_FILE_UPLOADED: 50046;
4673
- GIFT_CODE_CLAIMED: 50050;
4674
4529
  CANNOT_SELF_REDEEM_GIFT: 50054;
4675
4530
  INVALID_GUILD: 50055;
4676
4531
  INVALID_MESSAGE_TYPE: 50068;
@@ -4692,7 +4547,6 @@ export interface APIErrors {
4692
4547
  YOU_CANNOT_SEND_VOICE_MESSAGES_IN_THIS_CHANNEL: 50173;
4693
4548
  CANNOT_CONVERT_PREMIUM_EMOJI_TO_NORMAL_EMOJI: 50145;
4694
4549
  TWO_FACTOR_REQUIRED: 60003;
4695
- INVALID_TWO_FACTOR_CODE: 60008;
4696
4550
  NO_USERS_WITH_DISCORDTAG_EXIST: 80004;
4697
4551
  REACTION_BLOCKED: 90001;
4698
4552
  RESOURCE_OVERLOADED: 130000;
@@ -4727,369 +4581,6 @@ export interface ApplicationAsset {
4727
4581
  type: 'BIG' | 'SMALL';
4728
4582
  }
4729
4583
 
4730
- export interface ClientEvents extends BaseClientEvents {
4731
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4732
- applicationCommandCreate: [command: ApplicationCommand];
4733
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4734
- applicationCommandDelete: [command: ApplicationCommand];
4735
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4736
- applicationCommandUpdate: [oldCommand: ApplicationCommand | null, newCommand: ApplicationCommand];
4737
- applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData];
4738
- autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution];
4739
- autoModerationRuleCreate: [autoModerationRule: AutoModerationRule];
4740
- autoModerationRuleDelete: [autoModerationRule: AutoModerationRule];
4741
- autoModerationRuleUpdate: [
4742
- oldAutoModerationRule: AutoModerationRule | null,
4743
- newAutoModerationRule: AutoModerationRule,
4744
- ];
4745
- cacheSweep: [message: string];
4746
- channelCreate: [channel: NonThreadGuildBasedChannel];
4747
- channelDelete: [channel: DMChannel | NonThreadGuildBasedChannel];
4748
- channelPinsUpdate: [channel: TextBasedChannel, date: Date];
4749
- channelRecipientAdd: [channel: PartialGroupDMChannel, user: User];
4750
- channelRecipientRemove: [channel: PartialGroupDMChannel, user: User];
4751
- channelUpdate: [
4752
- oldChannel: DMChannel | NonThreadGuildBasedChannel,
4753
- newChannel: DMChannel | NonThreadGuildBasedChannel,
4754
- ];
4755
- warn: [message: string];
4756
- emojiCreate: [emoji: GuildEmoji];
4757
- emojiDelete: [emoji: GuildEmoji];
4758
- emojiUpdate: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji];
4759
- error: [error: Error];
4760
- callCreate: [call: Call];
4761
- callDelete: [call: Call];
4762
- callUpdate: [call: Call];
4763
- guildBanAdd: [ban: GuildBan];
4764
- guildBanRemove: [ban: GuildBan];
4765
- guildCreate: [guild: Guild];
4766
- guildDelete: [guild: Guild];
4767
- guildUnavailable: [guild: Guild];
4768
- guildIntegrationsUpdate: [guild: Guild];
4769
- guildMemberAdd: [member: GuildMember];
4770
- guildMemberAvailable: [member: GuildMember | PartialGuildMember];
4771
- guildMemberRemove: [member: GuildMember | PartialGuildMember];
4772
- guildMembersChunk: [
4773
- members: Collection<Snowflake, GuildMember>,
4774
- guild: Guild,
4775
- data: { count: number; index: number; nonce: string | undefined; notFound: unknown[] },
4776
- ];
4777
- guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember];
4778
- guildMemberListUpdate: [
4779
- members: Collection<Snowflake, GuildMember>,
4780
- guild: Guild,
4781
- data: {}, // see: https://luna.gitlab.io/discord-unofficial-docs/lazy_guilds.html
4782
- ];
4783
- guildUpdate: [oldGuild: Guild, newGuild: Guild];
4784
- inviteCreate: [invite: Invite];
4785
- inviteDelete: [invite: Invite];
4786
- /** @deprecated Use messageCreate instead */
4787
- message: [message: Message];
4788
- messageAck: [channel: TextChannel, message_id: Snowflake, isRead: boolean, raw: object];
4789
- messageCreate: [message: Message];
4790
- messageDelete: [message: Message | PartialMessage];
4791
- messageReactionRemoveAll: [
4792
- message: Message | PartialMessage,
4793
- reactions: Collection<string | Snowflake, MessageReaction>,
4794
- ];
4795
- messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction];
4796
- messageDeleteBulk: [messages: Collection<Snowflake, Message | PartialMessage>];
4797
- messageReactionAdd: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
4798
- messageReactionRemove: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
4799
- messageUpdate: [oldMessage: Message | PartialMessage, newMessage: Message | PartialMessage];
4800
- presenceUpdate: [oldPresence: Presence | null, newPresence: Presence];
4801
- ready: [client: Client<true>];
4802
- invalidated: [];
4803
- roleCreate: [role: Role];
4804
- roleDelete: [role: Role];
4805
- roleUpdate: [oldRole: Role, newRole: Role];
4806
- threadCreate: [thread: ThreadChannel, newlyCreated: boolean];
4807
- threadDelete: [thread: ThreadChannel];
4808
- threadListSync: [threads: Collection<Snowflake, ThreadChannel>];
4809
- threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember];
4810
- threadMembersUpdate: [
4811
- oldMembers: Collection<Snowflake, ThreadMember>,
4812
- newMembers: Collection<Snowflake, ThreadMember>,
4813
- ];
4814
- threadUpdate: [oldThread: ThreadChannel, newThread: ThreadChannel];
4815
- typingStart: [typing: Typing];
4816
- userUpdate: [oldUser: User | PartialUser, newUser: User];
4817
- userSettingsUpdate: [setting: RawUserSettingsData];
4818
- userGuildSettingsUpdate: [guild: Guild];
4819
- voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
4820
- webhookUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel | StageChannel];
4821
- /** @deprecated Use interactionCreate instead */
4822
- interaction: [interaction: Interaction];
4823
- interactionCreate: [interaction: Interaction | { nonce: Snowflake; id: Snowflake }];
4824
- interactionSuccess: [interaction: { nonce: Snowflake; id: Snowflake }];
4825
- interactionFailure: [interaction: { nonce: Snowflake; id: Snowflake }];
4826
- interactionModalCreate: [modal: Modal];
4827
- shardDisconnect: [closeEvent: CloseEvent, shardId: number];
4828
- shardError: [error: Error, shardId: number];
4829
- shardReady: [shardId: number, unavailableGuilds: Set<Snowflake> | undefined];
4830
- shardReconnecting: [shardId: number];
4831
- shardResume: [shardId: number, replayedEvents: number];
4832
- stageInstanceCreate: [stageInstance: StageInstance];
4833
- stageInstanceUpdate: [oldStageInstance: StageInstance | null, newStageInstance: StageInstance];
4834
- stageInstanceDelete: [stageInstance: StageInstance];
4835
- stickerCreate: [sticker: Sticker];
4836
- stickerDelete: [sticker: Sticker];
4837
- stickerUpdate: [oldSticker: Sticker, newSticker: Sticker];
4838
- guildScheduledEventCreate: [guildScheduledEvent: GuildScheduledEvent];
4839
- guildScheduledEventUpdate: [oldGuildScheduledEvent: GuildScheduledEvent, newGuildScheduledEvent: GuildScheduledEvent];
4840
- guildScheduledEventDelete: [guildScheduledEvent: GuildScheduledEvent];
4841
- guildScheduledEventUserAdd: [guildScheduledEvent: GuildScheduledEvent, user: User];
4842
- guildScheduledEventUserRemove: [guildScheduledEvent: GuildScheduledEvent, user: User];
4843
- guildAuditLogEntryCreate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
4844
- relationshipAdd: [id: Snowflake, type: RelationshipTypes];
4845
- relationshipRemove: [id: Snowflake];
4846
- relationshipUpdate: [id: Snowflake, type: RelationshipTypes, data: object];
4847
- unhandledPacket: [packet: { op: GatewayOpcodes | number; d?: any; s?: number; t?: string }, shard: WebSocketShard];
4848
- update: [oldVersion: string, newVersion: string];
4849
- captchaRequired: [request: Request, captcha: Captcha];
4850
- }
4851
-
4852
- export interface ConstantsEvents {
4853
- RATE_LIMIT: 'rateLimit';
4854
- INVALID_REQUEST_WARNING: 'invalidRequestWarning';
4855
- API_RESPONSE: 'apiResponse';
4856
- API_REQUEST: 'apiRequest';
4857
- CLIENT_READY: 'ready';
4858
- APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE: 'applicationCommandAutocompleteResponse';
4859
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4860
- APPLICATION_COMMAND_CREATE: 'applicationCommandCreate';
4861
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4862
- APPLICATION_COMMAND_DELETE: 'applicationCommandDelete';
4863
- /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
4864
- APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate';
4865
- APPLICATION_COMMAND_PERMISSIONS_UPDATE: 'applicationCommandPermissionsUpdate';
4866
- CALL_CREATE: 'callCreate';
4867
- CALL_DELETE: 'callDelete';
4868
- CALL_UPDATE: 'callUpdate';
4869
- GUILD_CREATE: 'guildCreate';
4870
- GUILD_DELETE: 'guildDelete';
4871
- GUILD_UPDATE: 'guildUpdate';
4872
- GUILD_UNAVAILABLE: 'guildUnavailable';
4873
- GUILD_MEMBER_ADD: 'guildMemberAdd';
4874
- GUILD_MEMBER_REMOVE: 'guildMemberRemove';
4875
- GUILD_MEMBER_UPDATE: 'guildMemberUpdate';
4876
- GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable';
4877
- GUILD_MEMBERS_CHUNK: 'guildMembersChunk';
4878
- GUILD_MEMBER_LIST_UPDATE: 'guildMemberListUpdate';
4879
- GUILD_INTEGRATIONS_UPDATE: 'guildIntegrationsUpdate';
4880
- GUILD_ROLE_CREATE: 'roleCreate';
4881
- GUILD_ROLE_DELETE: 'roleDelete';
4882
- INVITE_CREATE: 'inviteCreate';
4883
- INVITE_DELETE: 'inviteDelete';
4884
- GUILD_ROLE_UPDATE: 'roleUpdate';
4885
- GUILD_EMOJI_CREATE: 'emojiCreate';
4886
- GUILD_EMOJI_DELETE: 'emojiDelete';
4887
- GUILD_EMOJI_UPDATE: 'emojiUpdate';
4888
- GUILD_BAN_ADD: 'guildBanAdd';
4889
- GUILD_BAN_REMOVE: 'guildBanRemove';
4890
- CHANNEL_CREATE: 'channelCreate';
4891
- CHANNEL_DELETE: 'channelDelete';
4892
- CHANNEL_UPDATE: 'channelUpdate';
4893
- CHANNEL_PINS_UPDATE: 'channelPinsUpdate';
4894
- CHANNEL_RECIPIENT_ADD: 'channelRecipientAdd';
4895
- CHANNEL_RECIPIENT_REMOVE: 'channelRecipientRemove';
4896
- MESSAGE_ACK: 'messageAck';
4897
- MESSAGE_CREATE: 'messageCreate';
4898
- MESSAGE_DELETE: 'messageDelete';
4899
- MESSAGE_UPDATE: 'messageUpdate';
4900
- MESSAGE_BULK_DELETE: 'messageDeleteBulk';
4901
- MESSAGE_REACTION_ADD: 'messageReactionAdd';
4902
- MESSAGE_REACTION_REMOVE: 'messageReactionRemove';
4903
- MESSAGE_REACTION_REMOVE_ALL: 'messageReactionRemoveAll';
4904
- MESSAGE_REACTION_REMOVE_EMOJI: 'messageReactionRemoveEmoji';
4905
- THREAD_CREATE: 'threadCreate';
4906
- THREAD_DELETE: 'threadDelete';
4907
- THREAD_UPDATE: 'threadUpdate';
4908
- THREAD_LIST_SYNC: 'threadListSync';
4909
- THREAD_MEMBER_UPDATE: 'threadMemberUpdate';
4910
- THREAD_MEMBERS_UPDATE: 'threadMembersUpdate';
4911
- USER_UPDATE: 'userUpdate';
4912
- USER_SETTINGS_UPDATE: 'userSettingsUpdate';
4913
- USER_GUILD_SETTINGS_UPDATE: 'userGuildSettingsUpdate';
4914
- PRESENCE_UPDATE: 'presenceUpdate';
4915
- VOICE_SERVER_UPDATE: 'voiceServerUpdate';
4916
- VOICE_STATE_UPDATE: 'voiceStateUpdate';
4917
- TYPING_START: 'typingStart';
4918
- WEBHOOKS_UPDATE: 'webhookUpdate';
4919
- INTERACTION_CREATE: 'interactionCreate';
4920
- INTERACTION_SUCCESS: 'interactionSuccess';
4921
- INTERACTION_MODAL_CREATE: 'interactionModalCreate';
4922
- INTERACTION_FAILURE: 'interactionFailure';
4923
- ERROR: 'error';
4924
- WARN: 'warn';
4925
- DEBUG: 'debug';
4926
- CACHE_SWEEP: 'cacheSweep';
4927
- SHARD_DISCONNECT: 'shardDisconnect';
4928
- SHARD_ERROR: 'shardError';
4929
- SHARD_RECONNECTING: 'shardReconnecting';
4930
- SHARD_READY: 'shardReady';
4931
- SHARD_RESUME: 'shardResume';
4932
- INVALIDATED: 'invalidated';
4933
- RAW: 'raw';
4934
- STAGE_INSTANCE_CREATE: 'stageInstanceCreate';
4935
- STAGE_INSTANCE_UPDATE: 'stageInstanceUpdate';
4936
- STAGE_INSTANCE_DELETE: 'stageInstanceDelete';
4937
- GUILD_STICKER_CREATE: 'stickerCreate';
4938
- GUILD_STICKER_DELETE: 'stickerDelete';
4939
- GUILD_STICKER_UPDATE: 'stickerUpdate';
4940
- GUILD_SCHEDULED_EVENT_CREATE: 'guildScheduledEventCreate';
4941
- GUILD_SCHEDULED_EVENT_UPDATE: 'guildScheduledEventUpdate';
4942
- GUILD_SCHEDULED_EVENT_DELETE: 'guildScheduledEventDelete';
4943
- GUILD_SCHEDULED_EVENT_USER_ADD: 'guildScheduledEventUserAdd';
4944
- GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove';
4945
- GUILD_AUDIT_LOG_ENTRY_CREATE: 'guildAuditLogEntryCreate';
4946
- RELATIONSHIP_ADD: 'relationshipAdd';
4947
- RELATIONSHIP_REMOVE: 'relationshipRemove';
4948
- RELATIONSHIP_UPDATE: 'relationshipUpdate';
4949
- UNHANDLED_PACKET: 'unhandledPacket';
4950
- CAPTCHA_REQUIRED: 'captchaRequired';
4951
- }
4952
-
4953
- export interface WebEmbedOptions {
4954
- shorten?: boolean;
4955
- hidden?: boolean;
4956
- title?: string;
4957
- description?: string;
4958
- url?: string;
4959
- timestamp?: Date | number;
4960
- color?: ColorResolvable;
4961
- fields?: EmbedFieldData[];
4962
- author?: Partial<MessageEmbedAuthor> & { icon_url?: string; proxy_icon_url?: string };
4963
- thumbnail?: Partial<MessageEmbedThumbnail> & { proxy_url?: string };
4964
- image?: Partial<MessageEmbedImage> & { proxy_url?: string };
4965
- video?: Partial<MessageEmbedVideo> & { proxy_url?: string };
4966
- footer?: Partial<MessageEmbedFooter> & { icon_url?: string; proxy_icon_url?: string };
4967
- imageType?: 'thumbnail' | 'image';
4968
- }
4969
- // export interface MessageOptions
4970
- // embeds?: (WebEmbed | MessageEmbed | MessageEmbedOptions | APIEmbed)[];
4971
-
4972
- /**
4973
- * @extends https://luna.gitlab.io/discord-unofficial-docs/user_settings.html
4974
- */
4975
- export interface RawUserSettingsData {
4976
- afk_timeout?: number;
4977
- allow_accessibility_detection?: boolean;
4978
- animate_emoji?: boolean;
4979
- animate_stickers?: number;
4980
- contact_sync_enabled?: boolean;
4981
- convert_emoticons?: boolean;
4982
- custom_status?: { text?: string; expires_at?: string | null; emoji_name?: string; emoji_id?: Snowflake | null };
4983
- default_guilds_restricted?: boolean;
4984
- detect_platform_accounts?: boolean;
4985
- developer_mode?: boolean;
4986
- disable_games_tab?: boolean;
4987
- enable_tts_command?: boolean;
4988
- explicit_content_filter?: DMScanLevel;
4989
- friend_discovery_flags?: number;
4990
- friend_source_flags?: { all?: boolean; mutual_friends?: boolean; mututal_guilds?: boolean };
4991
- gif_auto_play?: boolean;
4992
- guild_folders?: { id?: Snowflake; guild_ids?: Snowflake[]; name?: string }[];
4993
- guild_positions?: number[];
4994
- inline_attachment_media?: boolean;
4995
- inline_embed_media?: boolean;
4996
- locale?: string;
4997
- message_display_compact?: boolean;
4998
- native_phone_integration_enabled?: boolean;
4999
- render_embeds?: boolean;
5000
- render_reactions?: boolean;
5001
- restricted_guilds?: any[];
5002
- show_current_game?: boolean;
5003
- status?: PresenceStatusData;
5004
- stream_notifications_enabled?: boolean;
5005
- theme?: 'dark' | 'light';
5006
- timezone_offset?: number;
5007
- view_nsfw_guilds?: boolean;
5008
- }
5009
-
5010
- export interface RawGuildSettingsData {
5011
- guild_id: Snowflake;
5012
- suppress_everyone: boolean;
5013
- suppress_roles: boolean;
5014
- mute_scheduled_events: boolean;
5015
- message_notifications: 2;
5016
- flags: 0;
5017
- mobile_push: boolean;
5018
- muted: boolean;
5019
- mute_config?: RawMuteConfigData;
5020
- hide_muted_channels: boolean;
5021
- channel_overrides: RawGuildChannelSettingsData[];
5022
- notify_highlights: number;
5023
- version: number;
5024
- }
5025
-
5026
- export interface RawGuildChannelSettingsData {
5027
- channel_id: Snowflake;
5028
- message_notifications: number;
5029
- muted: boolean;
5030
- mute_config?: RawMuteConfigData;
5031
- collapsed: boolean;
5032
- }
5033
-
5034
- export interface RawMuteConfigData {
5035
- end_time: string;
5036
- selected_time_window: number;
5037
- }
5038
-
5039
- export interface MuteConfigData {
5040
- endTime: Date;
5041
- selectedTimeWindow: number;
5042
- }
5043
-
5044
- export interface ClientOptions {
5045
- shards?: number | number[] | 'auto';
5046
- shardCount?: number;
5047
- closeTimeout?: number;
5048
- makeCache?: CacheFactory;
5049
- /** @deprecated Pass the value of this property as `lifetime` to `sweepers.messages` instead. */
5050
- messageCacheLifetime?: number;
5051
- /** @deprecated Pass the value of this property as `interval` to `sweepers.messages` instead. */
5052
- messageSweepInterval?: number;
5053
- allowedMentions?: MessageMentionOptions;
5054
- invalidRequestWarningInterval?: number;
5055
- partials?: PartialTypes[];
5056
- restWsBridgeTimeout?: number;
5057
- restTimeOffset?: number;
5058
- restRequestTimeout?: number;
5059
- restGlobalRateLimit?: number;
5060
- restSweepInterval?: number;
5061
- retryLimit?: number;
5062
- failIfNotExists?: boolean;
5063
- userAgentSuffix?: string[];
5064
- presence?: PresenceData;
5065
- intents?: BitFieldResolvable<IntentsString, number>;
5066
- waitGuildTimeout?: number;
5067
- messageCreateEventGuildTimeout?: number;
5068
- sweepers?: SweeperOptions;
5069
- ws?: WebSocketOptions;
5070
- http?: HTTPOptions;
5071
- rejectOnRateLimit?: string[] | ((data: RateLimitData) => boolean | Promise<boolean>);
5072
- // add
5073
- checkUpdate?: boolean;
5074
- syncStatus?: boolean;
5075
- autoRedeemNitro?: boolean;
5076
- patchVoice?: boolean;
5077
- password?: string;
5078
- DMSync?: boolean;
5079
- proxy?: string;
5080
- captchaService?: captchaServices;
5081
- captchaKey?: string;
5082
- captchaSolver?: (data: Captcha, userAgent: string) => Promise<string>;
5083
- captchaRetryLimit?: number;
5084
- captchaWithProxy?: boolean;
5085
- interactionTimeout?: number;
5086
- usingNewAttachmentAPI?: boolean;
5087
- }
5088
-
5089
- export type captchaServices = '2captcha' | 'capmonster';
5090
-
5091
- // end copy
5092
-
5093
4584
  export interface BaseApplicationCommandData {
5094
4585
  name: string;
5095
4586
  nameLocalizations?: LocalizationMap;
@@ -5384,16 +4875,7 @@ export type ApplicationCommandPermissionType = keyof typeof ApplicationCommandPe
5384
4875
  export type ApplicationCommandResolvable = ApplicationCommand | Snowflake;
5385
4876
 
5386
4877
  export type ApplicationFlagsString =
5387
- | 'EMBEDDED_RELEASED'
5388
- | 'MANAGED_EMOJI'
5389
- | 'EMBEDDED_IAP'
5390
- | 'GROUP_DM_CREATE'
5391
- | 'RPC_PRIVATE_BETA'
5392
4878
  | 'APPLICATION_AUTO_MODERATION_RULE_CREATE_BADGE'
5393
- | 'ALLOW_ASSETS'
5394
- | 'ALLOW_ACTIVITY_ACTION_SPECTATE'
5395
- | 'ALLOW_ACTIVITY_ACTION_JOIN_REQUEST'
5396
- | 'RPC_HAS_CONNECTED'
5397
4879
  | 'GATEWAY_PRESENCE'
5398
4880
  | 'GATEWAY_PRESENCE_LIMITED'
5399
4881
  | 'GATEWAY_GUILD_MEMBERS'
@@ -5402,10 +4884,7 @@ export type ApplicationFlagsString =
5402
4884
  | 'EMBEDDED'
5403
4885
  | 'GATEWAY_MESSAGE_CONTENT'
5404
4886
  | 'GATEWAY_MESSAGE_CONTENT_LIMITED'
5405
- | 'EMBEDDED_FIRST_PARTY'
5406
- | 'APPLICATION_COMMAND_BADGE'
5407
- | 'ACTIVE'
5408
- | 'IFRAME_MODAL';
4887
+ | 'APPLICATION_COMMAND_BADGE';
5409
4888
 
5410
4889
  export interface ApplicationRoleConnectionMetadataEditOptions {
5411
4890
  name: string;
@@ -5568,7 +5047,6 @@ export type CacheWithLimitsOptions = {
5568
5047
  ? LimitedCollectionOptions<K, V> | number
5569
5048
  : never;
5570
5049
  };
5571
-
5572
5050
  export interface CategoryCreateChannelOptions {
5573
5051
  permissionOverwrites?: OverwriteResolvable[] | Collection<Snowflake, OverwriteResolvable>;
5574
5052
  topic?: string;
@@ -5593,6 +5071,7 @@ export interface CategoryCreateChannelOptions {
5593
5071
  defaultReactionEmoji?: DefaultReactionEmoji;
5594
5072
  defaultSortOrder?: SortOrderType;
5595
5073
  defaultForumLayout?: ForumLayoutType;
5074
+ defaultThreadRateLimitPerUser?: number;
5596
5075
  reason?: string;
5597
5076
  }
5598
5077
 
@@ -5657,10 +5136,164 @@ export interface BaseClientEvents {
5657
5136
  invalidRequestWarning: [invalidRequestWarningData: InvalidRequestWarningData];
5658
5137
  }
5659
5138
 
5139
+ export interface ClientEvents extends BaseClientEvents {
5140
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5141
+ applicationCommandCreate: [command: ApplicationCommand];
5142
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5143
+ applicationCommandDelete: [command: ApplicationCommand];
5144
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5145
+ applicationCommandUpdate: [oldCommand: ApplicationCommand | null, newCommand: ApplicationCommand];
5146
+ applicationCommandPermissionsUpdate: [data: ApplicationCommandPermissionsUpdateData];
5147
+ /** @deprecated This event is not received by user accounts. */
5148
+ autoModerationActionExecution: [autoModerationActionExecution: AutoModerationActionExecution];
5149
+ /** @deprecated This event is not received by user accounts. */
5150
+ autoModerationRuleCreate: [autoModerationRule: AutoModerationRule];
5151
+ /** @deprecated This event is not received by user accounts. */
5152
+ autoModerationRuleDelete: [autoModerationRule: AutoModerationRule];
5153
+ /** @deprecated This event is not received by user accounts. */
5154
+ autoModerationRuleUpdate: [
5155
+ oldAutoModerationRule: AutoModerationRule | null,
5156
+ newAutoModerationRule: AutoModerationRule,
5157
+ ];
5158
+ cacheSweep: [message: string];
5159
+ channelCreate: [channel: NonThreadGuildBasedChannel];
5160
+ channelDelete: [channel: DMChannel | NonThreadGuildBasedChannel];
5161
+ channelPinsUpdate: [channel: TextBasedChannel, date: Date];
5162
+ channelUpdate: [
5163
+ oldChannel: DMChannel | NonThreadGuildBasedChannel,
5164
+ newChannel: DMChannel | NonThreadGuildBasedChannel,
5165
+ ];
5166
+ warn: [message: string];
5167
+ emojiCreate: [emoji: GuildEmoji];
5168
+ emojiDelete: [emoji: GuildEmoji];
5169
+ emojiUpdate: [oldEmoji: GuildEmoji, newEmoji: GuildEmoji];
5170
+ error: [error: Error];
5171
+ guildAvailable: [guild: Guild];
5172
+ guildBanAdd: [ban: GuildBan];
5173
+ guildBanRemove: [ban: GuildBan];
5174
+ guildCreate: [guild: Guild];
5175
+ guildDelete: [guild: Guild];
5176
+ guildUnavailable: [guild: Guild];
5177
+ guildIntegrationsUpdate: [guild: Guild];
5178
+ guildMemberAdd: [member: GuildMember];
5179
+ guildMemberAvailable: [member: GuildMember | PartialGuildMember];
5180
+ guildMemberRemove: [member: GuildMember | PartialGuildMember];
5181
+ guildMembersChunk: [
5182
+ members: Collection<Snowflake, GuildMember>,
5183
+ guild: Guild,
5184
+ data: { count: number; index: number; nonce: string | undefined; notFound: unknown[] },
5185
+ ];
5186
+ guildMemberUpdate: [oldMember: GuildMember | PartialGuildMember, newMember: GuildMember];
5187
+ guildUpdate: [oldGuild: Guild, newGuild: Guild];
5188
+ inviteCreate: [invite: Invite];
5189
+ inviteDelete: [invite: Invite];
5190
+ /** @deprecated Use messageCreate instead */
5191
+ message: [message: Message];
5192
+ messageCreate: [message: Message];
5193
+ messageDelete: [message: Message | PartialMessage];
5194
+ messageReactionRemoveAll: [
5195
+ message: Message | PartialMessage,
5196
+ reactions: Collection<string | Snowflake, MessageReaction>,
5197
+ ];
5198
+ messageReactionRemoveEmoji: [reaction: MessageReaction | PartialMessageReaction];
5199
+ messageDeleteBulk: [messages: Collection<Snowflake, Message | PartialMessage>];
5200
+ messageReactionAdd: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
5201
+ messageReactionRemove: [reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser];
5202
+ messageUpdate: [oldMessage: Message | PartialMessage, newMessage: Message | PartialMessage];
5203
+ presenceUpdate: [oldPresence: Presence | null, newPresence: Presence];
5204
+ ready: [client: Client<true>];
5205
+ invalidated: [];
5206
+ roleCreate: [role: Role];
5207
+ roleDelete: [role: Role];
5208
+ roleUpdate: [oldRole: Role, newRole: Role];
5209
+ threadCreate: [thread: ThreadChannel, newlyCreated: boolean];
5210
+ threadDelete: [thread: ThreadChannel];
5211
+ threadListSync: [threads: Collection<Snowflake, ThreadChannel>];
5212
+ threadMemberUpdate: [oldMember: ThreadMember, newMember: ThreadMember];
5213
+ threadMembersUpdate: [
5214
+ oldMembers: Collection<Snowflake, ThreadMember>,
5215
+ newMembers: Collection<Snowflake, ThreadMember>,
5216
+ ];
5217
+ threadUpdate: [oldThread: ThreadChannel, newThread: ThreadChannel];
5218
+ typingStart: [typing: Typing];
5219
+ userUpdate: [oldUser: User | PartialUser, newUser: User];
5220
+ voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
5221
+ webhookUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel | StageChannel];
5222
+ shardDisconnect: [closeEvent: CloseEvent, shardId: number];
5223
+ shardError: [error: Error, shardId: number];
5224
+ shardReady: [shardId: number, unavailableGuilds: Set<Snowflake> | undefined];
5225
+ shardReconnecting: [shardId: number];
5226
+ shardResume: [shardId: number, replayedEvents: number];
5227
+ stageInstanceCreate: [stageInstance: StageInstance];
5228
+ stageInstanceUpdate: [oldStageInstance: StageInstance | null, newStageInstance: StageInstance];
5229
+ stageInstanceDelete: [stageInstance: StageInstance];
5230
+ stickerCreate: [sticker: Sticker];
5231
+ stickerDelete: [sticker: Sticker];
5232
+ stickerUpdate: [oldSticker: Sticker, newSticker: Sticker];
5233
+ guildScheduledEventCreate: [guildScheduledEvent: GuildScheduledEvent];
5234
+ guildScheduledEventUpdate: [oldGuildScheduledEvent: GuildScheduledEvent, newGuildScheduledEvent: GuildScheduledEvent];
5235
+ guildScheduledEventDelete: [guildScheduledEvent: GuildScheduledEvent];
5236
+ guildScheduledEventUserAdd: [guildScheduledEvent: GuildScheduledEvent, user: User];
5237
+ guildScheduledEventUserRemove: [guildScheduledEvent: GuildScheduledEvent, user: User];
5238
+ guildAuditLogEntryCreate: [auditLogEntry: GuildAuditLogsEntry, guild: Guild];
5239
+ unhandledPacket: [packet: { t?: string; d: any }, shard: number];
5240
+ relationshipAdd: [userId: Snowflake, shouldNotify: boolean];
5241
+ relationshipRemove: [userId: Snowflake, type: RelationshipTypes, nickname: string | null];
5242
+ relationshipUpdate: [
5243
+ userId: Snowflake,
5244
+ oldData: {
5245
+ nickname: string | null;
5246
+ since: Date;
5247
+ type: RelationshipTypes;
5248
+ },
5249
+ newData: {
5250
+ nickname: string | null;
5251
+ since: Date;
5252
+ type: RelationshipTypes;
5253
+ },
5254
+ ];
5255
+ channelRecipientAdd: [channel: GroupDMChannel, user: User];
5256
+ channelRecipientRemove: [channel: GroupDMChannel, user: User];
5257
+ interactionModalCreate: [modal: Modal];
5258
+ callCreate: [call: CallState];
5259
+ callUpdate: [call: CallState];
5260
+ callDelete: [call: CallState];
5261
+ }
5262
+
5660
5263
  export interface ClientFetchInviteOptions {
5661
5264
  guildScheduledEventId?: Snowflake;
5662
5265
  }
5663
5266
 
5267
+ export type CaptchaSolver = (captcha: Captcha, UserAgent: string) => Promise<string>;
5268
+
5269
+ export interface ClientOptions {
5270
+ DMChannelVoiceStatusSync?: number;
5271
+ captchaRetryLimit?: number;
5272
+ captchaSolver?: CaptchaSolver;
5273
+ closeTimeout?: number;
5274
+ makeCache?: CacheFactory;
5275
+ /** @deprecated Pass the value of this property as `lifetime` to `sweepers.messages` instead. */
5276
+ messageCacheLifetime?: number;
5277
+ /** @deprecated Pass the value of this property as `interval` to `sweepers.messages` instead. */
5278
+ messageSweepInterval?: number;
5279
+ allowedMentions?: MessageMentionOptions;
5280
+ invalidRequestWarningInterval?: number;
5281
+ partials?: PartialTypes[];
5282
+ restWsBridgeTimeout?: number;
5283
+ restTimeOffset?: number;
5284
+ restRequestTimeout?: number;
5285
+ restGlobalRateLimit?: number;
5286
+ restSweepInterval?: number;
5287
+ retryLimit?: number;
5288
+ failIfNotExists?: boolean;
5289
+ presence?: PresenceData;
5290
+ waitGuildTimeout?: number;
5291
+ sweepers?: SweeperOptions;
5292
+ ws?: WebSocketOptions;
5293
+ http?: HTTPOptions;
5294
+ rejectOnRateLimit?: string[] | ((data: RateLimitData) => boolean | Promise<boolean>);
5295
+ }
5296
+
5664
5297
  export type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
5665
5298
 
5666
5299
  export interface ClientPresenceStatusData {
@@ -5673,7 +5306,7 @@ export interface ClientUserEditData {
5673
5306
  username?: string;
5674
5307
  avatar?: BufferResolvable | Base64Resolvable | null;
5675
5308
  banner?: BufferResolvable | Base64Resolvable | null;
5676
- bio?: string | null;
5309
+ bio?: string;
5677
5310
  }
5678
5311
 
5679
5312
  export interface CloseEvent {
@@ -5807,6 +5440,107 @@ export interface ConstantsColors {
5807
5440
  NOT_QUITE_BLACK: 0x23272a;
5808
5441
  }
5809
5442
 
5443
+ export interface ConstantsEvents {
5444
+ RATE_LIMIT: 'rateLimit';
5445
+ INVALID_REQUEST_WARNING: 'invalidRequestWarning';
5446
+ API_RESPONSE: 'apiResponse';
5447
+ API_REQUEST: 'apiRequest';
5448
+ CLIENT_READY: 'ready';
5449
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5450
+ APPLICATION_COMMAND_CREATE: 'applicationCommandCreate';
5451
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5452
+ APPLICATION_COMMAND_DELETE: 'applicationCommandDelete';
5453
+ APPLICATION_COMMAND_PERMISSIONS_UPDATE: 'applicationCommandPermissionsUpdate';
5454
+ /** @deprecated See [this issue](https://github.com/discord/discord-api-docs/issues/3690) for more information. */
5455
+ APPLICATION_COMMAND_UPDATE: 'applicationCommandUpdate';
5456
+ /** @deprecated This event is not received by user accounts. */
5457
+ AUTO_MODERATION_ACTION_EXECUTION: 'autoModerationActionExecution';
5458
+ /** @deprecated This event is not received by user accounts. */
5459
+ AUTO_MODERATION_RULE_CREATE: 'autoModerationRuleCreate';
5460
+ /** @deprecated This event is not received by user accounts. */
5461
+ AUTO_MODERATION_RULE_DELETE: 'autoModerationRuleDelete';
5462
+ /** @deprecated This event is not received by user accounts. */
5463
+ AUTO_MODERATION_RULE_UPDATE: 'autoModerationRuleUpdate';
5464
+ GUILD_AVAILABLE: 'guildAvailable';
5465
+ GUILD_CREATE: 'guildCreate';
5466
+ GUILD_DELETE: 'guildDelete';
5467
+ GUILD_UPDATE: 'guildUpdate';
5468
+ GUILD_UNAVAILABLE: 'guildUnavailable';
5469
+ GUILD_MEMBER_ADD: 'guildMemberAdd';
5470
+ GUILD_MEMBER_REMOVE: 'guildMemberRemove';
5471
+ GUILD_MEMBER_UPDATE: 'guildMemberUpdate';
5472
+ GUILD_MEMBER_AVAILABLE: 'guildMemberAvailable';
5473
+ GUILD_MEMBERS_CHUNK: 'guildMembersChunk';
5474
+ GUILD_INTEGRATIONS_UPDATE: 'guildIntegrationsUpdate';
5475
+ GUILD_ROLE_CREATE: 'roleCreate';
5476
+ GUILD_ROLE_DELETE: 'roleDelete';
5477
+ INVITE_CREATE: 'inviteCreate';
5478
+ INVITE_DELETE: 'inviteDelete';
5479
+ GUILD_ROLE_UPDATE: 'roleUpdate';
5480
+ GUILD_EMOJI_CREATE: 'emojiCreate';
5481
+ GUILD_EMOJI_DELETE: 'emojiDelete';
5482
+ GUILD_EMOJI_UPDATE: 'emojiUpdate';
5483
+ GUILD_BAN_ADD: 'guildBanAdd';
5484
+ GUILD_BAN_REMOVE: 'guildBanRemove';
5485
+ CHANNEL_CREATE: 'channelCreate';
5486
+ CHANNEL_DELETE: 'channelDelete';
5487
+ CHANNEL_UPDATE: 'channelUpdate';
5488
+ CHANNEL_PINS_UPDATE: 'channelPinsUpdate';
5489
+ MESSAGE_CREATE: 'messageCreate';
5490
+ MESSAGE_DELETE: 'messageDelete';
5491
+ MESSAGE_UPDATE: 'messageUpdate';
5492
+ MESSAGE_BULK_DELETE: 'messageDeleteBulk';
5493
+ MESSAGE_REACTION_ADD: 'messageReactionAdd';
5494
+ MESSAGE_REACTION_REMOVE: 'messageReactionRemove';
5495
+ MESSAGE_REACTION_REMOVE_ALL: 'messageReactionRemoveAll';
5496
+ MESSAGE_REACTION_REMOVE_EMOJI: 'messageReactionRemoveEmoji';
5497
+ THREAD_CREATE: 'threadCreate';
5498
+ THREAD_DELETE: 'threadDelete';
5499
+ THREAD_UPDATE: 'threadUpdate';
5500
+ THREAD_LIST_SYNC: 'threadListSync';
5501
+ THREAD_MEMBER_UPDATE: 'threadMemberUpdate';
5502
+ THREAD_MEMBERS_UPDATE: 'threadMembersUpdate';
5503
+ USER_UPDATE: 'userUpdate';
5504
+ PRESENCE_UPDATE: 'presenceUpdate';
5505
+ VOICE_SERVER_UPDATE: 'voiceServerUpdate';
5506
+ VOICE_STATE_UPDATE: 'voiceStateUpdate';
5507
+ TYPING_START: 'typingStart';
5508
+ WEBHOOKS_UPDATE: 'webhookUpdate';
5509
+ ERROR: 'error';
5510
+ WARN: 'warn';
5511
+ DEBUG: 'debug';
5512
+ CACHE_SWEEP: 'cacheSweep';
5513
+ SHARD_DISCONNECT: 'shardDisconnect';
5514
+ SHARD_ERROR: 'shardError';
5515
+ SHARD_RECONNECTING: 'shardReconnecting';
5516
+ SHARD_READY: 'shardReady';
5517
+ SHARD_RESUME: 'shardResume';
5518
+ INVALIDATED: 'invalidated';
5519
+ RAW: 'raw';
5520
+ STAGE_INSTANCE_CREATE: 'stageInstanceCreate';
5521
+ STAGE_INSTANCE_UPDATE: 'stageInstanceUpdate';
5522
+ STAGE_INSTANCE_DELETE: 'stageInstanceDelete';
5523
+ GUILD_STICKER_CREATE: 'stickerCreate';
5524
+ GUILD_STICKER_DELETE: 'stickerDelete';
5525
+ GUILD_STICKER_UPDATE: 'stickerUpdate';
5526
+ GUILD_SCHEDULED_EVENT_CREATE: 'guildScheduledEventCreate';
5527
+ GUILD_SCHEDULED_EVENT_UPDATE: 'guildScheduledEventUpdate';
5528
+ GUILD_SCHEDULED_EVENT_DELETE: 'guildScheduledEventDelete';
5529
+ GUILD_SCHEDULED_EVENT_USER_ADD: 'guildScheduledEventUserAdd';
5530
+ GUILD_SCHEDULED_EVENT_USER_REMOVE: 'guildScheduledEventUserRemove';
5531
+ GUILD_AUDIT_LOG_ENTRY_CREATE: 'guildAuditLogEntryCreate';
5532
+ UNHANDLED_PACKET: 'unhandledPacket';
5533
+ RELATIONSHIP_ADD: 'relationshipAdd';
5534
+ RELATIONSHIP_UPDATE: 'relationshipUpdate';
5535
+ RELATIONSHIP_REMOVE: 'relationshipRemove';
5536
+ CHANNEL_RECIPIENT_ADD: 'channelRecipientAdd';
5537
+ CHANNEL_RECIPIENT_REMOVE: 'channelRecipientRemove';
5538
+ INTERACTION_MODAL_CREATE: 'interactionModalCreate';
5539
+ CALL_CREATE: 'callCreate';
5540
+ CALL_UPDATE: 'callUpdate';
5541
+ CALL_DELETE: 'callDelete';
5542
+ }
5543
+
5810
5544
  export interface ConstantsOpcodes {
5811
5545
  DISPATCH: 0;
5812
5546
  HEARTBEAT: 1;
@@ -5820,6 +5554,31 @@ export interface ConstantsOpcodes {
5820
5554
  INVALID_SESSION: 9;
5821
5555
  HELLO: 10;
5822
5556
  HEARTBEAT_ACK: 11;
5557
+ GUILD_SYNC: 12;
5558
+ DM_UPDATE: 13;
5559
+ GUILD_SUBSCRIPTIONS: 14;
5560
+ LOBBY_CONNECT: 15;
5561
+ LOBBY_DISCONNECT: 16;
5562
+ LOBBY_VOICE_STATE_UPDATE: 17;
5563
+ STREAM_CREATE: 18;
5564
+ STREAM_DELETE: 19;
5565
+ STREAM_WATCH: 20;
5566
+ STREAM_PING: 21;
5567
+ STREAM_SET_PAUSED: 22;
5568
+ REQUEST_GUILD_APPLICATION_COMMANDS: 24;
5569
+ EMBEDDED_ACTIVITY_LAUNCH: 25;
5570
+ EMBEDDED_ACTIVITY_CLOSE: 26;
5571
+ EMBEDDED_ACTIVITY_UPDATE: 27;
5572
+ REQUEST_FORUM_UNREADS: 28;
5573
+ REMOTE_COMMAND: 29;
5574
+ GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH: 30;
5575
+ REQUEST_SOUNDBOARD_SOUNDS: 31;
5576
+ SPEED_TEST_CREATE: 32;
5577
+ SPEED_TEST_DELETE: 33;
5578
+ REQUEST_LAST_MESSAGES: 34;
5579
+ SEARCH_RECENT_MEMBERS: 35;
5580
+ REQUEST_CHANNEL_STATUSES: 36;
5581
+ GUILD_SUBSCRIPTIONS_BULK: 37;
5823
5582
  }
5824
5583
 
5825
5584
  export interface ConstantsShardEvents {
@@ -5944,7 +5703,7 @@ export type ExplicitContentFilterLevel = keyof typeof ExplicitContentFilterLevel
5944
5703
 
5945
5704
  export interface FetchApplicationCommandOptions extends BaseFetchOptions {
5946
5705
  guildId?: Snowflake;
5947
- locale?: localeSetting;
5706
+ locale?: LocaleString;
5948
5707
  withLocalizations?: boolean;
5949
5708
  }
5950
5709
 
@@ -6040,6 +5799,7 @@ export interface FetchReactionUsersOptions {
6040
5799
  export interface FetchThreadMemberOptions extends BaseFetchOptions {
6041
5800
  withMember?: boolean;
6042
5801
  }
5802
+
6043
5803
  export interface FetchThreadMembersWithGuildMemberDataOptions {
6044
5804
  withMember: true;
6045
5805
  after?: Snowflake;
@@ -6048,7 +5808,7 @@ export interface FetchThreadMembersWithGuildMemberDataOptions {
6048
5808
  }
6049
5809
 
6050
5810
  export interface FetchThreadMembersWithoutGuildMemberDataOptions {
6051
- withMember: false;
5811
+ withMember?: false;
6052
5812
  cache?: boolean;
6053
5813
  }
6054
5814
 
@@ -6338,6 +6098,12 @@ export interface GuildEditData {
6338
6098
  features?: GuildFeatures[];
6339
6099
  }
6340
6100
 
6101
+ export interface GroupDMChannelEditData {
6102
+ name?: string;
6103
+ icon?: BufferResolvable | Base64Resolvable | null;
6104
+ owner?: UserResolvable;
6105
+ }
6106
+
6341
6107
  export interface GuildEmojiCreateOptions {
6342
6108
  roles?: Collection<Snowflake, Role> | RoleResolvable[];
6343
6109
  reason?: string;
@@ -6363,7 +6129,6 @@ export type GuildFeatures =
6363
6129
  | 'ANIMATED_ICON'
6364
6130
  | 'AUTO_MODERATION'
6365
6131
  | 'BANNER'
6366
- | 'CLYDE_ENABLED'
6367
6132
  | 'COMMERCE'
6368
6133
  | 'COMMUNITY'
6369
6134
  | 'CREATOR_MONETIZABLE_PROVISIONAL'
@@ -6385,8 +6150,8 @@ export type GuildFeatures =
6385
6150
  | 'THREE_DAY_THREAD_ARCHIVE'
6386
6151
  | 'SEVEN_DAY_THREAD_ARCHIVE'
6387
6152
  | 'PRIVATE_THREADS'
6388
- | 'RAID_ALERTS_DISABLED'
6389
6153
  | 'ROLE_ICONS'
6154
+ | 'RAID_ALERTS_DISABLED'
6390
6155
  | 'ROLE_SUBSCRIPTIONS_AVAILABLE_FOR_PURCHASE'
6391
6156
  | 'ROLE_SUBSCRIPTIONS_ENABLED';
6392
6157
 
@@ -6516,6 +6281,7 @@ export interface HTTPAttachmentData {
6516
6281
  export interface HTTPErrorData {
6517
6282
  json: unknown;
6518
6283
  files: HTTPAttachmentData[];
6284
+ headers?: Record<string, string>;
6519
6285
  }
6520
6286
 
6521
6287
  export interface HTTPOptions {
@@ -6591,13 +6357,6 @@ export type IntentsString =
6591
6357
  | 'AUTO_MODERATION_CONFIGURATION'
6592
6358
  | 'AUTO_MODERATION_EXECUTION';
6593
6359
 
6594
- export interface InviteGenerationOptions {
6595
- permissions?: PermissionResolvable;
6596
- guild?: GuildResolvable;
6597
- disableGuildSelect?: boolean;
6598
- scopes: InviteScope[];
6599
- }
6600
-
6601
6360
  export type GuildInvitableChannelResolvable =
6602
6361
  | TextChannel
6603
6362
  | VoiceChannel
@@ -6633,7 +6392,8 @@ export type InviteScope =
6633
6392
  | 'guilds'
6634
6393
  | 'guilds.join'
6635
6394
  | 'gdm.join'
6636
- | 'webhook.incoming';
6395
+ | 'webhook.incoming'
6396
+ | 'role_connections.write';
6637
6397
 
6638
6398
  export interface LifetimeFilterOptions<K, V> {
6639
6399
  excludeFromSweep?: (value: V, key: K, collection: LimitedCollection<K, V>) => boolean;
@@ -6685,6 +6445,7 @@ export interface MessageActivity {
6685
6445
  }
6686
6446
 
6687
6447
  export interface BaseButtonOptions extends BaseMessageComponentOptions {
6448
+ type: 'BUTTON' | MessageComponentTypes.BUTTON;
6688
6449
  disabled?: boolean;
6689
6450
  emoji?: EmojiIdentifierResolvable;
6690
6451
  label?: string;
@@ -6731,35 +6492,16 @@ export type MessageComponentType = keyof typeof MessageComponentTypes;
6731
6492
 
6732
6493
  export type MessageComponentTypeResolvable = MessageComponentType | MessageComponentTypes;
6733
6494
 
6495
+ export type GuildForumThreadMessageCreateOptions = MessageOptions & Pick<MessageOptions, 'flags' | 'stickers'>;
6496
+
6734
6497
  export interface MessageEditOptions {
6735
6498
  attachments?: MessageAttachment[];
6736
6499
  content?: string | null;
6737
- id?: Snowflake | number;
6738
- parentId?: Snowflake | number;
6739
- type?: ExcludeEnum<
6740
- typeof ChannelTypes,
6741
- | 'DM'
6742
- | 'GROUP_DM'
6743
- | 'GUILD_NEWS'
6744
- | 'GUILD_STORE'
6745
- | 'UNKNOWN'
6746
- | 'GUILD_NEWS_THREAD'
6747
- | 'GUILD_PUBLIC_THREAD'
6748
- | 'GUILD_PRIVATE_THREAD'
6749
- | 'GUILD_STAGE_VOICE'
6750
- >;
6751
- name: string;
6752
- topic?: string;
6753
- nsfw?: boolean;
6754
- bitrate?: number;
6755
- userLimit?: number;
6756
- rtcRegion?: string | null;
6757
- videoQualityMode?: VideoQualityMode;
6758
- permissionOverwrites?: PartialOverwriteData[];
6759
- rateLimitPerUser?: number;
6760
- availableTags?: GuildForumTagData[];
6761
- defaultReactionEmoji?: DefaultReactionEmoji;
6762
- defaultThreadRateLimitPerUser?: number;
6500
+ embeds?: (MessageEmbed | MessageEmbedOptions | APIEmbed)[] | null;
6501
+ files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
6502
+ flags?: BitFieldResolvable<MessageFlagsString, number>;
6503
+ allowedMentions?: MessageMentionOptions;
6504
+ components?: (MessageActionRow | (Required<BaseMessageComponentOptions> & MessageActionRowOptions))[];
6763
6505
  }
6764
6506
 
6765
6507
  export interface MessageEmbedAuthor {
@@ -6862,15 +6604,14 @@ export interface MessageOptions {
6862
6604
  tts?: boolean;
6863
6605
  nonce?: string | number;
6864
6606
  content?: string | null;
6865
- embeds?: (WebEmbed | MessageEmbed | MessageEmbedOptions | APIEmbed)[];
6607
+ embeds?: (MessageEmbed | MessageEmbedOptions | APIEmbed)[];
6866
6608
  components?: (MessageActionRow | (Required<BaseMessageComponentOptions> & MessageActionRowOptions))[];
6867
6609
  allowedMentions?: MessageMentionOptions;
6868
6610
  files?: (FileOptions | BufferResolvable | Stream | MessageAttachment)[];
6869
6611
  reply?: ReplyOptions;
6870
6612
  stickers?: StickerResolvable[];
6871
6613
  attachments?: MessageAttachment[];
6872
- flags?: BitFieldResolvable<'SUPPRESS_EMBEDS' | 'SUPPRESS_NOTIFICATIONS', number>;
6873
- usingNewAttachmentAPI?: boolean;
6614
+ flags?: BitFieldResolvable<'SUPPRESS_EMBEDS' | 'SUPPRESS_NOTIFICATIONS' | 'IS_VOICE_MESSAGE', number>;
6874
6615
  }
6875
6616
 
6876
6617
  export type MessageReactionResolvable = MessageReaction | Snowflake | string;
@@ -6891,12 +6632,9 @@ export interface BaseMessageSelectMenuOptions {
6891
6632
  minValues?: number;
6892
6633
  placeholder?: string;
6893
6634
  }
6635
+
6894
6636
  export interface StringMessageSelectMenuOptions extends BaseMessageSelectMenuOptions {
6895
- type?:
6896
- | 'STRING_SELECT'
6897
- | 'SELECT_MENU'
6898
- | SelectMenuComponentTypes.STRING_SELECT
6899
- | SelectMenuComponentTypes.SELECT_MENU;
6637
+ type?: 'STRING_SELECT' | SelectMenuComponentTypes.STRING_SELECT;
6900
6638
  options?: MessageSelectOptionData[];
6901
6639
  }
6902
6640
 
@@ -7049,7 +6787,9 @@ export type PermissionString =
7049
6787
  | 'MANAGE_EVENTS'
7050
6788
  | 'VIEW_CREATOR_MONETIZATION_ANALYTICS'
7051
6789
  | 'USE_SOUNDBOARD'
7052
- | 'SEND_VOICE_MESSAGES';
6790
+ | 'SEND_VOICE_MESSAGES'
6791
+ | 'USE_CLYDE_AI'
6792
+ | 'SET_VOICE_CHANNEL_STATUS';
7053
6793
 
7054
6794
  export type RecursiveArray<T> = ReadonlyArray<T | RecursiveArray<T>>;
7055
6795
 
@@ -7064,7 +6804,7 @@ export type PremiumTier = keyof typeof PremiumTiers;
7064
6804
  export interface PresenceData {
7065
6805
  status?: PresenceStatusData;
7066
6806
  afk?: boolean;
7067
- activities?: ActivitiesOptions[];
6807
+ activities?: (ActivitiesOptions | RichPresence | SpotifyRPC | CustomStatus)[];
7068
6808
  shardId?: number | number[];
7069
6809
  }
7070
6810
 
@@ -7094,6 +6834,9 @@ export interface PartialChannelData {
7094
6834
  videoQualityMode?: VideoQualityMode;
7095
6835
  permissionOverwrites?: PartialOverwriteData[];
7096
6836
  rateLimitPerUser?: number;
6837
+ availableTags?: GuildForumTagData[];
6838
+ defaultReactionEmoji?: DefaultReactionEmoji;
6839
+ defaultThreadRateLimitPerUser?: number;
7097
6840
  }
7098
6841
 
7099
6842
  export type Partialize<
@@ -7254,11 +6997,6 @@ export interface StartThreadOptions {
7254
6997
  rateLimitPerUser?: number;
7255
6998
  }
7256
6999
 
7257
- export interface MessageButtonLocation {
7258
- row: number;
7259
- col: number;
7260
- }
7261
-
7262
7000
  export type Status = number;
7263
7001
 
7264
7002
  export type StickerFormatType = keyof typeof StickerFormatTypes;
@@ -7277,6 +7015,10 @@ export type SystemChannelFlagsString =
7277
7015
 
7278
7016
  export type SystemChannelFlagsResolvable = BitFieldResolvable<SystemChannelFlagsString, number>;
7279
7017
 
7018
+ export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString, number>;
7019
+
7020
+ export type SelectMenuComponentType = keyof typeof SelectMenuComponentTypes;
7021
+
7280
7022
  export type SystemMessageType = Exclude<
7281
7023
  MessageType,
7282
7024
  'DEFAULT' | 'REPLY' | 'APPLICATION_COMMAND' | 'CONTEXT_MENU_COMMAND'
@@ -7351,13 +7093,9 @@ export type AnyChannel =
7351
7093
  | TextChannel
7352
7094
  | ThreadChannel
7353
7095
  | VoiceChannel
7354
- | ForumChannel
7355
- | PartialGroupDMChannel;
7096
+ | ForumChannel;
7356
7097
 
7357
- export type TextBasedChannel = Exclude<
7358
- Extract<AnyChannel, { messages: MessageManager; interactions: InteractionManager }>,
7359
- ForumChannel
7360
- >;
7098
+ export type TextBasedChannel = Exclude<Extract<AnyChannel, { messages: MessageManager }>, ForumChannel>;
7361
7099
 
7362
7100
  export type TextBasedChannelTypes = TextBasedChannel['type'];
7363
7101
 
@@ -7405,6 +7143,11 @@ export interface GuildTextThreadCreateOptions<AllowedThreadType> extends StartTh
7405
7143
  rateLimitPerUser?: number;
7406
7144
  }
7407
7145
 
7146
+ export interface GuildForumThreadCreateOptions extends StartThreadOptions {
7147
+ message: GuildForumThreadMessageCreateOptions | MessagePayload;
7148
+ appliedTags?: Snowflake[];
7149
+ }
7150
+
7408
7151
  export interface ThreadEditData {
7409
7152
  name?: string;
7410
7153
  archived?: boolean;
@@ -7425,38 +7168,17 @@ export type UserFlagsString =
7425
7168
  | 'PARTNERED_SERVER_OWNER'
7426
7169
  | 'HYPESQUAD_EVENTS'
7427
7170
  | 'BUGHUNTER_LEVEL_1'
7428
- | 'MFA_SMS'
7429
- | 'PREMIUM_PROMO_DISMISSED'
7430
7171
  | 'HOUSE_BRAVERY'
7431
7172
  | 'HOUSE_BRILLIANCE'
7432
7173
  | 'HOUSE_BALANCE'
7433
7174
  | 'EARLY_SUPPORTER'
7434
7175
  | 'TEAM_USER'
7435
- | 'INTERNAL_APPLICATION'
7436
- | 'SYSTEM'
7437
- | 'HAS_UNREAD_URGENT_MESSAGES'
7438
7176
  | 'BUGHUNTER_LEVEL_2'
7439
- | 'UNDERAGE_DELETED'
7440
7177
  | 'VERIFIED_BOT'
7441
7178
  | 'EARLY_VERIFIED_BOT_DEVELOPER'
7442
7179
  | 'DISCORD_CERTIFIED_MODERATOR'
7443
7180
  | 'BOT_HTTP_INTERACTIONS'
7444
- | 'SPAMMER'
7445
- | 'DISABLE_PREMIUM'
7446
- | 'ACTIVE_DEVELOPER'
7447
- | 'HIGH_GLOBAL_RATE_LIMIT'
7448
- | 'DELETED'
7449
- | 'DISABLED_SUSPICIOUS_ACTIVITY'
7450
- | 'SELF_DELETED'
7451
- | 'PREMIUM_DISCRIMINATOR'
7452
- | 'USED_DESKTOP_CLIENT'
7453
- | 'USED_WEB_CLIENT'
7454
- | 'USED_MOBILE_CLIENT'
7455
- | 'DISABLED'
7456
- | 'VERIFIED_EMAIL'
7457
- | 'QUARANTINED'
7458
- | 'COLLABORATOR'
7459
- | 'RESTRICTED_COLLABORATOR';
7181
+ | 'ACTIVE_DEVELOPER';
7460
7182
 
7461
7183
  export type UserMention = `<@${Snowflake}>`;
7462
7184
 
@@ -7486,6 +7208,15 @@ export interface WebhookClientDataURL {
7486
7208
  url: string;
7487
7209
  }
7488
7210
 
7211
+ export type FriendRequestOptions =
7212
+ | {
7213
+ user: UserResolvable;
7214
+ }
7215
+ | {
7216
+ username: string;
7217
+ discriminator: number | null;
7218
+ };
7219
+
7489
7220
  export type WebhookClientOptions = Pick<
7490
7221
  ClientOptions,
7491
7222
  'allowedMentions' | 'restTimeOffset' | 'restRequestTimeout' | 'retryLimit' | 'http'
@@ -7501,7 +7232,6 @@ export type WebhookEditMessageOptions = Pick<
7501
7232
  WebhookMessageOptions,
7502
7233
  'content' | 'embeds' | 'files' | 'allowedMentions' | 'components' | 'attachments' | 'threadId'
7503
7234
  >;
7504
-
7505
7235
  export interface InteractionEditReplyOptions extends WebhookEditMessageOptions {
7506
7236
  message?: MessageResolvable | '@original';
7507
7237
  }
@@ -7521,6 +7251,7 @@ export interface WebhookMessageOptions extends Omit<MessageOptions, 'reply' | 's
7521
7251
  export type WebhookType = keyof typeof WebhookTypes;
7522
7252
 
7523
7253
  export interface WebSocketOptions {
7254
+ agent?: Omit<AgentOptions, 'keepAlive'>;
7524
7255
  compress?: boolean;
7525
7256
  properties?: WebSocketProperties;
7526
7257
  }
@@ -7562,11 +7293,10 @@ export interface WelcomeScreenEditData {
7562
7293
  export type WSEventType =
7563
7294
  | 'READY'
7564
7295
  | 'RESUMED'
7565
- | 'APPLICATION_COMMAND_AUTOCOMPLETE_RESPONSE'
7566
7296
  | 'APPLICATION_COMMAND_CREATE'
7567
7297
  | 'APPLICATION_COMMAND_DELETE'
7568
- | 'APPLICATION_COMMAND_UPDATE'
7569
7298
  | 'APPLICATION_COMMAND_PERMISSIONS_UPDATE'
7299
+ | 'APPLICATION_COMMAND_UPDATE'
7570
7300
  | 'AUTO_MODERATION_ACTION_EXECUTION'
7571
7301
  | 'AUTO_MODERATION_RULE_CREATE'
7572
7302
  | 'AUTO_MODERATION_RULE_DELETE'
@@ -7657,85 +7387,4 @@ export type InternalDiscordGatewayAdapterCreator = (
7657
7387
  methods: InternalDiscordGatewayAdapterLibraryMethods,
7658
7388
  ) => InternalDiscordGatewayAdapterImplementerMethods;
7659
7389
 
7660
- // GuildForum
7661
- export type ChannelFlagsString = 'PINNED' | 'REQUIRE_TAG';
7662
- export class ChannelFlags extends BitField<ChannelFlagsString> {
7663
- public static FLAGS: Record<ChannelFlagsString, number>;
7664
- public static resolve(bit?: BitFieldResolvable<ChannelFlagsString, number>): number;
7665
- }
7666
-
7667
- export interface GuildForumTagEmoji {
7668
- id: Snowflake | null;
7669
- name: string | null;
7670
- }
7671
-
7672
- export interface GuildForumTag {
7673
- id: Snowflake;
7674
- name: string;
7675
- moderated: boolean;
7676
- emoji: GuildForumTagEmoji | null;
7677
- }
7678
-
7679
- export type GuildForumTagData = Partial<GuildForumTag> & { name: string };
7680
-
7681
- export interface DefaultReactionEmoji {
7682
- id: Snowflake | null;
7683
- name: string | null;
7684
- }
7685
-
7686
- export class ForumChannel extends TextBasedChannelMixin(GuildChannel, [
7687
- 'send',
7688
- 'lastMessage',
7689
- 'lastPinAt',
7690
- 'bulkDelete',
7691
- 'sendTyping',
7692
- 'createMessageCollector',
7693
- 'awaitMessages',
7694
- 'createMessageComponentCollector',
7695
- 'awaitMessageComponent',
7696
- ]) {
7697
- public type: 'GUILD_FORUM';
7698
- public threads: GuildForumThreadManager;
7699
- public availableTags: GuildForumTag[];
7700
- public defaultReactionEmoji: DefaultReactionEmoji | null;
7701
- public defaultThreadRateLimitPerUser: number | null;
7702
- public rateLimitPerUser: number | null;
7703
- public defaultAutoArchiveDuration: ThreadAutoArchiveDuration | null;
7704
- public nsfw: boolean;
7705
- public topic: string | null;
7706
- public defaultSortOrder: SortOrderType | null;
7707
- public defaultForumLayout: ForumLayoutType;
7708
- public setAvailableTags(tags: GuildForumTagData[], reason?: string): Promise<this>;
7709
- public setDefaultReactionEmoji(emojiId: DefaultReactionEmoji | null, reason?: string): Promise<this>;
7710
- public setDefaultThreadRateLimitPerUser(rateLimit: number, reason?: string): Promise<this>;
7711
- public createInvite(options?: CreateInviteOptions): Promise<Invite>;
7712
- public fetchInvites(cache?: boolean): Promise<Collection<string, Invite>>;
7713
- public setDefaultAutoArchiveDuration(
7714
- defaultAutoArchiveDuration: ThreadAutoArchiveDuration,
7715
- reason?: string,
7716
- ): Promise<this>;
7717
- public setTopic(topic: string | null, reason?: string): Promise<this>;
7718
- public setDefaultSortOrder(defaultSortOrder: SortOrderType | null, reason?: string): Promise<this>;
7719
- public setDefaultForumLayout(defaultForumLayout: ForumLayoutType, reason?: string): Promise<this>;
7720
- }
7721
-
7722
- export class GuildTextThreadManager<AllowedThreadType> extends ThreadManager {
7723
- public create(options: GuildTextThreadCreateOptions<AllowedThreadType>): Promise<ThreadChannel>;
7724
- }
7725
-
7726
- export class GuildForumThreadManager extends ThreadManager {
7727
- public create(options: GuildForumThreadCreateOptions): Promise<ThreadChannel>;
7728
- }
7729
-
7730
- export type GuildForumThreadMessageCreateOptions = MessageOptions & Pick<MessageOptions, 'flags' | 'stickers'>;
7731
-
7732
- export type ChannelFlagsResolvable = BitFieldResolvable<ChannelFlagsString, number>;
7733
-
7734
- export type SelectMenuComponentType = keyof typeof SelectMenuComponentTypes;
7735
-
7736
- export interface GuildForumThreadCreateOptions extends StartThreadOptions {
7737
- message: GuildForumThreadMessageCreateOptions | MessagePayload;
7738
- appliedTags?: Snowflake[];
7739
- }
7740
-
7741
7390
  //#endregion