Method GetGuildAsync
- Namespace
- DSharpPlus
- Assembly
- DSharpPlus.dll
GetGuildAsync(ulong, bool?)
Gets a guild.
Setting withCounts
to true will make a REST request.
public Task<DiscordGuild> GetGuildAsync(ulong id, bool? withCounts = null)
Parameters
id
ulongThe guild ID to search for.
withCounts
bool?Whether to include approximate presence and member counts in the returned guild.
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.