Table of Contents

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 ulong

The guild ID to search for.

guild DiscordGuild

The guild, if found.

withCounts bool?

Whether to include approximate presence and member counts in the returned guild.

fetch bool

Whether to ignore the cache. Defaults to true.

Returns

bool

True if the guild was found, otherwise false.