discord.js 15.0.0-dev.1733832358-2ff47d85c → 15.0.0-dev.1734005130-fd1958bd6
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.
|
|
4
|
+
"version": "15.0.0-dev.1734005130-fd1958bd6",
|
|
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",
|
|
@@ -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
|
-
|
|
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?.
|
|
157
|
-
interaction.message.
|
|
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?.
|
|
184
|
-
interaction.message.
|
|
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.
|
|
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?.
|
|
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.
|
|
269
|
+
: new InteractionResponse(this, this.message.interactionMetadata?.id);
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
/**
|
package/typings/index.d.mts
CHANGED
|
@@ -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
|
|
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>
|
package/typings/index.d.ts
CHANGED
|
@@ -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
|
|
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>
|
package/typings/index.test-d.ts
CHANGED
|
@@ -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.
|
|
2402
|
+
if (interaction.isSelectMenu()) {
|
|
2403
2403
|
expectType<SelectMenuInteraction>(interaction);
|
|
2404
2404
|
}
|
|
2405
2405
|
|