[][src]Struct spectacles_rest::WebhookView

pub struct WebhookView { /* fields omitted */ }

A view for managing Discord webhooks.

Methods

impl WebhookView[src]

pub fn get(&self) -> impl Future<Item = Webhook, Error = Error>[src]

Returns a webhook object for the provided user ID.

pub fn get_with_token(
    &self,
    token: &str
) -> impl Future<Item = Webhook, Error = Error>
[src]

Similar to [method.get.html], but accepts a webhook token. The returned webhook does not have a User object.

pub fn modify(
    &self,
    opts: ModifyWebhookOptions
) -> impl Future<Item = Webhook, Error = Error>
[src]

Modifies the webhook at the provided webhook ID. This endpoint requires the MANAGE_WEBHOOKS permission.

pub fn modify_with_token(
    &self,
    token: &str,
    opts: ModifyWebhookOptions
) -> impl Future<Item = Webhook, Error = Error>
[src]

Similar to [method.modify.html], but accepts a webhook token. The returned webhook does not have a User object.

pub fn delete(&self) -> impl Future<Item = (), Error = Error>[src]

Permanently deletes this webhook.

pub fn delete_with_token(
    &self,
    token: &str
) -> impl Future<Item = (), Error = Error>
[src]

Similar to [method.delete.html], but accepts a webhook token.

pub fn execute(
    &self,
    token: &str,
    opts: ExecuteWebhookOptions,
    wait: bool
) -> impl Future<Item = Option<Message>, Error = Error>
[src]

Executes the provided webhook, with the provided options.

Auto Trait Implementations

impl Send for WebhookView

impl Sync for WebhookView

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Erased for T

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err