From 55340655f247f48fb66dde1d53342bb3dfeb4a39 Mon Sep 17 00:00:00 2001 From: monbrey Date: Wed, 23 Feb 2022 08:27:12 +1100 Subject: [PATCH] fix(modals): correctly set message prop on interaction if present --- src/structures/ModalSubmitInteraction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/ModalSubmitInteraction.js b/src/structures/ModalSubmitInteraction.js index 3d7f3a2596c8..306320f29cc3 100644 --- a/src/structures/ModalSubmitInteraction.js +++ b/src/structures/ModalSubmitInteraction.js @@ -48,7 +48,7 @@ class ModalSubmitInteraction extends Interaction { * The message associated with this interaction * @type {Message|APIMessage|null} */ - this.message = this.channel?.messages._add(data.message) ?? data.message ?? null; + this.message = data.message ? this.channel?.messages._add(data.message) ?? data.message : null; /** * The fields within the modal