mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Added resolveImage to reduce code duplication (#1820)
* add client#resolveImage * oops * resolveFile fix * async is the future * async * update doc example * build fix * doc fix * fix docs * thx hydar
This commit is contained in:
@@ -65,7 +65,7 @@ class TextChannel extends GuildChannel {
|
||||
name, avatar,
|
||||
}, reason }).then(data => new Webhook(this.client, data));
|
||||
} else {
|
||||
return this.client.resolver.resolveBuffer(avatar).then(data =>
|
||||
return this.client.resolver.resolveFile(avatar).then(data =>
|
||||
this.createWebhook(name, this.client.resolver.resolveBase64(data) || null));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user