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

@@ -211,12 +211,17 @@ class Webhook {
}
/**
* Edits the webhook.
* @param {Object} options Options
* @param {string} [options.name=this.name] New name for this webhook
* @param {BufferResolvable} [options.avatar] New avatar for this webhook
* @param {ChannelResolvable} [options.channel] New channel for this webhook
* @param {string} [reason] Reason for editing this webhook
* Options used to edit a {@link Webhook}.
* @typedef {Object} WebhookEditData
* @property {string} [name=this.name] The new name for the webhook
* @property {BufferResolvable} [avatar] The new avatar for the webhook
* @property {ChannelResolvable} [channel] The new channel for the webhook
*/
/**
* Edits this webhook.
* @param {WebhookEditData} options Options for editing the webhook
* @param {string} [reason] Reason for editing the webhook
* @returns {Promise<Webhook>}
*/
async edit({ name = this.name, avatar, channel }, reason) {
@@ -334,7 +339,7 @@ class Webhook {
/**
* A link to the webhook's avatar.
* @param {ImageURLOptions} [options={}] Options for the Image URL
* @param {StaticImageURLOptions} [options={}] Options for the Image URL
* @returns {?string}
*/
avatarURL({ format, size } = {}) {