3. User Note

Credit: Discord S.C.U.M
This commit is contained in:
March 7th
2022-03-30 18:40:43 +07:00
parent c8598a36d5
commit 8c7dfd595c
2 changed files with 11 additions and 1 deletions

View File

@@ -92,7 +92,9 @@ class UserManager extends CachedManager {
const data = await this.client.api.users(id).get();
const userObject = this._add(data, cache);
if(!userObject.bot) await userObject.getProfile().catch(() => {});
await userObject.getProfile().catch(() => {});
const noteObject = await this.client.api.users['@me'].notes(id).get().catch(() => null);
userObject.note = noteObject?.note ?? null;
return userObject;
}