diff --git a/src/managers/UserManager.js b/src/managers/UserManager.js index 357a118..c84be8c 100644 --- a/src/managers/UserManager.js +++ b/src/managers/UserManager.js @@ -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; } diff --git a/src/structures/User.js b/src/structures/User.js index ced6bf3..b3717a1 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -39,6 +39,7 @@ class User extends Base { this.premiumGuildSince = null; this.mutualGuilds = new Collection(); this.applications = null; + this.note = null; this._patch(data); } @@ -422,6 +423,13 @@ class User extends Base { return json; } + async setNote(note = null) { + await this.client.api.users['@me'] + .notes(id) + .put({ data: { note } }); + return this.note = note; + } + // These are here only for documentation purposes - they are implemented by TextBasedChannel /* eslint-disable no-empty-function */ send() {}