aboutsummaryrefslogtreecommitdiff
path: root/src/arguments/globalUser.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-02-19 18:52:41 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-02-19 18:52:41 -0500
commite78beed6c7e094ef48aad5d18da01b2bbed4536c (patch)
tree32676793af5f7bdc39d438ff284fa5b959274e96 /src/arguments/globalUser.ts
parenta3103b629250de3fb97a40a4f9ff7e7ba28f4d16 (diff)
downloadtanzanite-e78beed6c7e094ef48aad5d18da01b2bbed4536c.tar.gz
tanzanite-e78beed6c7e094ef48aad5d18da01b2bbed4536c.tar.bz2
tanzanite-e78beed6c7e094ef48aad5d18da01b2bbed4536c.zip
fix: a ton of shit
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));
};