use crate::{Color, DiscordClient, Embed};
#[tokio::test]
async fn test() {
let _ = dotenvy::dotenv();
let url = match std::env::var("DISCORD_URL") {
Ok(ok) => ok,
Err(err) => {
eprintln!(
"Did Not Run Discord Test Because `DISCORD_URL` Could Not Be Retrieved From Environment Variables: {err}"
);
return;
}
};
let client = reqwest::Client::new();
let client = DiscordClient::new(client);
client
.message()
.url(url.as_str())
.embed(
Embed::builder()
.title("Hello From Rust")
.description("My Descr")
.color(Color::Blue)
.field("Poll Time", "2025-01-01")
.build(),
)
.build()
.send()
.await
.unwrap();
}