pub struct WebhookView { /* private fields */ }
Expand description
A view for managing Discord webhooks.
Implementations§
Source§impl WebhookView
impl WebhookView
Sourcepub fn get(&self) -> impl Future<Item = Webhook, Error = Error>
pub fn get(&self) -> impl Future<Item = Webhook, Error = Error>
Returns a webhook object for the provided user ID.
Sourcepub fn get_with_token(
&self,
token: &str,
) -> impl Future<Item = Webhook, Error = Error>
pub fn get_with_token( &self, token: &str, ) -> impl Future<Item = Webhook, Error = Error>
Similar to [method.get.html
], but accepts a webhook token. The returned webhook does not have a User object.
Sourcepub fn modify(
&self,
opts: ModifyWebhookOptions,
) -> impl Future<Item = Webhook, Error = Error>
pub fn modify( &self, opts: ModifyWebhookOptions, ) -> impl Future<Item = Webhook, Error = Error>
Modifies the webhook at the provided webhook ID.
This endpoint requires the MANAGE_WEBHOOKS
permission.
Sourcepub fn modify_with_token(
&self,
token: &str,
opts: ModifyWebhookOptions,
) -> impl Future<Item = Webhook, Error = Error>
pub fn modify_with_token( &self, token: &str, opts: ModifyWebhookOptions, ) -> impl Future<Item = Webhook, Error = Error>
Similar to [method.modify.html
], but accepts a webhook token. The returned webhook does not have a User object.
Sourcepub fn delete(&self) -> impl Future<Item = (), Error = Error>
pub fn delete(&self) -> impl Future<Item = (), Error = Error>
Permanently deletes this webhook.
Auto Trait Implementations§
impl Freeze for WebhookView
impl !RefUnwindSafe for WebhookView
impl Send for WebhookView
impl Sync for WebhookView
impl Unpin for WebhookView
impl !UnwindSafe for WebhookView
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more