namespace Discord { /// /// Provides extension methods for . /// public static class MessageExtensions { /// /// Gets a URL that jumps to the message. /// /// The message to jump to. /// /// A string that contains a URL for jumping to the message in chat. /// public static string GetJumpUrl(this IMessage msg) { var channel = msg.Channel; return $"https://discordapp.com/channels/{(channel is IDMChannel ? "@me" : $"{(channel as ITextChannel).GuildId}")}/{channel.Id}/{msg.Id}"; } } }