[−][src]Function serenity::http::raw::delete_webhook
pub fn delete_webhook(webhook_id: u64) -> Result<()>
Deletes a Webhook
given its Id.
This method requires authentication, whereas delete_webhook_with_token
does not.
Examples
Deletes a webhook given its Id:
use serenity::http; use std::env; // Due to the `delete_webhook` function requiring you to authenticate, you // must have set the token first. http::set_token(&env::var("DISCORD_TOKEN").unwrap()); http::delete_webhook(245037420704169985).expect("Error deleting webhook");