diff options
Diffstat (limited to 'lib/arguments/globalUser.ts')
-rw-r--r-- | lib/arguments/globalUser.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arguments/globalUser.ts b/lib/arguments/globalUser.ts index 4324aa9..4198e3c 100644 --- a/lib/arguments/globalUser.ts +++ b/lib/arguments/globalUser.ts @@ -1,7 +1,7 @@ -import type { BushArgumentTypeCaster } from '#lib'; +import type { BotArgumentTypeCaster } from '#lib'; import type { User } from 'discord.js'; // resolve non-cached users -export const globalUser: BushArgumentTypeCaster<Promise<User | null>> = async (message, phrase) => { +export const globalUser: BotArgumentTypeCaster<Promise<User | null>> = async (message, phrase) => { return message.client.users.resolve(phrase) ?? (await message.client.users.fetch(`${phrase}`).catch(() => null)); }; |