Skip to main content

permission_channel

Function permission_channel 

Source
async fn permission_channel(
    channel: &GuildChannel,
    ctx: &Context,
) -> Result<GuildChannel, PreviewError>
Expand description

Resolves the channel that carries the properties a thread inherits — its permission overwrites and its NSFW flag.

Threads hold neither of their own, so for any thread the parent channel is fetched and returned. Non-thread channels are returned unchanged. A thread without a parent_id is treated as an error.