Method TryGetGuild
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
TryGetGuild(ulong, out DiscordGuild?, bool?, bool)
Tries to get a guild.
Setting withCounts
to true will make a REST request.
public bool TryGetGuild(ulong id, out DiscordGuild? guild, bool? withCounts = null, bool fetch = true)
Parameters
id
ulongThe guild ID to search for.
guild
DiscordGuildThe guild, if found.
withCounts
bool?Whether to include approximate presence and member counts in the returned guild.
fetch
boolWhether to ignore the cache. Defaults to true.
Returns
- bool
True if the guild was found, otherwise false.