mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 18:43:31 +01:00
fix(Webhook): resolve non-string avatars too (#5914)
This commit is contained in:
@@ -232,7 +232,7 @@ class Webhook {
|
||||
* @returns {Promise<Webhook>}
|
||||
*/
|
||||
async edit({ name = this.name, avatar, channel }, reason) {
|
||||
if (avatar && typeof avatar === 'string' && !avatar.startsWith('data:')) {
|
||||
if (avatar && !(typeof avatar === 'string' && avatar.startsWith('data:'))) {
|
||||
avatar = await DataResolver.resolveImage(avatar);
|
||||
}
|
||||
if (channel) channel = channel instanceof Channel ? channel.id : channel;
|
||||
|
||||
Reference in New Issue
Block a user