pub struct ChannelMessageBuilder(/* private fields */);Available on crate feature
builder only.Expand description
Builder for a InteractionResponse of type InteractionResponseType::ChannelMessageWithSource.
Implementations§
Source§impl ChannelMessageBuilder
impl ChannelMessageBuilder
Sourcepub fn build(self) -> InteractionResponse
pub fn build(self) -> InteractionResponse
Builds the InteractionResponse.
Sourcepub fn allowed_mentions(self, allowed_mentions: AllowedMentions) -> Self
pub fn allowed_mentions(self, allowed_mentions: AllowedMentions) -> Self
Sets the allowed mentions filter.
Defaults to no filter.
Sourcepub fn attachments(
self,
attachments: impl IntoIterator<Item = Attachment>,
) -> Self
pub fn attachments( self, attachments: impl IntoIterator<Item = Attachment>, ) -> Self
Sets the attachments.
Defaults to no attachments.
Sourcepub fn components(
self,
components: impl IntoIterator<Item = impl Into<Component>>,
) -> Self
pub fn components( self, components: impl IntoIterator<Item = impl Into<Component>>, ) -> Self
Sets the components.
Defaults to no components.
Sourcepub fn content(self, content: impl Into<String>) -> Self
pub fn content(self, content: impl Into<String>) -> Self
Sets the content.
Defaults to no content.
Sourcepub fn embeds(self, embeds: impl IntoIterator<Item = Embed>) -> Self
pub fn embeds(self, embeds: impl IntoIterator<Item = Embed>) -> Self
Sets the embeds.
Defaults to no embeds.
Sourcepub fn flags(self, flags: MessageFlags) -> Self
pub fn flags(self, flags: MessageFlags) -> Self
Sets the message flags.
Defaults to no flags.
Trait Implementations§
Source§impl Clone for ChannelMessageBuilder
impl Clone for ChannelMessageBuilder
Source§fn clone(&self) -> ChannelMessageBuilder
fn clone(&self) -> ChannelMessageBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChannelMessageBuilder
impl Debug for ChannelMessageBuilder
Source§impl Default for ChannelMessageBuilder
impl Default for ChannelMessageBuilder
Source§fn default() -> ChannelMessageBuilder
fn default() -> ChannelMessageBuilder
Returns the “default value” for a type. Read more
Source§impl From<ChannelMessageBuilder> for InteractionResponse
impl From<ChannelMessageBuilder> for InteractionResponse
Source§fn from(builder: ChannelMessageBuilder) -> Self
fn from(builder: ChannelMessageBuilder) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ChannelMessageBuilder
impl RefUnwindSafe for ChannelMessageBuilder
impl Send for ChannelMessageBuilder
impl Sync for ChannelMessageBuilder
impl Unpin for ChannelMessageBuilder
impl UnsafeUnpin for ChannelMessageBuilder
impl UnwindSafe for ChannelMessageBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more