pub struct Channel {Show 35 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 managed: Option<bool>,
pub member: Option<ThreadMember>,
pub member_count: Option<i8>,
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.
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.
managed: Option<bool>
Whether the channel is managed by an application via the gdm.join
oauth scope.
This is only applicable to group channels.
member: Option<ThreadMember>
Member that created the channel.
member_count: Option<i8>
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§
source§impl<'de> Deserialize<'de> for Channel
impl<'de> Deserialize<'de> for Channel
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for Channel
impl StructuralPartialEq for Channel
Auto Trait Implementations§
impl Freeze for Channel
impl RefUnwindSafe for Channel
impl Send for Channel
impl Sync for Channel
impl Unpin for Channel
impl UnwindSafe for Channel
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)