mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
feat(Webhook): addition of Webhook#avatarURL function (#3625)
* feat: addition of Webhook#avatarURL * typings: added Webhook#avatarURL * fix: trailing space * docs: fixed jsdoc function description * fix: typo
This commit is contained in:
@@ -220,6 +220,16 @@ class Webhook {
|
||||
return this.client.options.http.api + this.client.api.webhooks(this.id, this.token);
|
||||
}
|
||||
|
||||
/**
|
||||
* A link to the webhook's avatar.
|
||||
* @param {ImageURLOptions} [options={}] Options for the Image URL
|
||||
* @returns {?string}
|
||||
*/
|
||||
avatarURL({ format, size } = {}) {
|
||||
if (!this.avatar) return null;
|
||||
return this.client.rest.cdn.Avatar(this.id, this.avatar, format, size);
|
||||
}
|
||||
|
||||
static applyToClass(structure) {
|
||||
for (const prop of [
|
||||
'send',
|
||||
|
||||
Reference in New Issue
Block a user