Skip to content

Commit

Permalink
fix(modals): correctly set message prop on interaction if present
Browse files Browse the repository at this point in the history
  • Loading branch information
monbrey committed Feb 22, 2022
1 parent 4e586e2 commit 5534065
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/structures/ModalSubmitInteraction.js
Expand Up @@ -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
Expand Down

0 comments on commit 5534065

Please sign in to comment.