Repository: discordjs/discord.js
File: packages/discord.js/src/structures/Message.js (JavaScript)

Code before:
     * @property {string} commandName The name of the interaction's application command,
     * as well as the subcommand and subcommand group, where applicable
     * @property {User} user The user that invoked the interaction
     */

    if (data.interaction) {
      /**
       * Partial data of the interaction that this message is a reply to
       * @type {?MessageInteraction}
       */
      this.interaction = {
        id: data.interaction.id,
        type: data.interaction.type,
        commandName: data.interaction.name,
        user: this.client.users._add(data.interaction.user),
      };
    } else {
      this.interaction ??= null;
    }

    if (data.poll) {
      const existing = this.poll;

      if (existing && data.poll) {
        existing._patch({ ...existing, ...data.poll, partial: false });
      }

      /**
       * The poll that was sent with the message
       * @type {?Poll}
       */
      this.poll ??= new Poll(this.client, data.poll, this, this.channel);
    } else {
      this.poll ??= null;
    }

    /**
     * A call associated with a message
     * @typedef {Object} MessageCall
     * @property {Readonly<?Date>} endedAt The time the call ended
     * @property {?number} endedTimestamp The timestamp the call ended
     * @property {Snowflake[]} participants The ids of the users that participated in the call
     */

    if (data.call) {
      /**
       * The call associated with the message
       * @type {?MessageCall}
       */
      this.call = {
        endedTimestamp: data.call.ended_timestamp ? Date.parse(data.call.ended_timestamp) : null,

Review comment (suggestion):
```suggestion
      if (this.poll) {
        this.poll._patch({ ...data.poll, partial: false });
      }
```

Code after:
       * Partial data of the interaction that a message is a result of
       * @typedef {Object} MessageInteractionMetadata
       * @property {Snowflake} id The interaction's id
       * @property {InteractionType} type The type of the interaction
       * @property {User} user The user that invoked the interaction
       * @property {APIAuthorizingIntegrationOwnersMap} authorizingIntegrationOwners
       * Ids for installation context(s) related to an interaction
       * @property {?Snowflake} originalResponseMessageId
       * Id of the original response message. Present only on follow-up messages
       * @property {?Snowflake} interactedMessageId
       * Id of the message that contained interactive component.
       * Present only on messages created from component interactions
       * @property {?MessageInteractionMetadata} triggeringInteractionMetadata
       * Metadata for the interaction that was used to open the modal. Present only on modal submit interactions
       */

      /**
       * Partial data of the interaction that this message is a result of
       * @type {?MessageInteractionMetadata}
       */
      this.interactionMetadata = _transformAPIMessageInteractionMetadata(this.client, data.interaction_metadata);
    } else {
      this.interactionMetadata ??= null;
    }

    if (data.poll) {
      if (this.poll) {
        this.poll._patch(data.poll);
      } else {
        /**
         * The poll that was sent with the message
         * @type {?Poll}
         */
        this.poll = new Poll(this.client, data.poll, this, this.channel);
      }
    } else {
      this.poll ??= null;
    }

    if (data.message_snapshots) {
      /**
       * The message snapshots associated with the message reference
       * @type {Collection<Snowflake, Message>}
       */
      this.messageSnapshots = data.message_snapshots.reduce((coll, snapshot) => {
        const channel = this.client.channels.resolve(this.reference.channelId);
        const snapshotData = {
          ...snapshot.message,
          id: this.reference.messageId,
          channel_id: this.reference.channelId,
          guild_id: this.reference.guildId,