discord.js 15.0.0-dev.1733832358-2ff47d85c → 15.0.0-dev.1734048794-0848fc6b4

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.1733832358-2ff47d85c",
4
+ "version": "15.0.0-dev.1734048794-0848fc6b4",
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",
@@ -62,8 +62,8 @@
62
62
  "undici": "6.21.0",
63
63
  "@discordjs/formatters": "^0.5.0",
64
64
  "@discordjs/rest": "^2.4.0",
65
- "@discordjs/ws": "^2.0.0",
66
- "@discordjs/util": "^1.1.1"
65
+ "@discordjs/util": "^1.1.1",
66
+ "@discordjs/ws": "^2.0.0"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@favware/cliff-jumper": "^4.1.0",
@@ -80,9 +80,9 @@
80
80
  "tslint": "6.1.3",
81
81
  "turbo": "^2.3.0",
82
82
  "typescript": "~5.5.4",
83
+ "@discordjs/api-extractor": "^7.38.1",
83
84
  "@discordjs/docgen": "^0.12.1",
84
- "@discordjs/scripts": "^0.1.0",
85
- "@discordjs/api-extractor": "^7.38.1"
85
+ "@discordjs/scripts": "^0.1.0"
86
86
  },
87
87
  "engines": {
88
88
  "node": ">=20"
@@ -262,7 +262,7 @@ class BaseInteraction extends Base {
262
262
  * Indicates whether this interaction is a select menu of any known type.
263
263
  * @returns {boolean}
264
264
  */
265
- isAnySelectMenu() {
265
+ isSelectMenu() {
266
266
  return this.type === InteractionType.MessageComponent && SelectMenuTypes.includes(this.componentType);
267
267
  }
268
268
 
@@ -153,8 +153,8 @@ class InteractionCollector extends Collector {
153
153
  if (this.messageId && interaction.message?.id !== this.messageId) return null;
154
154
  if (
155
155
  this.messageInteractionId &&
156
- interaction.message?.interaction?.id &&
157
- interaction.message.interaction.id !== this.messageInteractionId
156
+ interaction.message?.interactionMetadata?.id &&
157
+ interaction.message.interactionMetadata.id !== this.messageInteractionId
158
158
  ) {
159
159
  return null;
160
160
  }
@@ -180,8 +180,8 @@ class InteractionCollector extends Collector {
180
180
  if (this.messageId && interaction.message?.id !== this.messageId) return null;
181
181
  if (
182
182
  this.messageInteractionId &&
183
- interaction.message?.interaction?.id &&
184
- interaction.message.interaction.id !== this.messageInteractionId
183
+ interaction.message?.interactionMetadata?.id &&
184
+ interaction.message.interactionMetadata.id !== this.messageInteractionId
185
185
  ) {
186
186
  return null;
187
187
  }
@@ -224,7 +224,7 @@ class InteractionCollector extends Collector {
224
224
  this.stop('messageDelete');
225
225
  }
226
226
 
227
- if (message.interaction?.id === this.messageInteractionId) {
227
+ if (message.interactionMetadata?.id === this.messageInteractionId) {
228
228
  this.stop('messageDelete');
229
229
  }
230
230
  }
@@ -228,7 +228,7 @@ class InteractionResponses {
228
228
 
229
229
  return options.withResponse
230
230
  ? new InteractionCallbackResponse(this.client, response)
231
- : new InteractionResponse(this, this.message?.interaction?.id);
231
+ : new InteractionResponse(this, this.message?.interactionMetadata?.id);
232
232
  }
233
233
 
234
234
  /**
@@ -266,7 +266,7 @@ class InteractionResponses {
266
266
 
267
267
  return options.withResponse
268
268
  ? new InteractionCallbackResponse(this.client, response)
269
- : new InteractionResponse(this, this.message.interaction?.id);
269
+ : new InteractionResponse(this, this.message.interactionMetadata?.id);
270
270
  }
271
271
 
272
272
  /**
@@ -1987,7 +1987,7 @@ export class BaseInteraction<Cached extends CacheType = CacheType> extends Base
1987
1987
  public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction<Cached>;
1988
1988
  public isModalSubmit(): this is ModalSubmitInteraction<Cached>;
1989
1989
  public isUserContextMenuCommand(): this is UserContextMenuCommandInteraction<Cached>;
1990
- public isAnySelectMenu(): this is SelectMenuInteraction<Cached>;
1990
+ public isSelectMenu(): this is SelectMenuInteraction<Cached>;
1991
1991
  public isStringSelectMenu(): this is StringSelectMenuInteraction<Cached>;
1992
1992
  public isUserSelectMenu(): this is UserSelectMenuInteraction<Cached>;
1993
1993
  public isRoleSelectMenu(): this is RoleSelectMenuInteraction<Cached>;
@@ -2964,8 +2964,6 @@ export class ChannelSelectMenuInteraction<
2964
2964
  public inRawGuild(): this is ChannelSelectMenuInteraction<'raw'>;
2965
2965
  }
2966
2966
 
2967
- // Ideally this should be named SelectMenuInteraction, but that's the name of the "old" StringSelectMenuInteraction, meaning
2968
- // the type name is reserved as a re-export to prevent a breaking change from being made, as such:
2969
2967
  export type SelectMenuInteraction<Cached extends CacheType = CacheType> =
2970
2968
  | StringSelectMenuInteraction<Cached>
2971
2969
  | UserSelectMenuInteraction<Cached>
@@ -1987,7 +1987,7 @@ export class BaseInteraction<Cached extends CacheType = CacheType> extends Base
1987
1987
  public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction<Cached>;
1988
1988
  public isModalSubmit(): this is ModalSubmitInteraction<Cached>;
1989
1989
  public isUserContextMenuCommand(): this is UserContextMenuCommandInteraction<Cached>;
1990
- public isAnySelectMenu(): this is SelectMenuInteraction<Cached>;
1990
+ public isSelectMenu(): this is SelectMenuInteraction<Cached>;
1991
1991
  public isStringSelectMenu(): this is StringSelectMenuInteraction<Cached>;
1992
1992
  public isUserSelectMenu(): this is UserSelectMenuInteraction<Cached>;
1993
1993
  public isRoleSelectMenu(): this is RoleSelectMenuInteraction<Cached>;
@@ -2964,8 +2964,6 @@ export class ChannelSelectMenuInteraction<
2964
2964
  public inRawGuild(): this is ChannelSelectMenuInteraction<'raw'>;
2965
2965
  }
2966
2966
 
2967
- // Ideally this should be named SelectMenuInteraction, but that's the name of the "old" StringSelectMenuInteraction, meaning
2968
- // the type name is reserved as a re-export to prevent a breaking change from being made, as such:
2969
2967
  export type SelectMenuInteraction<Cached extends CacheType = CacheType> =
2970
2968
  | StringSelectMenuInteraction<Cached>
2971
2969
  | UserSelectMenuInteraction<Cached>
@@ -2399,7 +2399,7 @@ expectType<Readonly<ChannelFlagsBitField>>(threadChannel.flags);
2399
2399
  expectType<null>(partialGroupDMChannel.flags);
2400
2400
 
2401
2401
  // Select menu type narrowing
2402
- if (interaction.isAnySelectMenu()) {
2402
+ if (interaction.isSelectMenu()) {
2403
2403
  expectType<SelectMenuInteraction>(interaction);
2404
2404
  }
2405
2405