Skip to main content

check_visibility

Function check_visibility 

Source
async fn check_visibility(
    channel: &GuildChannel,
    source_channel: &GuildChannel,
    guild_id: GuildId,
    ctx: &Context,
) -> Result<(), PreviewError>
Expand description

Validates that everyone who can view source_channel could also view channel.

The expanded content is posted as a single message that all members of source_channel can read, so the linked channel must be at least as visible as the source channel to avoid leaking restricted content.