#[non_exhaustive]pub struct StartThreadWithoutMessage {
pub name: CompactString,
pub auto_archive_duration: Option<AutoArchiveDuration>,
pub kind: ChannelType,
pub invitable: Option<bool>,
pub rate_limit_per_user: Option<u16>,
}Expand description
The body of Start Thread without Message.
The thread’s type is always sent (Discord’s default, a private thread, is going away).
discord.js counterpart: GuildTextThreadCreateOptions.
§Examples
use djs_model::{channel::ChannelType, rest::StartThreadWithoutMessage};
let body = StartThreadWithoutMessage::new("Support", ChannelType::PrivateThread);
assert_eq!(serde_json::to_string(&body).unwrap(), r#"{"name":"Support","type":12}"#);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.name: CompactStringThe name (1-100 characters).
auto_archive_duration: Option<AutoArchiveDuration>The inactivity after which the thread is archived.
kind: ChannelTypeThe type of thread: public, private or (in announcement channels) announcement.
invitable: Option<bool>Whether non-moderators can add other non-moderators (private threads only).
rate_limit_per_user: Option<u16>Slowmode: seconds a member must wait between messages (0-21600).
Implementations§
Source§impl StartThreadWithoutMessage
impl StartThreadWithoutMessage
Sourcepub fn new(name: impl Into<CompactString>, kind: ChannelType) -> Self
pub fn new(name: impl Into<CompactString>, kind: ChannelType) -> Self
A thread of type kind named name.
discord.js counterpart: GuildTextThreadCreateOptions.
Trait Implementations§
Source§impl Clone for StartThreadWithoutMessage
impl Clone for StartThreadWithoutMessage
Source§impl Debug for StartThreadWithoutMessage
impl Debug for StartThreadWithoutMessage
impl Eq for StartThreadWithoutMessage
Source§impl Hash for StartThreadWithoutMessage
impl Hash for StartThreadWithoutMessage
impl StructuralPartialEq for StartThreadWithoutMessage
Auto Trait Implementations§
impl Freeze for StartThreadWithoutMessage
impl RefUnwindSafe for StartThreadWithoutMessage
impl Send for StartThreadWithoutMessage
impl Sync for StartThreadWithoutMessage
impl Unpin for StartThreadWithoutMessage
impl UnsafeUnpin for StartThreadWithoutMessage
impl UnwindSafe for StartThreadWithoutMessage
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