discord.js 15.0.0-dev.1740096733-0e7bdb072 → 15.0.0-dev.1740183107-ed55c029d

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "discord.js",
4
- "version": "15.0.0-dev.1740096733-0e7bdb072",
4
+ "version": "15.0.0-dev.1740183107-ed55c029d",
5
5
  "description": "A powerful library for interacting with the Discord API",
6
6
  "main": "./src/index.js",
7
7
  "types": "./typings/index.d.ts",
@@ -63,8 +63,8 @@
63
63
  "@discordjs/collection": "^2.1.1",
64
64
  "@discordjs/formatters": "^0.5.0",
65
65
  "@discordjs/util": "^1.1.1",
66
- "@discordjs/ws": "^2.0.0",
67
- "@discordjs/rest": "^2.4.0"
66
+ "@discordjs/rest": "^2.4.0",
67
+ "@discordjs/ws": "^2.0.0"
68
68
  },
69
69
  "devDependencies": {
70
70
  "@favware/cliff-jumper": "^4.1.0",
@@ -82,8 +82,8 @@
82
82
  "turbo": "^2.3.3",
83
83
  "typescript": "~5.5.4",
84
84
  "@discordjs/api-extractor": "^7.38.1",
85
- "@discordjs/scripts": "^0.1.0",
86
- "@discordjs/docgen": "^0.12.1"
85
+ "@discordjs/docgen": "^0.12.1",
86
+ "@discordjs/scripts": "^0.1.0"
87
87
  },
