Struct twilight_http::request::channel::webhook::UpdateWebhook
source · [−]pub struct UpdateWebhook<'a> { /* private fields */ }
Expand description
Update a webhook by ID.
Implementations
sourceimpl<'a> UpdateWebhook<'a>
impl<'a> UpdateWebhook<'a>
Update a webhook by its ID.
sourcepub const fn avatar(self, avatar: Option<&'a str>) -> Self
pub const fn avatar(self, avatar: Option<&'a str>) -> Self
Set the avatar of the webhook.
This must be a Data URI, in the form of
data:image/{type};base64,{data}
where {type}
is the image MIME type
and {data}
is the base64-encoded image. See Discord Docs/Image Data.
sourcepub const fn channel_id(self, channel_id: Id<ChannelMarker>) -> Self
pub const fn channel_id(self, channel_id: Id<ChannelMarker>) -> Self
Move this webhook to a new channel.
sourcepub fn name(self, name: &'a str) -> Result<Self, ValidationError>
pub fn name(self, name: &'a str) -> Result<Self, ValidationError>
Change the name of the webhook.
Errors
Returns an error of type WebhookUsername
if the webhook’s name is
invalid.
sourcepub fn exec(self) -> ResponseFuture<Webhook>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<Webhook>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
Execute the request, returning a future resolving to a Response
.
Trait Implementations
sourceimpl<'a> AuditLogReason<'a> for UpdateWebhook<'a>
impl<'a> AuditLogReason<'a> for UpdateWebhook<'a>
sourceimpl TryIntoRequest for UpdateWebhook<'_>
impl TryIntoRequest for UpdateWebhook<'_>
Auto Trait Implementations
impl<'a> !RefUnwindSafe for UpdateWebhook<'a>
impl<'a> Send for UpdateWebhook<'a>
impl<'a> Sync for UpdateWebhook<'a>
impl<'a> Unpin for UpdateWebhook<'a>
impl<'a> !UnwindSafe for UpdateWebhook<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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