diff options
| author | Zeyla Hellyer <[email protected]> | 2017-06-20 11:28:52 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-06-20 11:28:52 -0700 |
| commit | dc73d1a4bad07b453a9d60a6c8f8c187a7e42450 (patch) | |
| tree | 8c8c4b86e371f8d3dd4262ac8d96b4cda672b9ad /src/builder/execute_webhook.rs | |
| parent | Fix broken docs links on Permissions struct (diff) | |
| download | serenity-dc73d1a4bad07b453a9d60a6c8f8c187a7e42450.tar.xz serenity-dc73d1a4bad07b453a9d60a6c8f8c187a7e42450.zip | |
Add 'wait' parameter to http::execute_webhook
The 'wait' parameter allows you to specify waiting for the Message to be
sent prior to receiving a response, which will have Discord include the
JSON representation of the Message in the body.
Diffstat (limited to 'src/builder/execute_webhook.rs')
| -rw-r--r-- | src/builder/execute_webhook.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/builder/execute_webhook.rs b/src/builder/execute_webhook.rs index 68a39fc..e8b9042 100644 --- a/src/builder/execute_webhook.rs +++ b/src/builder/execute_webhook.rs @@ -44,7 +44,7 @@ use ::internal::prelude::*; /// .name("Rust by Example") /// .value("A collection of Rust examples on topics, useable in-browser"))); /// -/// let _ = webhook.execute(|w| w +/// let _ = webhook.execute(false, |w| w /// .content("Here's some information on Rust:") /// .embeds(vec![website, resources])); /// ``` @@ -69,7 +69,7 @@ impl ExecuteWebhook { /// # /// let avatar_url = "https://i.imgur.com/KTs6whd.jpg"; /// - /// let _ = webhook.execute(|w| w + /// let _ = webhook.execute(false, |w| w /// .avatar_url(avatar_url) /// .content("Here's a webhook")); /// ``` @@ -93,7 +93,7 @@ impl ExecuteWebhook { /// # /// # let webhook = rest::get_webhook_with_token(0, "").unwrap(); /// # - /// if let Err(why) = webhook.execute(|w| w.content("foo")) { + /// if let Err(why) = webhook.execute(false, |w| w.content("foo")) { /// println!("Err sending webhook: {:?}", why); /// } /// ``` @@ -135,7 +135,7 @@ impl ExecuteWebhook { /// # /// # let webhook = rest::get_webhook_with_token(0, "").unwrap(); /// # - /// if let Err(why) = webhook.execute(|w| w.content("hello").tts(true)) { + /// if let Err(why) = webhook.execute(false, |w| w.content("hello").tts(true)) { /// println!("Err sending webhook: {:?}", why); /// } /// ``` @@ -156,7 +156,7 @@ impl ExecuteWebhook { /// # /// # let webhook = rest::get_webhook_with_token(0, "").unwrap(); /// # - /// if let Err(why) = webhook.execute(|w| w.content("hello").username("hakase")) { + /// if let Err(why) = webhook.execute(false, |w| w.content("hello").username("hakase")) { /// println!("Err sending webhook: {:?}", why); /// } /// ``` |