[−][src]Function serenity::http::raw::edit_webhook_with_token
pub fn edit_webhook_with_token(
webhook_id: u64,
token: &str,
map: &Map<String, Value>
) -> Result<Webhook>
Edits the webhook with the given data.
Refer to the documentation for edit_webhook
for more information.
This method does not require authentication.
Examples
Edit the name of a webhook given its Id and unique token:
ⓘThis example is not tested
extern crate serde_json; extern crate serenity; use serde_json::builder::ObjectBuilder; use serenity::http; let id = 245037420704169985; let token = "ig5AO-wdVWpCBtUUMxmgsWryqgsW3DChbKYOINftJ4DCrUbnkedoYZD0VOH1QLr-S3sV"; let map = ObjectBuilder::new().insert("name", "new name").build(); let edited = http::edit_webhook_with_token(id, token, map) .expect("Error editing webhook");