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
idulongThe guild ID to search for.
guildDiscordGuildThe guild, if found.
withCountsbool?Whether to include approximate presence and member counts in the returned guild.
fetchboolWhether to ignore the cache. Defaults to true.
Returns
- bool
True if the guild was found, otherwise false.