Table of Contents

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 ulong

Id of the user.

user DiscordUser

The user, if found.

fetch bool

Whether to ignore the cache. Defaults to true.

Returns

bool

True if found, otherwise false.