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
clientBaseDiscordClientThe discord client used to fetch the message.
jumpLinkstringThe 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
jumpLinkorclientis null or empty.- ArgumentException
Thrown when
jumpLinkis 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.