Method GetMessageAsync
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
GetMessageAsync(ulong, CancellationToken)
Gets a previously-sent webhook message.
public Task<DiscordMessage> GetMessageAsync(ulong messageId, CancellationToken cancellationToken = default)
Parameters
messageIdulongThe ID of the message to retrieve.
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.
GetMessageAsync(ulong, ulong, CancellationToken)
Gets a previously-sent webhook message.
public Task<DiscordMessage> GetMessageAsync(ulong messageId, ulong threadId, CancellationToken cancellationToken = default)
Parameters
messageIdulongThe ID of the message to retrieve.
threadIdulongThe ID of the thread containing the message.
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.