From 0ab22279847340ca84f07eab0ef86176a8f3cf0e Mon Sep 17 00:00:00 2001 From: MateoDeveloper <79017590+Mateo-tem@users.noreply.github.com> Date: Tue, 14 Jun 2022 18:02:03 -0500 Subject: [PATCH] fix(ModalSubmitInteraction): add `isFromMessage()` missing method (#8092) --- src/structures/ModalSubmitInteraction.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/structures/ModalSubmitInteraction.js b/src/structures/ModalSubmitInteraction.js index 306320f29..2782d5ad0 100644 --- a/src/structures/ModalSubmitInteraction.js +++ b/src/structures/ModalSubmitInteraction.js @@ -94,6 +94,14 @@ class ModalSubmitInteraction extends Interaction { })); } + /** + * Whether this is from a {@link MessageComponentInteraction}. + * @returns {boolean} + */ + isFromMessage() { + return Boolean(this.message); + } + // These are here only for documentation purposes - they are implemented by InteractionResponses /* eslint-disable no-empty-function */ deferReply() {}