Struct twilight_model::channel::Channel
source · [−]pub struct Channel {Show 27 fields
pub application_id: Option<Id<ApplicationMarker>>,
pub bitrate: Option<u32>,
pub default_auto_archive_duration: Option<AutoArchiveDuration>,
pub guild_id: Option<Id<GuildMarker>>,
pub icon: Option<ImageHash>,
pub id: Id<ChannelMarker>,
pub invitable: Option<bool>,
pub kind: ChannelType,
pub last_message_id: Option<Id<MessageMarker>>,
pub last_pin_timestamp: Option<Timestamp>,
pub member: Option<ThreadMember>,
pub member_count: Option<u8>,
pub message_count: Option<u32>,
pub name: Option<String>,
pub newly_created: Option<bool>,
pub nsfw: Option<bool>,
pub owner_id: Option<Id<UserMarker>>,
pub parent_id: Option<Id<ChannelMarker>>,
pub permission_overwrites: Option<Vec<PermissionOverwrite>>,
pub position: Option<i32>,
pub rate_limit_per_user: Option<u16>,
pub recipients: Option<Vec<User>>,
pub rtc_region: Option<String>,
pub thread_metadata: Option<ThreadMetadata>,
pub topic: Option<String>,
pub user_limit: Option<u32>,
pub video_quality_mode: Option<VideoQualityMode>,
}Expand description
Channel to send messages in, call with other users, organize groups, and more.
The Channel type is one overarching type for all types of channels: there
is no distinction between audio channels, textual channels, guild channels,
groups, threads, and so on. The type of channel can be determined by
checking Channel::kind, which can be used to determine what fields you
might expect to be present.
For Discord’s documentation on channels, refer to Discord Docs/Channel.
Fields
application_id: Option<Id<ApplicationMarker>>ID of the application that created the channel.
bitrate: Option<u32>Bitrate (in bits) setting of audio channels.
default_auto_archive_duration: Option<AutoArchiveDuration>Default duration without messages before the channel’s threads automatically archive.
Automatic archive durations are not locked behind the guild’s boost level.
guild_id: Option<Id<GuildMarker>>ID of the guild the channel is in.
icon: Option<ImageHash>Hash of the channel’s icon.
id: Id<ChannelMarker>ID of the channel.
invitable: Option<bool>Whether users can be invited.
kind: ChannelTypeType of the channel.
This can be used to determine what fields might be available.
last_message_id: Option<Id<MessageMarker>>ID of the last message sent in the channel.
last_pin_timestamp: Option<Timestamp>ID of the last message pinned in the channel.
member: Option<ThreadMember>Member that created the channel.
member_count: Option<u8>Number of members in the channel.
At most a value of 50 is provided although the real number may be higher.
message_count: Option<u32>Number of messages in the channel.
name: Option<String>Name of the channel.
newly_created: Option<bool>Whether a thread was newly created.
nsfw: Option<bool>Whether the channel has been configured to be NSFW.
owner_id: Option<Id<UserMarker>>ID of the creator of the channel.
parent_id: Option<Id<ChannelMarker>>ID of the parent channel.
For guild channels this is the ID of the parent category channel.
For threads this is the ID of the channel the thread was created in.
permission_overwrites: Option<Vec<PermissionOverwrite>>Explicit permission overwrites for members and roles.
position: Option<i32>Sorting position of the channel.
rate_limit_per_user: Option<u16>Amount of seconds a user has to wait before sending another message.
recipients: Option<Vec<User>>Recipients of the channel.
rtc_region: Option<String>ID of the voice region for the channel.
Defaults to automatic for applicable channels.
thread_metadata: Option<ThreadMetadata>Metadata about a thread.
topic: Option<String>Topic of the channel.
user_limit: Option<u32>Number of users that may be in the channel.
Zero refers to no limit.
video_quality_mode: Option<VideoQualityMode>Camera video quality mode of the channel.
Defaults to VideoQualityMode::Auto for applicable channels.