diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-19 18:52:41 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-19 18:52:41 -0500 |
commit | e78beed6c7e094ef48aad5d18da01b2bbed4536c (patch) | |
tree | 32676793af5f7bdc39d438ff284fa5b959274e96 /src/arguments/globalUser.ts | |
parent | a3103b629250de3fb97a40a4f9ff7e7ba28f4d16 (diff) | |
download | tanzanite-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.ts | 4 |
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)); }; |