Table of Contents

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

messageId ulong

The ID of the message to retrieve.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordMessage>

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

messageId ulong

The ID of the message to retrieve.

threadId ulong

The ID of the thread containing the message.

cancellationToken CancellationToken

A token to cancel the request.

Returns

Task<DiscordMessage>

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.