fix avatars being set to undefined

This commit is contained in:
Amish Shah
2016-09-11 11:50:10 +01:00
parent 272555d9ae
commit 5b8f882a0f
2 changed files with 7 additions and 7 deletions

View File

@@ -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.