# fetchUser

`function` in `seedcord` · v0.14.0

<https://docs.seedcord.org/packages/seedcord/0.14.0/functions/fetch-user>

Fetches a Discord user by ID. Refuses when the user doesn't exist, with `options.throwAs` or the default.

```ts
async fetchUser(
    client: Client,
    userId: string,
    options?: FetchUserOptions
): Promise<User>
```

Fetches a Discord user by ID. Refuses when the user doesn't exist, with `options.throwAs` or the default.

Parameters.

- `client` `Client` — The Discord client instance
- `userId` `string` — The Discord user ID
- `options?` `FetchUserOptions` — Optional overrides, including the [`throwAs`](/packages/seedcord/0.14.0/interfaces/fetch-user-options#throw-as) notice

Returns `Promise<User>`.
