mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +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.messageId && interaction.message?.id !== this.messageId) return null;
|
||||||
if (
|
if (
|
||||||
this.messageInteractionId &&
|
this.messageInteractionId &&
|
||||||
interaction.message?.interaction?.id &&
|
interaction.message?.interactionMetadata?.id &&
|
||||||
interaction.message.interaction.id !== this.messageInteractionId
|
interaction.message.interactionMetadata.id !== this.messageInteractionId
|
||||||
) {
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -180,8 +180,8 @@ class InteractionCollector extends Collector {
|
|||||||
if (this.messageId && interaction.message?.id !== this.messageId) return null;
|
if (this.messageId && interaction.message?.id !== this.messageId) return null;
|
||||||
if (
|
if (
|
||||||
this.messageInteractionId &&
|
this.messageInteractionId &&
|
||||||
interaction.message?.interaction?.id &&
|
interaction.message?.interactionMetadata?.id &&
|
||||||
interaction.message.interaction.id !== this.messageInteractionId
|
interaction.message.interactionMetadata.id !== this.messageInteractionId
|
||||||
) {
|
) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -224,7 +224,7 @@ class InteractionCollector extends Collector {
|
|||||||
this.stop('messageDelete');
|
this.stop('messageDelete');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message.interaction?.id === this.messageInteractionId) {
|
if (message.interactionMetadata?.id === this.messageInteractionId) {
|
||||||
this.stop('messageDelete');
|
this.stop('messageDelete');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ class InteractionResponses {
|
|||||||
|
|
||||||
return options.withResponse
|
return options.withResponse
|
||||||
? new InteractionCallbackResponse(this.client, response)
|
? 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
|
return options.withResponse
|
||||||
? new InteractionCallbackResponse(this.client, response)
|
? 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