Table of Contents

Method GetUserAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

GetUserAsync(ulong, bool)

Gets a user.

public Task<DiscordUser> GetUserAsync(ulong userId, bool fetch = false)

Parameters

userId ulong

Id of the user

fetch bool

Whether to ignore the cache. Defaults to false.

Returns

Task<DiscordUser>

The requested user.

Exceptions

NotFoundException

Thrown when the user does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.