pub struct MessageLinkIDs {
pub guild_id: GuildId,
pub channel_id: ChannelId,
pub message_id: MessageId,
}Expand description
Parsed IDs from a Discord message link.
Fields§
§guild_id: GuildIdThe guild ID from the message link.
channel_id: ChannelIdThe channel ID from the message link.
message_id: MessageIdThe message ID from the message link.
Implementations§
Source§impl MessageLinkIDs
impl MessageLinkIDs
Sourcepub fn parse_all(text: &str) -> Vec<MessageLinkIDs>
pub fn parse_all(text: &str) -> Vec<MessageLinkIDs>
Parses all Discord message links from the given text.
Returns a Vec<MessageLinkIDs> containing all valid message links found.
Note: Duplicate URLs are ignored, and a maximum of 3 links are returned.
Sourcepub async fn fetch(&self, ctx: &Context) -> Result<ExpandedContent, ExpandError>
pub async fn fetch(&self, ctx: &Context) -> Result<ExpandedContent, ExpandError>
Fetches the linked message and returns an embed preview.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MessageLinkIDs
impl RefUnwindSafe for MessageLinkIDs
impl Send for MessageLinkIDs
impl Sync for MessageLinkIDs
impl Unpin for MessageLinkIDs
impl UnsafeUnpin for MessageLinkIDs
impl UnwindSafe for MessageLinkIDs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more