pub struct EditInteractionResponse(/* private fields */);
Expand description
Implementations§
Source§impl EditInteractionResponse
impl EditInteractionResponse
Sourcepub fn new() -> EditInteractionResponse
pub fn new() -> EditInteractionResponse
Equivalent to Self::default
.
Sourcepub fn content(self, content: impl Into<String>) -> EditInteractionResponse
pub fn content(self, content: impl Into<String>) -> EditInteractionResponse
Set the content of the message.
Note: Message contents must be under 2000 unicode code points.
Sourcepub fn add_embed(self, embed: CreateEmbed) -> EditInteractionResponse
pub fn add_embed(self, embed: CreateEmbed) -> EditInteractionResponse
Adds an embed for the message.
Embeds from the original message are reset when adding new embeds and must be re-added.
Sourcepub fn add_embeds(self, embeds: Vec<CreateEmbed>) -> EditInteractionResponse
pub fn add_embeds(self, embeds: Vec<CreateEmbed>) -> EditInteractionResponse
Adds multiple embeds to the message.
Embeds from the original message are reset when adding new embeds and must be re-added.
Sourcepub fn embed(self, embed: CreateEmbed) -> EditInteractionResponse
pub fn embed(self, embed: CreateEmbed) -> EditInteractionResponse
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>) -> EditInteractionResponse
pub fn embeds(self, embeds: Vec<CreateEmbed>) -> EditInteractionResponse
Sets the embeds for the message.
Note: You can only have up to 10 embeds per message.
Calling this will overwrite the embed list. To append embeds, call Self::add_embeds
instead.
Sourcepub fn allowed_mentions(
self,
allowed_mentions: CreateAllowedMentions,
) -> EditInteractionResponse
pub fn allowed_mentions( self, allowed_mentions: CreateAllowedMentions, ) -> EditInteractionResponse
Set the allowed mentions for the message.
Sourcepub fn components(
self,
components: Vec<CreateActionRow>,
) -> EditInteractionResponse
pub fn components( self, components: Vec<CreateActionRow>, ) -> EditInteractionResponse
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
.
Sourcepub fn attachments(
self,
attachments: EditAttachments,
) -> EditInteractionResponse
pub fn attachments( self, attachments: EditAttachments, ) -> EditInteractionResponse
Sets attachments, see EditAttachments
for more details.
Sourcepub fn new_attachment(
self,
attachment: CreateAttachment,
) -> EditInteractionResponse
pub fn new_attachment( self, attachment: CreateAttachment, ) -> EditInteractionResponse
Adds a new attachment to the message.
Resets existing attachments. See the documentation for EditAttachments
for details.
Sourcepub fn keep_existing_attachment(
self,
id: AttachmentId,
) -> EditInteractionResponse
pub fn keep_existing_attachment( self, id: AttachmentId, ) -> EditInteractionResponse
Shorthand for EditAttachments::keep
.
Sourcepub fn clear_attachments(self) -> EditInteractionResponse
pub fn clear_attachments(self) -> EditInteractionResponse
Shorthand for calling Self::attachments
with EditAttachments::new
.
Trait Implementations§
Source§impl Builder for EditInteractionResponse
impl Builder for EditInteractionResponse
Source§fn execute<'life0, 'async_trait>(
self,
cache_http: impl CacheHttp + 'async_trait,
ctx: <EditInteractionResponse as Builder>::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<<EditInteractionResponse as Builder>::Built, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
EditInteractionResponse: 'async_trait,
fn execute<'life0, 'async_trait>(
self,
cache_http: impl CacheHttp + 'async_trait,
ctx: <EditInteractionResponse as Builder>::Context<'life0>,
) -> Pin<Box<dyn Future<Output = Result<<EditInteractionResponse as Builder>::Built, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
EditInteractionResponse: 'async_trait,
Edits the initial interaction response. Does not work for ephemeral messages.
The application_id
used will usually be the bot’s UserId
, except if the bot is very
old.
Note: Message contents must be under 2000 unicode code points, and embeds must be under 6000 code points.
§Errors
Returns an Error::Model
if the message content is too long. May also return an
Error::Http
if the API returns an error, or an Error::Json
if there is an error in
deserializing the API response.
Source§type Context<'ctx> = &'ctx str
type Context<'ctx> = &'ctx str
type Built = Message
Source§impl Clone for EditInteractionResponse
impl Clone for EditInteractionResponse
Source§fn clone(&self) -> EditInteractionResponse
fn clone(&self) -> EditInteractionResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more