Method GetUserAsync
- Namespace
- DSharpPlus
- Assembly
- DSharpPlus.dll
GetUserAsync(ulong, bool)
Gets a user
public Task<DiscordUser> GetUserAsync(ulong userId, bool updateCache = false)
Parameters
userId
ulongID of the user
updateCache
boolWhether to always make a REST request and update cache. Passing true will update the user, updating stale properties such as BannerHash.
Returns
- Task<DiscordUser>
Exceptions
- BadRequestException
Thrown when an invalid parameter was provided.
- ServerErrorException
Thrown when Discord is unable to process the request.