Struct twilight_http::request::channel::webhook::ExecuteWebhookAndWait [−][src]
pub struct ExecuteWebhookAndWait<'a> { /* fields omitted */ }Expand description
Execute a webhook, sending a message to its channel, and then wait for the message to be created.
Examples
use twilight_http::Client; use twilight_model::id::WebhookId; let client = Client::new("my token".to_owned()); let id = WebhookId(432); let message = client .execute_webhook(id, "webhook token") .content("Pinkie...") .wait() .exec() .await? .model() .await?; println!("message id: {}", message.id);
Implementations
pub fn exec(self) -> ResponseFuture<Message>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
pub fn exec(self) -> ResponseFuture<Message>ⓘNotable traits for ResponseFuture<T>impl<T: Unpin> Future for ResponseFuture<T> type Output = Result<Response<T>, Error>;
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.