Fixed User#fetchProfile, UserProfile#premium and added #flags (#1629)

* Fixed User#fetchProfile, UserProfile#premium and added #flags

* made UserProfile#flags a getter and stored the raw bitfield under UserProfile#_flags

* lowercased Flags
This commit is contained in:
SpaceEEC
2017-07-04 00:28:53 +02:00
committed by Crawl
parent 3da95d7e68
commit c42e53d70d
3 changed files with 36 additions and 2 deletions

View File

@@ -224,7 +224,7 @@ class User {
* @returns {Promise<UserProfile>}
*/
fetchProfile() {
return this.client.api.users[this.id].profile.get().then(data => new UserProfile(data));
return this.client.api.users[this.id].profile.get().then(data => new UserProfile(this, data));
}
/**