Struct serenity::builder::EditWebhookMessage
source · [−]builder
only.Expand description
A builder to specify the fields to edit in an existing Webhook
’s message.
Tuple Fields
0: HashMap<&'static str, Value>
Implementations
sourceimpl EditWebhookMessage
impl EditWebhookMessage
sourcepub fn content<D: ToString>(&mut self, content: D) -> &mut Self
pub fn content<D: ToString>(&mut self, content: D) -> &mut Self
Set the content of the message.
Note: Message contents must be under 2000 unicode code points.
sourcepub fn embeds(&mut self, embeds: Vec<Value>) -> &mut Self
pub fn embeds(&mut self, embeds: Vec<Value>) -> &mut Self
Set the embeds associated with the message.
This should be used in combination with Embed::fake
, creating one
or more fake embeds to send to the API.
Examples
Refer to struct-level documentation of ExecuteWebhook
for an example
on how to use embeds.
sourcepub fn allowed_mentions<F>(&mut self, f: F) -> &mut Self where
F: FnOnce(&mut CreateAllowedMentions) -> &mut CreateAllowedMentions,
pub fn allowed_mentions<F>(&mut self, f: F) -> &mut Self where
F: FnOnce(&mut CreateAllowedMentions) -> &mut CreateAllowedMentions,
Set the allowed mentions for the message.
sourcepub fn components<F>(&mut self, f: F) -> &mut Self where
F: FnOnce(&mut CreateComponents) -> &mut CreateComponents,
pub fn components<F>(&mut self, f: F) -> &mut Self where
F: FnOnce(&mut CreateComponents) -> &mut CreateComponents,
Creates components for this message. Requires an application-owned webhook, meaning either
the webhook’s kind
field is set to WebhookType::Application
, or it was created by an
application (and has kind WebhookType::Incoming
).
Trait Implementations
sourceimpl Clone for EditWebhookMessage
impl Clone for EditWebhookMessage
sourcefn clone(&self) -> EditWebhookMessage
fn clone(&self) -> EditWebhookMessage
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for EditWebhookMessage
impl Debug for EditWebhookMessage
sourceimpl Default for EditWebhookMessage
impl Default for EditWebhookMessage
sourcefn default() -> EditWebhookMessage
fn default() -> EditWebhookMessage
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for EditWebhookMessage
impl Send for EditWebhookMessage
impl Sync for EditWebhookMessage
impl Unpin for EditWebhookMessage
impl UnwindSafe for EditWebhookMessage
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more