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

Code before:
    }
  }

  /**
   * 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>}
   * @example
   * // Send a basic message
   * webhook.send('hello!')
   *   .then(message => console.log(`Sent message: ${message.content}`))
   *   .catch(console.error);
   * @example
   * // Send a basic message in a thread
   * webhook.send({ content: 'hello!', threadId: '836856309672348295' })
   *   .then(message => console.log(`Sent message: ${message.content}`))

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

Code after:
    }
  }

  /**
   * 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>}
   * @example
   * // Send a basic message
   * webhook.send('hello!')
   *   .then(message => console.log(`Sent message: ${message.content}`))
   *   .catch(console.error);
   * @example
   * // Send a basic message in a thread
   * webhook.send({ content: 'hello!', threadId: '836856309672348295' })
   *   .then(message => console.log(`Sent message: ${message.content}`))