aboutsummaryrefslogtreecommitdiff
path: root/src/arguments/globalUser.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/arguments/globalUser.ts')
-rw-r--r--src/arguments/globalUser.ts4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/arguments/globalUser.ts b/src/arguments/globalUser.ts
index 69d3e89..08350d2 100644
--- a/src/arguments/globalUser.ts
+++ b/src/arguments/globalUser.ts
@@ -2,7 +2,5 @@ import { type BushArgumentTypeCaster, type BushUser } from '#lib';
// resolve non-cached users
export const globalUser: BushArgumentTypeCaster<Promise<BushUser | null>> = async (_, phrase) => {
- return client.users.cache.has(phrase)
- ? client.users.cache.get(`${phrase}`) ?? null
- : await client.users.fetch(`${phrase}`).catch(() => null);
+ return client.users.resolve(phrase) ?? (await client.users.fetch(`${phrase}`).catch(() => null));
};