pub struct CreateForumPost<'a> { /* private fields */ }
Expand description
Implementations§
Source§impl<'a> CreateForumPost<'a>
impl<'a> CreateForumPost<'a>
Sourcepub fn new(name: impl Into<String>, message: CreateMessage) -> Self
pub fn new(name: impl Into<String>, message: CreateMessage) -> Self
Creates a builder with the given name and message content, leaving all other fields empty.
Sourcepub fn name(self, name: impl Into<String>) -> Self
pub fn name(self, name: impl Into<String>) -> Self
The name of the forum post. Replaces the current value as set in Self::new
.
Note: Must be between 2 and 100 characters long.
Sourcepub fn message(self, message: CreateMessage) -> Self
pub fn message(self, message: CreateMessage) -> Self
The contents of the first message in the forum post.
See CreateMessage
for restrictions around message size.
Sourcepub fn auto_archive_duration(self, duration: AutoArchiveDuration) -> Self
pub fn auto_archive_duration(self, duration: AutoArchiveDuration) -> Self
Duration in minutes to automatically archive the forum post after recent activity.
Sourcepub fn rate_limit_per_user(self, seconds: u16) -> Self
pub fn rate_limit_per_user(self, seconds: u16) -> Self
How many seconds must a user wait before sending another message.
Bots, or users with the MANAGE_MESSAGES
and/or MANAGE_CHANNELS
permissions are
exempt from this restriction.
Note: Must be between 0 and 21600 seconds (360 minutes or 6 hours).
pub fn add_applied_tag(self, applied_tag: ForumTagId) -> Self
Sourcepub fn audit_log_reason(self, reason: &'a str) -> Self
pub fn audit_log_reason(self, reason: &'a str) -> Self
Sets the request’s audit log reason.
Trait Implementations§
Source§impl Builder for CreateForumPost<'_>
impl Builder for CreateForumPost<'_>
Source§fn execute<'life0, 'async_trait>(
self,
cache_http: impl 'async_trait + CacheHttp,
ctx: Self::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<Self::Built>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
self,
cache_http: impl 'async_trait + CacheHttp,
ctx: Self::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<Self::Built>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Creates a forum post in the given channel.
§Errors
Returns Error::Http
if the current user lacks permission, or if invalid data is given.
Source§type Context<'ctx> = ChannelId
type Context<'ctx> = ChannelId
type Built = GuildChannel
Source§impl<'a> Clone for CreateForumPost<'a>
impl<'a> Clone for CreateForumPost<'a>
Source§fn clone(&self) -> CreateForumPost<'a>
fn clone(&self) -> CreateForumPost<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more