Skip to main content

message_link

Function message_link 

Source
pub const fn message_link(channel: ChannelId, message: MessageId) -> MessageLink
Expand description

Links to the message message of the channel channel, a DM unless the guild is set (D-213).

discord.js counterpart: messageLink.

ยงExamples

use djs_formatters::message_link;
use djs_model::id::{ChannelId, GuildId, MessageId};

let link = message_link(ChannelId::new(2), MessageId::new(3)).guild(GuildId::new(1));
assert_eq!(link.to_string(), "https://discord.com/channels/1/2/3");