From 8b98630169c6c6115c1742b4328b8863784bbd36 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 17 Jun 2022 12:43:10 +0700 Subject: [PATCH] fix(ModalSubmitInteraction): add `isFromMessage()` missing method v13.8.1 --- src/structures/ModalSubmitInteraction.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/structures/ModalSubmitInteraction.js b/src/structures/ModalSubmitInteraction.js index 306320f..2782d5a 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() {}