mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
fix: use Message#interactionMetadata (#10654)
This commit is contained in:
@@ -153,8 +153,8 @@ class InteractionCollector extends Collector {
|
||||
if (this.messageId && interaction.message?.id !== this.messageId) return null;
|
||||
if (
|
||||
this.messageInteractionId &&
|
||||
interaction.message?.interaction?.id &&
|
||||
interaction.message.interaction.id !== this.messageInteractionId
|
||||
interaction.message?.interactionMetadata?.id &&
|
||||
interaction.message.interactionMetadata.id !== this.messageInteractionId
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
@@ -180,8 +180,8 @@ class InteractionCollector extends Collector {
|
||||
if (this.messageId && interaction.message?.id !== this.messageId) return null;
|
||||
if (
|
||||
this.messageInteractionId &&
|
||||
interaction.message?.interaction?.id &&
|
||||
interaction.message.interaction.id !== this.messageInteractionId
|
||||
interaction.message?.interactionMetadata?.id &&
|
||||
interaction.message.interactionMetadata.id !== this.messageInteractionId
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
@@ -224,7 +224,7 @@ class InteractionCollector extends Collector {
|
||||
this.stop('messageDelete');
|
||||
}
|
||||
|
||||
if (message.interaction?.id === this.messageInteractionId) {
|
||||
if (message.interactionMetadata?.id === this.messageInteractionId) {
|
||||
this.stop('messageDelete');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ class InteractionResponses {
|
||||
|
||||
return options.withResponse
|
||||
? new InteractionCallbackResponse(this.client, response)
|
||||
: new InteractionResponse(this, this.message?.interaction?.id);
|
||||
: new InteractionResponse(this, this.message?.interactionMetadata?.id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -266,7 +266,7 @@ class InteractionResponses {
|
||||
|
||||
return options.withResponse
|
||||
? new InteractionCallbackResponse(this.client, response)
|
||||
: new InteractionResponse(this, this.message.interaction?.id);
|
||||
: new InteractionResponse(this, this.message.interactionMetadata?.id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user