fix(*): typedefs and typings for image & webhook options (#5805)

This commit is contained in:
Shubham Parihar
2021-06-12 03:52:01 +05:30
committed by GitHub
parent 19d0405aa5
commit a5a6e22316
10 changed files with 71 additions and 58 deletions

View File

@@ -126,12 +126,17 @@ class TextChannel extends GuildChannel {
});
}
/**
* Options used to create a {@link Webhook} for {@link TextChannel} and {@link NewsChannel}.
* @typedef {Object} ChannelWebhookCreateOptions
* @property {BufferResolvable|Base64Resolvable} [avatar] Avatar for the webhook
* @property {string} [reason] Reason for creating the webhook
*/
/**
* Creates a webhook for the channel.
* @param {string} name The name of the webhook
* @param {Object} [options] Options for creating the webhook
* @param {BufferResolvable|Base64Resolvable} [options.avatar] Avatar for the webhook
* @param {string} [options.reason] Reason for creating the webhook
* @param {ChannelWebhookCreateOptions} [options] Options for creating the webhook
* @returns {Promise<Webhook>} webhook The created webhook
* @example
* // Create a webhook for the current channel