Skip to main content

Module discord

Module discord 

Source
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§

DiscordExpander
Discord message link expander.
MessageLinkIDs
Parsed IDs from a Discord message link.
Preview
A preview containing the message and its channel.

Enums§

PreviewError
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_channel could also view channel.
has_member_view_deny 🔒
Returns true if any per-member overwrite denies VIEW_CHANNEL.
is_thread 🔒
Returns true for thread channel types.
permission_channel 🔒
Resolves the channel whose permission overwrites determine visibility.
requires_visibility_check 🔒
Returns true when the link’s visibility must be validated against the request’s source channel.
viewing_roles 🔒
Computes the set of roles that can effectively VIEW_CHANNEL a channel.