Expand description
Discord message link expansion.
This module provides functionality for parsing Discord message links and generating embed previews of the linked messages.
Migrated from preview.rs with support for multiple link expansion.
Structs§
- Discord
Expander - Discord message link expander.
- Message
LinkI Ds - Parsed IDs from a Discord message link.
- Preview
- A preview containing the message and its channel.
Enums§
- Preview
Error - Errors that can occur when generating a Discord message preview.
Statics§
- MESSAGE_
LINK_ REGEX - Regex pattern for matching Discord message links.
Functions§
- check_
visibility 🔒 - Validates that everyone who can view
source_channelcould also viewchannel. - has_
member_ 🔒view_ deny - Returns
trueif any per-member overwrite deniesVIEW_CHANNEL. - is_
thread 🔒 - Returns
truefor thread channel types. - permission_
channel 🔒 - Resolves the channel whose permission overwrites determine visibility.
- requires_
visibility_ 🔒check - Returns
truewhen the link’s visibility must be validated against the request’s source channel. - viewing_
roles 🔒 - Computes the set of roles that can effectively
VIEW_CHANNELa channel.