Method TryGetUser
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
TryGetUser(ulong, out DiscordUser?, bool)
Tries to get a user.
public bool TryGetUser(ulong userId, out DiscordUser? user, bool fetch = true)
Parameters
userId
ulongId of the user.
user
DiscordUserThe user, if found.
fetch
boolWhether to ignore the cache. Defaults to true.
Returns
- bool
True if found, otherwise false.