mirror of
https://github.com/discordjs/discord.js.git
synced 2026-06-04 10:00:08 +00:00
fix avatars being set to undefined
This commit is contained in:
@@ -36,11 +36,13 @@ class User {
|
||||
*/
|
||||
this.discriminator = data.discriminator;
|
||||
|
||||
/**
|
||||
* The ID of the user's avatar
|
||||
* @type {string}
|
||||
*/
|
||||
this.avatar = data.avatar;
|
||||
if (typeof data.avatar !== 'undefined') {
|
||||
/**
|
||||
* The ID of the user's avatar
|
||||
* @type {string}
|
||||
*/
|
||||
this.avatar = data.avatar;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether or not the User is a Bot.
|
||||
|
||||
Reference in New Issue
Block a user