use reqwest::Client;
use serde_json::json;
use std::error::Error;
#[allow(dead_code)]
pub async fn send_embed_message(client: &Client, token: &str, channel_id: &str, title: &str, description: &str) -> Result<(), Box<dyn Error>> {
let url = format!("https://discord.com/api/v9/channels/{}/messages", channel_id);
let embed = json!({
"title": title,
"description": description,
"color": 0x3498db });
let body = json!({ "embed": embed });
client.post(&url)
.bearer_auth(token)
.json(&body)
.send()
.await?
.error_for_status()?;
Ok(())
}