mirror of
https://github.com/revanced/gh-discord-transformer.git
synced 2025-04-29 22:04:24 +02:00
fix: change usd type to integer
According to the webhook spec, it should be an integer, not a float.
This commit is contained in:
parent
d460078801
commit
3b5d20dc23
@ -20,5 +20,5 @@ pub struct Sponsor {
|
|||||||
|
|
||||||
#[derive(Debug, Deserialize)]
|
#[derive(Debug, Deserialize)]
|
||||||
pub struct Tier {
|
pub struct Tier {
|
||||||
pub monthly_price_in_dollars: f64,
|
pub monthly_price_in_dollars: i64,
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ pub struct Error(pub &'static str);
|
|||||||
|
|
||||||
pub type Result<T> = std::result::Result<T, Error>;
|
pub type Result<T> = std::result::Result<T, Error>;
|
||||||
|
|
||||||
pub async fn notify_discord(username: &str, profile_url: &str, usd_donated: f64) -> Result<()> {
|
pub async fn notify_discord(username: &str, profile_url: &str, usd_donated: i64) -> Result<()> {
|
||||||
let webhook_url = std::env::var("DISCORD_WEBHOOK_URL").map_err(|_| Error("no-webhook-url"))?;
|
let webhook_url = std::env::var("DISCORD_WEBHOOK_URL").map_err(|_| Error("no-webhook-url"))?;
|
||||||
let thread_id = std::env::var("DISCORD_WEBHOOK_TID").ok();
|
let thread_id = std::env::var("DISCORD_WEBHOOK_TID").ok();
|
||||||
let client = reqwest::Client::builder()
|
let client = reqwest::Client::builder()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user