Fix #121 and smail update

This commit is contained in:
March 7th
2022-06-04 13:26:53 +07:00
parent e30b8339e7
commit e3d842db53
8 changed files with 103 additions and 1504 deletions

View File

@@ -403,15 +403,6 @@ class Client extends BaseClient {
});
return new Invite(this, data);
}
// TODO: Remove this in the next major version
reddemNitro(code) {
process.emitWarning(
'This function will no longer be available after a major update. Using .redeemNitro()\nSee here: https://github.com/aiko-chan-ai/discord.js-selfbot-v13/pull/59',
'DeprecationWarning',
);
return this.redeemNitro(code);
}
/**
* Get Nitro
* @param {string<NitroCode>} nitro Nitro Code

View File

@@ -162,6 +162,22 @@ class User extends Base {
}
}
/**
* The presence of this user [v12 Patch]
* @type {Presence}
* @readonly
*/
get presence() {
let res;
for (const guild of this.client.guilds.cache.map(g => g.presences)) {
if (guild.resolve(this.id)) {
res = guild.resolve(this.id);
break;
}
}
return res;
}
/**
* Check relationship status
* @type {Relationship}