pub struct CreateInteractionResponseMessage { /* private fields */ }
Expand description
Implementations§
Source§impl CreateInteractionResponseMessage
impl CreateInteractionResponseMessage
Sourcepub fn new() -> Self
pub fn new() -> Self
Equivalent to Self::default
.
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 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 add_embed(self, embed: CreateEmbed) -> Self
pub fn add_embed(self, embed: CreateEmbed) -> Self
Adds an embed to the message.
Calling this while editing a message will overwrite existing embeds.
Sourcepub fn add_embeds(self, embeds: Vec<CreateEmbed>) -> Self
pub fn add_embeds(self, embeds: Vec<CreateEmbed>) -> Self
Adds multiple embeds for the message.
Calling this while editing a message will overwrite existing embeds.
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 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: InteractionResponseFlags) -> Self
pub fn flags(self, flags: InteractionResponseFlags) -> Self
Sets the flags for the message.
Sourcepub fn components(self, components: Vec<CreateActionRow>) -> Self
pub fn components(self, components: Vec<CreateActionRow>) -> Self
Sets the components of this message.
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.
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 Clone for CreateInteractionResponseMessage
impl Clone for CreateInteractionResponseMessage
Source§fn clone(&self) -> CreateInteractionResponseMessage
fn clone(&self) -> CreateInteractionResponseMessage
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more