mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
fix(*): typedefs and typings for image & webhook options (#5805)
This commit is contained in:
@@ -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 } = {}) {
|
||||
|
||||
Reference in New Issue
Block a user