diff --git a/src/structures/ClientUser.js b/src/structures/ClientUser.js index 35ec22bde..6a8532141 100644 --- a/src/structures/ClientUser.js +++ b/src/structures/ClientUser.js @@ -116,7 +116,7 @@ class ClientUser extends User { * .catch(console.error); */ setAvatar(avatar) { - if (avatar.startsWith('data:')) { + if (typeof avatar === 'string' && avatar.startsWith('data:')) { return this.client.rest.methods.updateCurrentUser({ avatar }); } else { return this.client.resolver.resolveBuffer(avatar).then(data =>