From 463d5b1e4179246c306ac2d0f89dc7bf353245d1 Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 25 Mar 2022 18:58:17 +0700 Subject: [PATCH] Fix UserManager.js:95 if(!this.user.bot) await userObject.getProfile().catch(() => {}); ^ TypeError: Cannot read properties of undefined (reading 'bot') at UserManager.fetch (UserManager.js:95:19) --- src/managers/UserManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/managers/UserManager.js b/src/managers/UserManager.js index 90d82af..357a118 100644 --- a/src/managers/UserManager.js +++ b/src/managers/UserManager.js @@ -92,7 +92,7 @@ class UserManager extends CachedManager { const data = await this.client.api.users(id).get(); const userObject = this._add(data, cache); - if(!this.user.bot) await userObject.getProfile().catch(() => {}); + if(!userObject.bot) await userObject.getProfile().catch(() => {}); return userObject; }