Table of Contents

Method GetGuildAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

GetGuildAsync(ulong, bool?, bool)

Gets a guild.

Setting withCounts to true will make a REST request.

public Task<DiscordGuild> GetGuildAsync(ulong id, bool? withCounts = null, bool fetch = false)

Parameters

id ulong

The guild ID to search for.

withCounts bool?

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

fetch bool

Whether to ignore the cache. Defaults to false.

Returns

Task<DiscordGuild>

The requested Guild.

Exceptions

NotFoundException

Thrown when the guild does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.