88
88
  "engines": {
89
89
  "node": ">=22.12.0"
@@ -237,13 +237,13 @@ class GuildChannelManager extends CachedManager {
237
237
  async createWebhook({ channel, name, avatar, reason }) {
238
238
  const id = this.resolveId(channel);
239
239
  if (!id) throw new DiscordjsTypeError(ErrorCodes.InvalidType, 'channel', 'GuildChannelResolvable');
240
- if (typeof avatar === 'string' && !avatar.startsWith('data:')) {
241
- avatar = await resolveImage(avatar);
242
- }
240
+
241
+ const resolvedImage = await resolveImage(avatar);
242
+
243
243
  const data = await this.client.rest.post(Routes.channelWebhooks(id), {
244
244
  body: {
245
245
  name,
246
- avatar,
246
+ avatar: resolvedImage,
247
247
  },
248
248
  reason,
249
249
  });
@@ -150,9 +150,7 @@ class MessagePayload {
150
150
  let flags;
151
151
  if (
152
152
  // eslint-disable-next-line eqeqeq
153
- this.options.flags != null ||
154
- (this.isMessage && this.options.messageReference === undefined) ||
155
- this.isMessageManager
153
+ this.options.flags != null
156
154
  ) {
157
155
  flags = new MessageFlagsBitField(this.options.flags).bitfield;
158
156
  }
@@ -571,27 +571,31 @@ export abstract class CommandInteraction<Cached extends CacheType = CacheType> e
571
571
  public inRawGuild(): this is CommandInteraction<'raw'>;
572
572
  public deferReply(
573
573
  options: InteractionDeferReplyOptions & { withResponse: true },
574
- ): Promise<InteractionCallbackResponse>;
574
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
575
575
  public deferReply(options?: InteractionDeferReplyOptions & { withResponse: false }): Promise<undefined>;
576
- public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionCallbackResponse | undefined>;
576
+ public deferReply(
577
+ options?: InteractionDeferReplyOptions,
578
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
577
579
  public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
578
580
  public editReply(
579
581
  options: string | MessagePayload | InteractionEditReplyOptions,
580
582
  ): Promise<Message<BooleanCache<Cached>>>;
581
583
  public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>;
582
584
  public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>;
583
- public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>;
585
+ public reply(
586
+ options: InteractionReplyOptions & { withResponse: true },
587
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
584
588
  public reply(options: InteractionReplyOptions & { withResponse: false }): Promise<undefined>;
585
589
  public reply(
586
590
  options: string | MessagePayload | InteractionReplyOptions,
587
- ): Promise<InteractionCallbackResponse | undefined>;
591
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
588
592
  public showModal(
589
593
  modal:
590
594
  | JSONEncodable<APIModalInteractionResponseCallbackData>
591
595
  | ModalComponentData
592
596
  | APIModalInteractionResponseCallbackData,
593
597
  options: ShowModalOptions & { withResponse: true },
594
- ): Promise<InteractionCallbackResponse>;
598
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
595
599
  public showModal(
596
600
  modal:
597
601
  | JSONEncodable<APIModalInteractionResponseCallbackData>
@@ -605,7 +609,7 @@ export abstract class CommandInteraction<Cached extends CacheType = CacheType> e
605
609
  | ModalComponentData
606
610
  | APIModalInteractionResponseCallbackData,
607
611
  options?: ShowModalOptions,
608
- ): Promise<InteractionCallbackResponse | undefined>;
612
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
609
613
  public awaitModalSubmit(
610
614
  options: AwaitModalSubmitOptions<ModalSubmitInteraction>,
611
615
  ): Promise<ModalSubmitInteraction<Cached>>;
@@ -1952,17 +1956,17 @@ export class InteractionCallback {
1952
1956
  public type: InteractionType;
1953
1957
  }
1954
1958
 
1955
- export class InteractionCallbackResponse {
1959
+ export class InteractionCallbackResponse<InGuild extends boolean = boolean> {
1956
1960
  private constructor(client: Client<true>, data: RESTPostAPIInteractionCallbackWithResponseResult);
1957
1961
  public readonly client: Client<true>;
1958
1962
  public interaction: InteractionCallback;
1959
- public resource: InteractionCallbackResource | null;
1963
+ public resource: InteractionCallbackResource<InGuild> | null;
1960
1964
  }
1961
1965
 
1962
- export class InteractionCallbackResource {
1966
+ export class InteractionCallbackResource<InGuild extends boolean = boolean> {
1963
1967
  private constructor(client: Client<true>, data: RESTAPIInteractionCallbackResourceObject);
1964
1968
  public activityInstance: RESTAPIInteractionCallbackActivityInstanceResource | null;
1965
- public message: Message | null;
1969
+ public message: Message<InGuild> | null;
1966
1970
  public type: InteractionResponseType;
1967
1971
  }
1968
1972
 
@@ -2265,37 +2269,45 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
2265
2269
  public inRawGuild(): this is MessageComponentInteraction<'raw'>;
2266
2270
  public deferReply(
2267
2271
  options: InteractionDeferReplyOptions & { withResponse: true },
2268
- ): Promise<InteractionCallbackResponse>;
2272
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2269
2273
  public deferReply(options?: InteractionDeferReplyOptions & { withResponse: false }): Promise<undefined>;
2270
- public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionCallbackResponse | undefined>;
2274
+ public deferReply(
2275
+ options?: InteractionDeferReplyOptions,
2276
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2271
2277
  public deferUpdate(
2272
2278
  options: InteractionDeferUpdateOptions & { withResponse: true },
2273
- ): Promise<InteractionCallbackResponse>;
2279
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2274
2280
  public deferUpdate(options?: InteractionDeferUpdateOptions & { withResponse: false }): Promise<undefined>;
2275
- public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionCallbackResponse | undefined>;
2281
+ public deferUpdate(
2282
+ options?: InteractionDeferUpdateOptions,
2283
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2276
2284
  public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
2277
2285
  public editReply(
2278
2286
  options: string | MessagePayload | InteractionEditReplyOptions,
2279
2287
  ): Promise<Message<BooleanCache<Cached>>>;
2280
2288
  public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>;
2281
2289
  public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>;
2282
- public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>;
2290
+ public reply(
2291
+ options: InteractionReplyOptions & { withResponse: true },
2292
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2283
2293
  public reply(options: InteractionReplyOptions & { withResponse: false }): Promise<undefined>;
2284
2294
  public reply(
2285
2295
  options: string | MessagePayload | InteractionReplyOptions,
2286
- ): Promise<InteractionCallbackResponse | undefined>;
2287
- public update(options: InteractionUpdateOptions & { withResponse: true }): Promise<InteractionCallbackResponse>;
2296
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2297
+ public update(
2298
+ options: InteractionUpdateOptions & { withResponse: true },
2299
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2288
2300
  public update(options: InteractionUpdateOptions & { withResponse: false }): Promise<undefined>;
2289
2301
  public update(
2290
2302
  options: string | MessagePayload | InteractionUpdateOptions,
2291
- ): Promise<InteractionCallbackResponse | undefined>;
2303
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2292
2304
  public showModal(
2293
2305
  modal:
2294
2306
  | JSONEncodable<APIModalInteractionResponseCallbackData>
2295
2307
  | ModalComponentData
2296
2308
  | APIModalInteractionResponseCallbackData,
2297
2309
  options: ShowModalOptions & { withResponse: true },
2298
- ): Promise<InteractionCallbackResponse>;
2310
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2299
2311
  public showModal(
2300
2312
  modal:
2301
2313
  | JSONEncodable<APIModalInteractionResponseCallbackData>
@@ -2309,7 +2321,7 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
2309
2321
  | ModalComponentData
2310
2322
  | APIModalInteractionResponseCallbackData,
2311
2323
  options?: ShowModalOptions,
2312
- ): Promise<InteractionCallbackResponse | undefined>;
2324
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2313
2325
  public awaitModalSubmit(
2314
2326
  options: AwaitModalSubmitOptions<ModalSubmitInteraction>,
2315
2327
  ): Promise<ModalSubmitInteraction<Cached>>;
@@ -2477,9 +2489,13 @@ export interface ModalMessageModalSubmitInteraction<Cached extends CacheType = C
2477
2489
  extends ModalSubmitInteraction<Cached> {
2478
2490
  message: Message<BooleanCache<Cached>>;
2479
2491
  channelId: Snowflake;
2480
- update(options: InteractionUpdateOptions & { withResponse: true }): Promise<InteractionCallbackResponse>;
2492
+ update(
2493
+ options: InteractionUpdateOptions & { withResponse: true },
2494
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2481
2495
  update(options: InteractionUpdateOptions & { withResponse: false }): Promise<undefined>;
2482
- update(options: string | MessagePayload | InteractionUpdateOptions): Promise<InteractionCallbackResponse | undefined>;
2496
+ update(
2497
+ options: string | MessagePayload | InteractionUpdateOptions,
2498
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2483
2499
  inGuild(): this is ModalMessageModalSubmitInteraction<'raw' | 'cached'>;
2484
2500
  inCachedGuild(): this is ModalMessageModalSubmitInteraction<'cached'>;
2485
2501
  inRawGuild(): this is ModalMessageModalSubmitInteraction<'raw'>;
@@ -2496,27 +2512,33 @@ export class ModalSubmitInteraction<Cached extends CacheType = CacheType> extend
2496
2512
  public message: Message<BooleanCache<Cached>> | null;
2497
2513
  public replied: boolean;
2498
2514
  public readonly webhook: InteractionWebhook;
2499
- public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>;
2515
+ public reply(
2516
+ options: InteractionReplyOptions & { withResponse: true },
2517
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2500
2518
  public reply(options: InteractionReplyOptions & { withResponse: false }): Promise<undefined>;
2501
2519
  public reply(
2502
2520
  options: string | MessagePayload | InteractionReplyOptions,
2503
- ): Promise<InteractionCallbackResponse | undefined>;
2521
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2504
2522
  public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
2505
2523
  public editReply(
2506
2524
  options: string | MessagePayload | InteractionEditReplyOptions,
2507
2525
  ): Promise<Message<BooleanCache<Cached>>>;
2508
2526
  public deferReply(
2509
2527
  options: InteractionDeferReplyOptions & { withResponse: true },
2510
- ): Promise<InteractionCallbackResponse>;
2528
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2511
2529
  public deferReply(options?: InteractionDeferReplyOptions & { withResponse: false }): Promise<undefined>;
2512
- public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionCallbackResponse | undefined>;
2530
+ public deferReply(
2531
+ options?: InteractionDeferReplyOptions,
2532
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2513
2533
  public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>;
2514
2534
  public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>;
2515
2535
  public deferUpdate(
2516
2536
  options: InteractionDeferUpdateOptions & { withResponse: true },
2517
- ): Promise<InteractionCallbackResponse>;
2537
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2518
2538
  public deferUpdate(options?: InteractionDeferUpdateOptions & { withResponse: false }): Promise<undefined>;
2519
- public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionCallbackResponse | undefined>;
2539
+ public deferUpdate(
2540
+ options?: InteractionDeferUpdateOptions,
2541
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2520
2542
  public inGuild(): this is ModalSubmitInteraction<'raw' | 'cached'>;
2521
2543
  public inCachedGuild(): this is ModalSubmitInteraction<'cached'>;
2522
2544
  public inRawGuild(): this is ModalSubmitInteraction<'raw'>;
@@ -571,27 +571,31 @@ export abstract class CommandInteraction<Cached extends CacheType = CacheType> e
571
571
  public inRawGuild(): this is CommandInteraction<'raw'>;
572
572
  public deferReply(
573
573
  options: InteractionDeferReplyOptions & { withResponse: true },
574
- ): Promise<InteractionCallbackResponse>;
574
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
575
575
  public deferReply(options?: InteractionDeferReplyOptions & { withResponse: false }): Promise<undefined>;
576
- public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionCallbackResponse | undefined>;
576
+ public deferReply(
577
+ options?: InteractionDeferReplyOptions,
578
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
577
579
  public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
578
580
  public editReply(
579
581
  options: string | MessagePayload | InteractionEditReplyOptions,
580
582
  ): Promise<Message<BooleanCache<Cached>>>;
581
583
  public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>;
582
584
  public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>;
583
- public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>;
585
+ public reply(
586
+ options: InteractionReplyOptions & { withResponse: true },
587
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
584
588
  public reply(options: InteractionReplyOptions & { withResponse: false }): Promise<undefined>;
585
589
  public reply(
586
590
  options: string | MessagePayload | InteractionReplyOptions,
587
- ): Promise<InteractionCallbackResponse | undefined>;
591
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
588
592
  public showModal(
589
593
  modal:
590
594
  | JSONEncodable<APIModalInteractionResponseCallbackData>
591
595
  | ModalComponentData
592
596
  | APIModalInteractionResponseCallbackData,
593
597
  options: ShowModalOptions & { withResponse: true },
594
- ): Promise<InteractionCallbackResponse>;
598
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
595
599
  public showModal(
596
600
  modal:
597
601
  | JSONEncodable<APIModalInteractionResponseCallbackData>
@@ -605,7 +609,7 @@ export abstract class CommandInteraction<Cached extends CacheType = CacheType> e
605
609
  | ModalComponentData
606
610
  | APIModalInteractionResponseCallbackData,
607
611
  options?: ShowModalOptions,
608
- ): Promise<InteractionCallbackResponse | undefined>;
612
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
609
613
  public awaitModalSubmit(
610
614
  options: AwaitModalSubmitOptions<ModalSubmitInteraction>,
611
615
  ): Promise<ModalSubmitInteraction<Cached>>;
@@ -1952,17 +1956,17 @@ export class InteractionCallback {
1952
1956
  public type: InteractionType;
1953
1957
  }
1954
1958
 
1955
- export class InteractionCallbackResponse {
1959
+ export class InteractionCallbackResponse<InGuild extends boolean = boolean> {
1956
1960
  private constructor(client: Client<true>, data: RESTPostAPIInteractionCallbackWithResponseResult);
1957
1961
  public readonly client: Client<true>;
1958
1962
  public interaction: InteractionCallback;
1959
- public resource: InteractionCallbackResource | null;
1963
+ public resource: InteractionCallbackResource<InGuild> | null;
1960
1964
  }
1961
1965
 
1962
- export class InteractionCallbackResource {
1966
+ export class InteractionCallbackResource<InGuild extends boolean = boolean> {
1963
1967
  private constructor(client: Client<true>, data: RESTAPIInteractionCallbackResourceObject);
1964
1968
  public activityInstance: RESTAPIInteractionCallbackActivityInstanceResource | null;
1965
- public message: Message | null;
1969
+ public message: Message<InGuild> | null;
1966
1970
  public type: InteractionResponseType;
1967
1971
  }
1968
1972
 
@@ -2265,37 +2269,45 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
2265
2269
  public inRawGuild(): this is MessageComponentInteraction<'raw'>;
2266
2270
  public deferReply(
2267
2271
  options: InteractionDeferReplyOptions & { withResponse: true },
2268
- ): Promise<InteractionCallbackResponse>;
2272
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2269
2273
  public deferReply(options?: InteractionDeferReplyOptions & { withResponse: false }): Promise<undefined>;
2270
- public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionCallbackResponse | undefined>;
2274
+ public deferReply(
2275
+ options?: InteractionDeferReplyOptions,
2276
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2271
2277
  public deferUpdate(
2272
2278
  options: InteractionDeferUpdateOptions & { withResponse: true },
2273
- ): Promise<InteractionCallbackResponse>;
2279
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2274
2280
  public deferUpdate(options?: InteractionDeferUpdateOptions & { withResponse: false }): Promise<undefined>;
2275
- public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionCallbackResponse | undefined>;
2281
+ public deferUpdate(
2282
+ options?: InteractionDeferUpdateOptions,
2283
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2276
2284
  public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
2277
2285
  public editReply(
2278
2286
  options: string | MessagePayload | InteractionEditReplyOptions,
2279
2287
  ): Promise<Message<BooleanCache<Cached>>>;
2280
2288
  public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>;
2281
2289
  public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>;
2282
- public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>;
2290
+ public reply(
2291
+ options: InteractionReplyOptions & { withResponse: true },
2292
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2283
2293
  public reply(options: InteractionReplyOptions & { withResponse: false }): Promise<undefined>;
2284
2294
  public reply(
2285
2295
  options: string | MessagePayload | InteractionReplyOptions,
2286
- ): Promise<InteractionCallbackResponse | undefined>;
2287
- public update(options: InteractionUpdateOptions & { withResponse: true }): Promise<InteractionCallbackResponse>;
2296
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2297
+ public update(
2298
+ options: InteractionUpdateOptions & { withResponse: true },
2299
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2288
2300
  public update(options: InteractionUpdateOptions & { withResponse: false }): Promise<undefined>;
2289
2301
  public update(
2290
2302
  options: string | MessagePayload | InteractionUpdateOptions,
2291
- ): Promise<InteractionCallbackResponse | undefined>;
2303
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2292
2304
  public showModal(
2293
2305
  modal:
2294
2306
  | JSONEncodable<APIModalInteractionResponseCallbackData>
2295
2307
  | ModalComponentData
2296
2308
  | APIModalInteractionResponseCallbackData,
2297
2309
  options: ShowModalOptions & { withResponse: true },
2298
- ): Promise<InteractionCallbackResponse>;
2310
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2299
2311
  public showModal(
2300
2312
  modal:
2301
2313
  | JSONEncodable<APIModalInteractionResponseCallbackData>
@@ -2309,7 +2321,7 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
2309
2321
  | ModalComponentData
2310
2322
  | APIModalInteractionResponseCallbackData,
2311
2323
  options?: ShowModalOptions,
2312
- ): Promise<InteractionCallbackResponse | undefined>;
2324
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2313
2325
  public awaitModalSubmit(
2314
2326
  options: AwaitModalSubmitOptions<ModalSubmitInteraction>,
2315
2327
  ): Promise<ModalSubmitInteraction<Cached>>;
@@ -2477,9 +2489,13 @@ export interface ModalMessageModalSubmitInteraction<Cached extends CacheType = C
2477
2489
  extends ModalSubmitInteraction<Cached> {
2478
2490
  message: Message<BooleanCache<Cached>>;
2479
2491
  channelId: Snowflake;
2480
- update(options: InteractionUpdateOptions & { withResponse: true }): Promise<InteractionCallbackResponse>;
2492
+ update(
2493
+ options: InteractionUpdateOptions & { withResponse: true },
2494
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2481
2495
  update(options: InteractionUpdateOptions & { withResponse: false }): Promise<undefined>;
2482
- update(options: string | MessagePayload | InteractionUpdateOptions): Promise<InteractionCallbackResponse | undefined>;
2496
+ update(
2497
+ options: string | MessagePayload | InteractionUpdateOptions,
2498
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2483
2499
  inGuild(): this is ModalMessageModalSubmitInteraction<'raw' | 'cached'>;
2484
2500
  inCachedGuild(): this is ModalMessageModalSubmitInteraction<'cached'>;
2485
2501
  inRawGuild(): this is ModalMessageModalSubmitInteraction<'raw'>;
@@ -2496,27 +2512,33 @@ export class ModalSubmitInteraction<Cached extends CacheType = CacheType> extend
2496
2512
  public message: Message<BooleanCache<Cached>> | null;
2497
2513
  public replied: boolean;
2498
2514
  public readonly webhook: InteractionWebhook;
2499
- public reply(options: InteractionReplyOptions & { withResponse: true }): Promise<InteractionCallbackResponse>;
2515
+ public reply(
2516
+ options: InteractionReplyOptions & { withResponse: true },
2517
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2500
2518
  public reply(options: InteractionReplyOptions & { withResponse: false }): Promise<undefined>;
2501
2519
  public reply(
2502
2520
  options: string | MessagePayload | InteractionReplyOptions,
2503
- ): Promise<InteractionCallbackResponse | undefined>;
2521
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2504
2522
  public deleteReply(message?: MessageResolvable | '@original'): Promise<void>;
2505
2523
  public editReply(
2506
2524
  options: string | MessagePayload | InteractionEditReplyOptions,
2507
2525
  ): Promise<Message<BooleanCache<Cached>>>;
2508
2526
  public deferReply(
2509
2527
  options: InteractionDeferReplyOptions & { withResponse: true },
2510
- ): Promise<InteractionCallbackResponse>;
2528
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2511
2529
  public deferReply(options?: InteractionDeferReplyOptions & { withResponse: false }): Promise<undefined>;
2512
- public deferReply(options?: InteractionDeferReplyOptions): Promise<InteractionCallbackResponse | undefined>;
2530
+ public deferReply(
2531
+ options?: InteractionDeferReplyOptions,
2532
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2513
2533
  public fetchReply(message?: Snowflake | '@original'): Promise<Message<BooleanCache<Cached>>>;
2514
2534
  public followUp(options: string | MessagePayload | InteractionReplyOptions): Promise<Message<BooleanCache<Cached>>>;
2515
2535
  public deferUpdate(
2516
2536
  options: InteractionDeferUpdateOptions & { withResponse: true },
2517
- ): Promise<InteractionCallbackResponse>;
2537
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>>>;
2518
2538
  public deferUpdate(options?: InteractionDeferUpdateOptions & { withResponse: false }): Promise<undefined>;
2519
- public deferUpdate(options?: InteractionDeferUpdateOptions): Promise<InteractionCallbackResponse | undefined>;
2539
+ public deferUpdate(
2540
+ options?: InteractionDeferUpdateOptions,
2541
+ ): Promise<InteractionCallbackResponse<BooleanCache<Cached>> | undefined>;
2520
2542
  public inGuild(): this is ModalSubmitInteraction<'raw' | 'cached'>;
2521
2543
  public inCachedGuild(): this is ModalSubmitInteraction<'cached'>;
2522
2544
  public inRawGuild(): this is ModalSubmitInteraction<'raw'>;
@@ -450,7 +450,7 @@ client.on('messageCreate', async message => {
450
450
  expectAssignable<Message<true>>(message);
451
451
  const component = await message.awaitMessageComponent({ componentType: ComponentType.Button });
452
452
  expectType<ButtonInteraction<'cached'>>(component);
453
- expectType<InteractionCallbackResponse>(await component.reply({ withResponse: true }));
453
+ expectType<InteractionCallbackResponse<true>>(await component.reply({ withResponse: true }));
454
454
 
455
455
  const buttonCollector = message.createMessageComponentCollector({ componentType: ComponentType.Button });
456
456
  expectType<InteractionCollector<ButtonInteraction<'cached'>>>(buttonCollector);
@@ -1878,21 +1878,21 @@ client.on('interactionCreate', async interaction => {
1878
1878
  expectType<MessageActionRowComponent>(interaction.component);
1879
1879
  expectType<Message<true>>(interaction.message);
1880
1880
  expectType<Guild>(interaction.guild);
1881
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ content: 'a', withResponse: true }));
1882
- expectType<Promise<InteractionCallbackResponse>>(interaction.deferReply({ withResponse: true }));
1881
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.reply({ content: 'a', withResponse: true }));
1882
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.deferReply({ withResponse: true }));
1883
1883
  expectType<Promise<undefined>>(interaction.deferReply());
1884
1884
  expectType<Promise<undefined>>(interaction.reply({ content: 'a', withResponse: false }));
1885
1885
  expectType<Promise<undefined>>(interaction.deferReply({ withResponse: false }));
1886
- expectType<Promise<InteractionCallbackResponse | undefined>>(
1886
+ expectType<Promise<InteractionCallbackResponse<true> | undefined>>(
1887
1887
  interaction.reply({ content: 'a', withResponse: booleanValue }),
1888
1888
  );
1889
- expectType<Promise<InteractionCallbackResponse | undefined>>(
1889
+ expectType<Promise<InteractionCallbackResponse<true> | undefined>>(
1890
1890
  interaction.deferReply({ withResponse: booleanValue }),
1891
1891
  );
1892
1892
  expectType<Promise<Message<true>>>(interaction.editReply({ content: 'a' }));
1893
1893
  expectType<Promise<Message<true>>>(interaction.fetchReply());
1894
- expectType<Promise<InteractionCallbackResponse>>(interaction.update({ content: 'a', withResponse: true }));
1895
- expectType<Promise<InteractionCallbackResponse>>(interaction.deferUpdate({ withResponse: true }));
1894
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.update({ content: 'a', withResponse: true }));
1895
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.deferUpdate({ withResponse: true }));
1896
1896
  expectType<Promise<undefined>>(interaction.deferUpdate());
1897
1897
  expectType<Promise<Message<true>>>(interaction.followUp({ content: 'a' }));
1898
1898
  } else if (interaction.inRawGuild()) {
@@ -1900,25 +1900,25 @@ client.on('interactionCreate', async interaction => {
1900
1900
  expectType<APIButtonComponent | APISelectMenuComponent>(interaction.component);
1901
1901
  expectType<Message<false>>(interaction.message);
1902
1902
  expectType<null>(interaction.guild);
1903
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ content: 'a', withResponse: true }));
1904
- expectType<Promise<InteractionCallbackResponse>>(interaction.deferReply({ withResponse: true }));
1903
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.reply({ content: 'a', withResponse: true }));
1904
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.deferReply({ withResponse: true }));
1905
1905
  expectType<Promise<undefined>>(interaction.reply({ content: 'a', withResponse: false }));
1906
1906
  expectType<Promise<undefined>>(interaction.deferReply({ withResponse: false }));
1907
1907
  expectType<Promise<undefined>>(interaction.deferReply());
1908
- expectType<Promise<InteractionCallbackResponse | undefined>>(
1908
+ expectType<Promise<InteractionCallbackResponse<false> | undefined>>(
1909
1909
  interaction.reply({ content: 'a', withResponse: booleanValue }),
1910
1910
  );
1911
- expectType<Promise<InteractionCallbackResponse | undefined>>(
1911
+ expectType<Promise<InteractionCallbackResponse<false> | undefined>>(
1912
1912
  interaction.deferReply({ withResponse: booleanValue }),
1913
1913
  );
1914
1914
  expectType<Promise<Message<false>>>(interaction.editReply({ content: 'a' }));
1915
1915
  expectType<Promise<Message<false>>>(interaction.fetchReply());
1916
- expectType<Promise<InteractionCallbackResponse>>(interaction.update({ content: 'a', withResponse: true }));
1916
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.update({ content: 'a', withResponse: true }));
1917
1917
  expectType<Promise<undefined>>(interaction.update({ content: 'a', withResponse: false }));
1918
- expectType<Promise<InteractionCallbackResponse | undefined>>(
1918
+ expectType<Promise<InteractionCallbackResponse<false> | undefined>>(
1919
1919
  interaction.update({ content: 'a', withResponse: booleanValue }),
1920
1920
  );
1921
- expectType<Promise<InteractionCallbackResponse>>(interaction.deferUpdate({ withResponse: true }));
1921
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.deferUpdate({ withResponse: true }));
1922
1922
  expectType<Promise<undefined>>(interaction.deferUpdate());
1923
1923
  expectType<Promise<Message<false>>>(interaction.followUp({ content: 'a' }));
1924
1924
  } else if (interaction.inGuild()) {
@@ -1979,15 +1979,15 @@ client.on('interactionCreate', async interaction => {
1979
1979
  expectAssignable<ContextMenuCommandInteraction>(interaction);
1980
1980
  expectAssignable<Guild>(interaction.guild);
1981
1981
  expectAssignable<CommandInteraction<'cached'>>(interaction);
1982
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ content: 'a', withResponse: true }));
1983
- expectType<Promise<InteractionCallbackResponse>>(interaction.deferReply({ withResponse: true }));
1982
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.reply({ content: 'a', withResponse: true }));
1983
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.deferReply({ withResponse: true }));
1984
1984
  expectType<Promise<undefined>>(interaction.deferReply());
1985
1985
  expectType<Promise<undefined>>(interaction.reply({ content: 'a', withResponse: false }));
1986
1986
  expectType<Promise<undefined>>(interaction.deferReply({ withResponse: false }));
1987
- expectType<Promise<InteractionCallbackResponse | undefined>>(
1987
+ expectType<Promise<InteractionCallbackResponse<true> | undefined>>(
1988
1988
  interaction.reply({ content: 'a', withResponse: booleanValue }),
1989
1989
  );
1990
- expectType<Promise<InteractionCallbackResponse | undefined>>(
1990
+ expectType<Promise<InteractionCallbackResponse<true> | undefined>>(
1991
1991
  interaction.deferReply({ withResponse: booleanValue }),
1992
1992
  );
1993
1993
  expectType<Promise<Message<true>>>(interaction.editReply({ content: 'a' }));
@@ -1996,15 +1996,15 @@ client.on('interactionCreate', async interaction => {
1996
1996
  } else if (interaction.inRawGuild()) {
1997
1997
  expectAssignable<ContextMenuCommandInteraction>(interaction);
1998
1998
  expectType<null>(interaction.guild);
1999
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ content: 'a', withResponse: true }));
2000
- expectType<Promise<InteractionCallbackResponse>>(interaction.deferReply({ withResponse: true }));
1999
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.reply({ content: 'a', withResponse: true }));
2000
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.deferReply({ withResponse: true }));
2001
2001
  expectType<Promise<undefined>>(interaction.deferReply());
2002
2002
  expectType<Promise<undefined>>(interaction.reply({ content: 'a', withResponse: false }));
2003
2003
  expectType<Promise<undefined>>(interaction.deferReply({ withResponse: false }));
2004
- expectType<Promise<InteractionCallbackResponse | undefined>>(
2004
+ expectType<Promise<InteractionCallbackResponse<false> | undefined>>(
2005
2005
  interaction.reply({ content: 'a', withResponse: booleanValue }),
2006
2006
  );
2007
- expectType<Promise<InteractionCallbackResponse | undefined>>(
2007
+ expectType<Promise<InteractionCallbackResponse<false> | undefined>>(
2008
2008
  interaction.deferReply({ withResponse: booleanValue }),
2009
2009
  );
2010
2010
  expectType<Promise<Message<false>>>(interaction.editReply({ content: 'a' }));
@@ -2077,13 +2077,13 @@ client.on('interactionCreate', async interaction => {
2077
2077
  expectType<ButtonComponent>(interaction.component);
2078
2078
  expectType<Message<true>>(interaction.message);
2079
2079
  expectType<Guild>(interaction.guild);
2080
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ withResponse: true }));
2080
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.reply({ withResponse: true }));
2081
2081
  } else if (interaction.inRawGuild()) {
2082
2082
  expectAssignable<ButtonInteraction>(interaction);
2083
2083
  expectType<APIButtonComponent>(interaction.component);
2084
2084
  expectType<Message<false>>(interaction.message);
2085
2085
  expectType<null>(interaction.guild);
2086
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ withResponse: true }));
2086
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.reply({ withResponse: true }));
2087
2087
  } else if (interaction.inGuild()) {
2088
2088
  expectAssignable<ButtonInteraction>(interaction);
2089
2089
  expectType<ButtonComponent | APIButtonComponent>(interaction.component);
@@ -2105,13 +2105,13 @@ client.on('interactionCreate', async interaction => {
2105
2105
  expectType<StringSelectMenuComponent>(interaction.component);
2106
2106
  expectType<Message<true>>(interaction.message);
2107
2107
  expectType<Guild>(interaction.guild);
2108
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ withResponse: true }));
2108
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.reply({ withResponse: true }));
2109
2109
  } else if (interaction.inRawGuild()) {
2110
2110
  expectAssignable<StringSelectMenuInteraction>(interaction);
2111
2111
  expectType<APIStringSelectComponent>(interaction.component);
2112
2112
  expectType<Message<false>>(interaction.message);
2113
2113
  expectType<null>(interaction.guild);
2114
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ withResponse: true }));
2114
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.reply({ withResponse: true }));
2115
2115
  } else if (interaction.inGuild()) {
2116
2116
  expectAssignable<StringSelectMenuInteraction>(interaction);
2117
2117
  expectType<StringSelectMenuComponent | APIStringSelectComponent>(interaction.component);
@@ -2128,7 +2128,7 @@ client.on('interactionCreate', async interaction => {
2128
2128
  if (interaction.inRawGuild()) {
2129
2129
  expectNotAssignable<Interaction<'cached'>>(interaction);
2130
2130
  expectAssignable<ChatInputCommandInteraction>(interaction);
2131
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ withResponse: true }));
2131
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.reply({ withResponse: true }));
2132
2132
  expectType<APIInteractionDataResolvedGuildMember | null>(interaction.options.getMember('test'));
2133
2133
 
2134
2134
  expectType<APIInteractionDataResolvedChannel>(interaction.options.getChannel('test', true));
@@ -2136,7 +2136,7 @@ client.on('interactionCreate', async interaction => {
2136
2136
  } else if (interaction.inCachedGuild()) {
2137
2137
  expectType<GuildMember | null>(interaction.options.getMember('test'));
2138
2138
  expectAssignable<ChatInputCommandInteraction>(interaction);
2139
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ withResponse: true }));
2139
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.reply({ withResponse: true }));
2140
2140
 
2141
2141
  expectType<GuildBasedChannel>(interaction.options.getChannel('test', true));
2142
2142
  expectType<Role>(interaction.options.getRole('test', true));
@@ -2215,23 +2215,23 @@ client.on('interactionCreate', async interaction => {
2215
2215
  if (interaction.inCachedGuild()) {
2216
2216
  expectAssignable<ModalSubmitInteraction>(interaction);
2217
2217
  expectType<Guild>(interaction.guild);
2218
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ content: 'a', withResponse: true }));
2219
- expectType<Promise<InteractionCallbackResponse>>(interaction.deferReply({ withResponse: true }));
2218
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.reply({ content: 'a', withResponse: true }));
2219
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.deferReply({ withResponse: true }));
2220
2220
  expectType<Promise<undefined>>(interaction.deferReply());
2221
2221
  expectType<Promise<Message<true>>>(interaction.editReply({ content: 'a' }));
2222
2222
  expectType<Promise<Message<true>>>(interaction.fetchReply());
2223
- expectType<Promise<InteractionCallbackResponse>>(interaction.deferUpdate({ withResponse: true }));
2223
+ expectType<Promise<InteractionCallbackResponse<true>>>(interaction.deferUpdate({ withResponse: true }));
2224
2224
  expectType<Promise<undefined>>(interaction.deferUpdate());
2225
2225
  expectType<Promise<Message<true>>>(interaction.followUp({ content: 'a' }));
2226
2226
  } else if (interaction.inRawGuild()) {
2227
2227
  expectAssignable<ModalSubmitInteraction>(interaction);
2228
2228
  expectType<null>(interaction.guild);
2229
- expectType<Promise<InteractionCallbackResponse>>(interaction.reply({ content: 'a', withResponse: true }));
2230
- expectType<Promise<InteractionCallbackResponse>>(interaction.deferReply({ withResponse: true }));
2229
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.reply({ content: 'a', withResponse: true }));
2230
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.deferReply({ withResponse: true }));
2231
2231
  expectType<Promise<undefined>>(interaction.deferReply());
2232
2232
  expectType<Promise<Message<false>>>(interaction.editReply({ content: 'a' }));
2233
2233
  expectType<Promise<Message<false>>>(interaction.fetchReply());
2234
- expectType<Promise<InteractionCallbackResponse>>(interaction.deferUpdate({ withResponse: true }));
2234
+ expectType<Promise<InteractionCallbackResponse<false>>>(interaction.deferUpdate({ withResponse: true }));
2235
2235
  expectType<Promise<undefined>>(interaction.deferUpdate());
2236
2236
  expectType<Promise<Message<false>>>(interaction.followUp({ content: 'a' }));
2237
2237
  } else if (interaction.inGuild()) {