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

Code before:

    if ('source_channel' in data) {
      /**
       * The source channel of the webhook
       * @type {?(AnnouncementChannel|APIChannel)}
       */
      this.sourceChannel = this.client.channels?.cache.get(data.source_channel?.id) ?? data.source_channel;
    } else {
      this.sourceChannel ??= null;
    }
  }

  /**
   * Options that can be passed into send.
   * @typedef {BaseMessageOptionsWithPoll} WebhookMessageCreateOptions
   * @property {boolean} [tts=false] Whether the message should be spoken aloud
   * @property {MessageFlags} [flags] Which flags to set for the message.
   * <info>Only the {@link MessageFlags.SuppressEmbeds} flag can be set.</info>
   * @property {string} [username=this.name] Username override for the message
   * @property {string} [avatarURL] Avatar URL override for the message
   * @property {Snowflake} [threadId] The id of the thread in the channel to send to.
   * <info>For interaction webhooks, this property is ignored</info>
   * @property {string} [threadName] Name of the thread to create (only available if the webhook is in a forum channel)
   * @property {Snowflake[]} [appliedTags]
   * The tags to apply to the created thread (only available if the webhook is in a forum channel)
   * @property {boolean} [withComponents] Whether to allow sending (non-interactive) components in the message.
   * <info>For application-owned webhooks, this property is ignored</info>
   */

  /**
   * Options that can be passed into editMessage.
   * @typedef {MessageEditOptions} WebhookMessageEditOptions
   * @property {Snowflake} [threadId] The id of the thread this message belongs to
   * <info>For interaction webhooks, this property is ignored</info>
   * @property {boolean} [withComponents] Whether to allow sending (non-interactive) components in the message.
   * <info>For application-owned webhooks, this property is ignored</info>
   */

  /**
   * The channel the webhook belongs to
   * @type {?(TextChannel|VoiceChannel|StageChannel|AnnouncementChannel|ForumChannel|MediaChannel)}
   * @readonly
   */
  get channel() {
    return this.client.channels.resolve(this.channelId);
  }

  /**
   * Sends a message with this webhook.
   * @param {string|MessagePayload|WebhookMessageCreateOptions} options The options to provide
   * @returns {Promise<Message>}

Review comment (suggestion):
```suggestion
   * @property {boolean} [withComponents] Whether to allow sending non-interactive components in the message.
```

Code after:

    if ('source_channel' in data) {
      /**
       * The source channel of the webhook
       * @type {?(AnnouncementChannel|APIChannel)}
       */
      this.sourceChannel = this.client.channels?.cache.get(data.source_channel?.id) ?? data.source_channel;
    } else {
      this.sourceChannel ??= null;
    }
  }

  /**
   * Options that can be passed into send.
   * @typedef {BaseMessageOptionsWithPoll} WebhookMessageCreateOptions
   * @property {boolean} [tts=false] Whether the message should be spoken aloud
   * @property {MessageFlags} [flags] Which flags to set for the message.
   * <info>Only the {@link MessageFlags.SuppressEmbeds} flag can be set.</info>
   * @property {string} [username=this.name] Username override for the message
   * @property {string} [avatarURL] Avatar URL override for the message
   * @property {Snowflake} [threadId] The id of the thread in the channel to send to.
   * <info>For interaction webhooks, this property is ignored</info>
   * @property {string} [threadName] Name of the thread to create (only available if the webhook is in a forum channel)
   * @property {Snowflake[]} [appliedTags]
   * The tags to apply to the created thread (only available if the webhook is in a forum channel)
   * @property {boolean} [withComponents] Whether to allow sending non-interactive components in the message.
   * <info>For application-owned webhooks, this property is ignored</info>
   */

  /**
   * Options that can be passed into editMessage.
   * @typedef {MessageEditOptions} WebhookMessageEditOptions
   * @property {Snowflake} [threadId] The id of the thread this message belongs to
   * <info>For interaction webhooks, this property is ignored</info>
   * @property {boolean} [withComponents] Whether to allow sending non-interactive components in the message.
   * <info>For application-owned webhooks, this property is ignored</info>
   */

  /**
   * The channel the webhook belongs to
   * @type {?(TextChannel|VoiceChannel|StageChannel|AnnouncementChannel|ForumChannel|MediaChannel)}
   * @readonly
   */
  get channel() {
    return this.client.channels.resolve(this.channelId);
  }

  /**
   * Sends a message with this webhook.
   * @param {string|MessagePayload|WebhookMessageCreateOptions} options The options to provide
   * @returns {Promise<Message>}