Table of Contents

Method GetWebhookAsync

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

GetWebhookAsync(ulong, CancellationToken)

Gets a webhook.

public Task<DiscordWebhook> GetWebhookAsync(ulong id, CancellationToken cancellationToken = default)

Parameters

id ulong

The target webhook id.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordWebhook>

The requested webhook.

Exceptions

NotFoundException

Thrown when the webhook does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.