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,
) -> CreateForumPost<'a>
pub fn new( name: impl Into<String>, message: CreateMessage, ) -> CreateForumPost<'a>
Creates a builder with the given name and message content, leaving all other fields empty.
Sourcepub fn name(self, name: impl Into<String>) -> CreateForumPost<'a>
pub fn name(self, name: impl Into<String>) -> CreateForumPost<'a>
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) -> CreateForumPost<'a>
pub fn message(self, message: CreateMessage) -> CreateForumPost<'a>
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,
) -> CreateForumPost<'a>
pub fn auto_archive_duration( self, duration: AutoArchiveDuration, ) -> CreateForumPost<'a>
Duration in minutes to automatically archive the forum post after recent activity.
Sourcepub fn rate_limit_per_user(self, seconds: u16) -> CreateForumPost<'a>
pub fn rate_limit_per_user(self, seconds: u16) -> CreateForumPost<'a>
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) -> CreateForumPost<'a>
Sourcepub fn audit_log_reason(self, reason: &'a str) -> CreateForumPost<'a>
pub fn audit_log_reason(self, reason: &'a str) -> CreateForumPost<'a>
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 CacheHttp + 'async_trait,
ctx: <CreateForumPost<'_> as Builder>::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<<CreateForumPost<'_> as Builder>::Built, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CreateForumPost<'_>: 'async_trait,
fn execute<'life0, 'async_trait>(
self,
cache_http: impl CacheHttp + 'async_trait,
ctx: <CreateForumPost<'_> as Builder>::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<<CreateForumPost<'_> as Builder>::Built, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
CreateForumPost<'_>: '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