pub struct CreateInteractionResponseFollowup { /* private fields */ }
Expand description
Implementations§
Source§impl CreateInteractionResponseFollowup
impl CreateInteractionResponseFollowup
Sourcepub fn new() -> Self
pub fn new() -> Self
Equivalent to Self::default
.
Sourcepub fn content(self, content: impl Into<String>) -> Self
pub fn content(self, content: impl Into<String>) -> Self
Set the content of the message.
Note: Message contents must be under 2000 unicode code points.
Sourcepub fn tts(self, tts: bool) -> Self
pub fn tts(self, tts: bool) -> Self
Set whether the message is text-to-speech.
Think carefully before setting this to true
.
Defaults to false
.
Sourcepub fn add_file(self, file: CreateAttachment) -> Self
pub fn add_file(self, file: CreateAttachment) -> Self
Appends a file to the message.
Sourcepub fn add_files(
self,
files: impl IntoIterator<Item = CreateAttachment>,
) -> Self
pub fn add_files( self, files: impl IntoIterator<Item = CreateAttachment>, ) -> Self
Appends a list of files to the message.
Sourcepub fn files(self, files: impl IntoIterator<Item = CreateAttachment>) -> Self
pub fn files(self, files: impl IntoIterator<Item = CreateAttachment>) -> Self
Sets a list of files to include in the message.
Calling this multiple times will overwrite the file list. To append files, call
Self::add_file
or Self::add_files
instead.
Sourcepub fn add_embed(self, embed: CreateEmbed) -> Self
pub fn add_embed(self, embed: CreateEmbed) -> Self
Adds an embed to the message.
Sourcepub fn add_embeds(self, embeds: Vec<CreateEmbed>) -> Self
pub fn add_embeds(self, embeds: Vec<CreateEmbed>) -> Self
Adds multiple embeds to the message.
Sourcepub fn embed(self, embed: CreateEmbed) -> Self
pub fn embed(self, embed: CreateEmbed) -> Self
Sets a single embed to include in the message.
Calling this will overwrite the embed list. To append embeds, call Self::add_embed
instead.
Sourcepub fn embeds(self, embeds: Vec<CreateEmbed>) -> Self
pub fn embeds(self, embeds: Vec<CreateEmbed>) -> Self
Sets a list of embeds to include in the message.
Calling this multiple times will overwrite the embed list. To append embeds, call
Self::add_embeds
instead.
Sourcepub fn allowed_mentions(self, allowed_mentions: CreateAllowedMentions) -> Self
pub fn allowed_mentions(self, allowed_mentions: CreateAllowedMentions) -> Self
Set the allowed mentions for the message.
Sourcepub fn flags(self, flags: MessageFlags) -> Self
pub fn flags(self, flags: MessageFlags) -> Self
Sets the flags for the response.
Sourcepub fn poll(self, poll: CreatePoll<Ready>) -> Self
pub fn poll(self, poll: CreatePoll<Ready>) -> Self
Adds a poll to the message. Only one poll can be added per message.
See CreatePoll
for more information on creating and configuring a poll.
Sourcepub fn components(self, components: Vec<CreateActionRow>) -> Self
pub fn components(self, components: Vec<CreateActionRow>) -> Self
Sets the components of this message.
Adds a clickable button to this message.
Convenience method that wraps Self::components
. Arranges buttons in action rows
automatically.
Adds an interactive select menu to this message.
Convenience method that wraps Self::components
.
Trait Implementations§
Source§impl Builder for CreateInteractionResponseFollowup
impl Builder for CreateInteractionResponseFollowup
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 or edits a followup response to the response sent. If a MessageId
is provided,
then the corresponding message will be edited. Otherwise, a new message will be created.
Note: Message contents must be under 2000 unicode code points, and embeds must be under 6000 code points.
§Errors
Returns Error::Model
if the content is too long. May also return Error::Http
if the
API returns an error, or Error::Json
if there is an error in deserializing the
response.
Source§type Context<'ctx> = (Option<MessageId>, &'ctx str)
type Context<'ctx> = (Option<MessageId>, &'ctx str)
type Built = Message
Source§impl Clone for CreateInteractionResponseFollowup
impl Clone for CreateInteractionResponseFollowup
Source§fn clone(&self) -> CreateInteractionResponseFollowup
fn clone(&self) -> CreateInteractionResponseFollowup
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more