Expand description
Link expansion module.
This module provides common types for expanding various types of links (Discord message links, GitHub permalinks, etc.) into rich preview content.
Modules§
Structs§
- Expand
Context - Shared inputs for expanding the links of one message.
Enums§
- Expand
Error - Errors that can occur during link expansion.
- Expanded
Content - Expanded content produced by a link expander.
Constants§
- MAX_
LINKS_ 🔒PER_ MESSAGE - Maximum number of links expanded per message.
Statics§
- EXPANDERS
- All registered link expanders, in the order their results appear in a reply.
Traits§
- Link
Expander - A link expander: parses its own link type out of a message and expands
each link into
ExpandedContent.
Functions§
- parse_
links 🔒 - Extracts links matching
regexfromtext, applying the shared link policy: URLs wrapped in angle brackets (e.g.<https://...>) are skipped, duplicate URLs are ignored, and at mostMAX_LINKS_PER_MESSAGElinks are returned.