#[non_exhaustive]pub struct TextChannel {Show 14 fields
pub id: ChannelId,
pub guild_id: Option<GuildId>,
pub name: CompactString,
pub position: i32,
pub permission_overwrites: Vec<Overwrite>,
pub parent_id: Option<ChannelId>,
pub nsfw: bool,
pub topic: Option<CompactString>,
pub last_message_id: Option<MessageId>,
pub rate_limit_per_user: u16,
pub last_pin_timestamp: Option<Timestamp>,
pub default_auto_archive_duration: Option<AutoArchiveDuration>,
pub default_thread_rate_limit_per_user: Option<u16>,
pub flags: ChannelFlags,
}Expand description
A text or announcement channel in a guild.
discord.js counterpart: TextChannel / NewsChannel.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: ChannelIdThe channel’s ID.
guild_id: Option<GuildId>The guild; None inside GUILD_CREATE.
name: CompactStringThe channel’s name (1-100 characters).
position: i32The sorting position; channels with equal positions are ordered by ID.
permission_overwrites: Vec<Overwrite>Explicit permissions for roles and members.
parent_id: Option<ChannelId>The parent category.
nsfw: boolWhether the channel is age-restricted.
topic: Option<CompactString>The channel topic (0-1024 characters).
last_message_id: Option<MessageId>The last message sent (it may not exist any more).
rate_limit_per_user: u16Slowmode: seconds a user must wait between messages (0-21600). Bots and members with
MANAGE_MESSAGES/MANAGE_CHANNELS are exempt.
last_pin_timestamp: Option<Timestamp>When the last message was pinned.
default_auto_archive_duration: Option<AutoArchiveDuration>The auto-archive duration copied onto new threads.
default_thread_rate_limit_per_user: Option<u16>The slowmode copied onto new threads.
flags: ChannelFlagsThe channel’s flags.
Trait Implementations§
Source§impl Clone for TextChannel
impl Clone for TextChannel
Source§impl Debug for TextChannel
impl Debug for TextChannel
impl Eq for TextChannel
Source§impl PartialEq for TextChannel
impl PartialEq for TextChannel
Source§impl Serialize for TextChannel
impl Serialize for TextChannel
impl StructuralPartialEq for TextChannel
Auto Trait Implementations§
impl Freeze for TextChannel
impl RefUnwindSafe for TextChannel
impl Send for TextChannel
impl Sync for TextChannel
impl Unpin for TextChannel
impl UnsafeUnpin for TextChannel
impl UnwindSafe for TextChannel
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
Mutably borrows from an owned value. Read more