pub struct Channel {
Show 34 fields pub application_id: Option<Id<ApplicationMarker>>, pub applied_tags: Option<Vec<Id<TagMarker>>>, pub available_tags: Option<Vec<ForumTag>>, pub bitrate: Option<u32>, pub default_auto_archive_duration: Option<AutoArchiveDuration>, pub default_forum_layout: Option<ForumLayout>, pub default_reaction_emoji: Option<DefaultReaction>, pub default_sort_order: Option<ForumSortOrder>, pub default_thread_rate_limit_per_user: Option<u16>, pub flags: Option<ChannelFlags>, 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<GenericMarker>>, 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.

§applied_tags: Option<Vec<Id<TagMarker>>>§available_tags: Option<Vec<ForumTag>>§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.

§default_forum_layout: Option<ForumLayout>

Default forum layout view used to display posts in forum channels.

§default_reaction_emoji: Option<DefaultReaction>§default_sort_order: Option<ForumSortOrder>

Default sort order used to display posts in forum channels.

§default_thread_rate_limit_per_user: Option<u16>§flags: Option<ChannelFlags>

Flags of the channel.

§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: ChannelType

Type of the channel.

This can be used to determine what fields might be available.

§last_message_id: Option<Id<GenericMarker>>

For text channels, this is the ID of the last message sent in the channel.

For forum channels, this is the ID of the last created thread in the forum.

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

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more