Table of Contents

Method FromJumpLinkAsync

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

FromJumpLinkAsync(BaseDiscordClient, string)

Retrieves a DiscordMessage from its jump link.

public static Task<DiscordMessage> FromJumpLinkAsync(BaseDiscordClient client, string jumpLink)

Parameters

client BaseDiscordClient

The discord client used to fetch the message.

jumpLink string

The jump link in the form https://discord.com/channels/{guildId}/{channelId}/{messageId}.

Returns

Task<DiscordMessage>

The message referenced by the jump link.

Exceptions

ArgumentNullException

Thrown when jumpLink or client is null or empty.

ArgumentException

Thrown when jumpLink is not a valid Discord message link.

UnauthorizedException

Thrown when the client does not have access to the message.

NotFoundException

Thrown when the channel or message does not exist.

BadRequestException

Thrown when an invalid parameter was provided.

ServerErrorException

Thrown when Discord is unable to process the request.