Method DeleteMessageAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
DeleteMessageAsync(ulong, CancellationToken)
Deletes a message that was created by the webhook.
public Task DeleteMessageAsync(ulong messageId, CancellationToken cancellationToken = default)
Parameters
messageIdulongThe id of the message to delete
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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.
DeleteMessageAsync(ulong, ulong?, CancellationToken)
Deletes a message that was created by the webhook.
public Task DeleteMessageAsync(ulong messageId, ulong? threadId = null, CancellationToken cancellationToken = default)
Parameters
messageIdulongThe id of the message to delete
threadIdulong?Target thread id (Optional). Defaults to null.
cancellationTokenCancellationTokenA token to cancel the request.
Returns
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.