pub struct CreateMessage {
pub content: Option<String>,
pub nonce: Option<String>,
pub attachments: Vec<String>,
pub replies: Option<Vec<Replies>>,
pub embeds: Vec<CreateEmbed>,
}Fields§
§content: Option<String>§nonce: Option<String>§attachments: Vec<String>§replies: Option<Vec<Replies>>§embeds: Vec<CreateEmbed>Implementations§
Source§impl CreateMessage
impl CreateMessage
pub fn new() -> Self
pub fn content(self, content: impl Into<String>) -> Self
pub fn nonce(self, nonce: Option<String>) -> Self
pub fn attachments(self, attachments: Vec<String>) -> Self
Sourcepub fn replies(self, replies: Replies) -> Self
pub fn replies(self, replies: Replies) -> Self
Add replies using message ID’s
Note: Having more than 5 will cause API error, and you can’t use the same ID twice
Sourcepub fn add_embeds(self, embeds: Vec<CreateEmbed>) -> Self
pub fn add_embeds(self, embeds: Vec<CreateEmbed>) -> Self
Add multiple embeds for the message.
Note: This will keep all existing embeds. Use Self::embeds() to replace existing
embeds.
Sourcepub fn embed(self, embed: CreateEmbed) -> Self
pub fn embed(self, embed: CreateEmbed) -> Self
Set an embed for the message.
Note: This will replace all existing embeds. Use [Self::add_embed()] to keep existing
embeds.
Sourcepub fn embeds(self, embeds: Vec<CreateEmbed>) -> Self
pub fn embeds(self, embeds: Vec<CreateEmbed>) -> Self
Set multiple embeds for the message.
Note: This will replace all existing embeds. Use Self::add_embeds() to keep existing
embeds.
Trait Implementations§
Source§impl Debug for CreateMessage
impl Debug for CreateMessage
Source§impl Default for CreateMessage
impl Default for CreateMessage
Source§fn default() -> CreateMessage
fn default() -> CreateMessage
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreateMessage
impl RefUnwindSafe for CreateMessage
impl Send for CreateMessage
impl Sync for CreateMessage
impl Unpin for CreateMessage
impl UnsafeUnpin for CreateMessage
impl UnwindSafe for CreateMessage
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