summaryrefslogtreecommitdiff
path: root/src/api/mod.rs
diff options
context:
space:
mode:
authorseth <[email protected]>2023-11-30 22:18:51 -0500
committerseth <[email protected]>2023-12-01 07:12:49 -0500
commit76c0f94e6d7aa108424b34826eb7d8514b026287 (patch)
tree7315bd6dfe52c158041bed64ba39781718a69335 /src/api/mod.rs
parentdb52e639b85d79bed870020aec7a045851ca5ee3 (diff)
feat: use eyre, better logging, & refactor
small commits be damned
Diffstat (limited to 'src/api/mod.rs')
-rw-r--r--src/api/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs
index a1e0e97..2ce664e 100644
--- a/src/api/mod.rs
+++ b/src/api/mod.rs
@@ -3,11 +3,13 @@ use once_cell::sync::Lazy;
pub mod guzzle;
pub mod shiggy;
-pub const USER_AGENT: &str = "teawieBot/0.1.0";
+pub const USER_AGENT: &str = "teawieBot/";
pub static REQWEST_CLIENT: Lazy<reqwest::Client> = Lazy::new(|| {
+ let version = option_env!("CARGO_PKG_VERSION").unwrap_or("development");
+
reqwest::Client::builder()
- .user_agent(USER_AGENT)
+ .user_agent(format!("{USER_AGENT}/{version}"))
.build()
.unwrap_or_default()
});