Table of Contents

Method GetGuildPreviewAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

GetGuildPreviewAsync(ulong, CancellationToken)

Gets a guild preview.

public Task<DiscordGuildPreview> GetGuildPreviewAsync(ulong id, CancellationToken cancellationToken = default)

Parameters

id ulong

The guild ID.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordGuildPreview>

A preview of 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.