Method GetWebhookWithTokenAsync
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
GetWebhookWithTokenAsync(ulong, string, CancellationToken)
Gets a webhook with a token.
public Task<DiscordWebhook> GetWebhookWithTokenAsync(ulong id, string token, CancellationToken cancellationToken = default)
Parameters
idulongThe target webhook id.
tokenstringThe target webhook token.
cancellationTokenCancellationTokenA 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.