Merge pull request #210 from NekoCyan/main

fix(nitroType): undefined.
This commit is contained in:
Cinnamon 2022-07-17 10:06:09 +07:00 committed by GitHub
commit 25e22b7daa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,13 +36,14 @@ class ClientUser extends User {
if ('token' in data) this.client.token = data.token;
/**
* Nitro state of the user
* @type {?boolean}
*/
this.nitro = Boolean(data.premium || false);
// Add (Selfbot)
if ('premium_type' in data) {
/**
* Nitro type of the client user.
* @type {?number}
*/
this.nitroType = data.premium_type;
}
if ('purchased_flags' in data) {
/**
* Purchased state of the client user.