From 76c0f94e6d7aa108424b34826eb7d8514b026287 Mon Sep 17 00:00:00 2001 From: seth Date: Thu, 30 Nov 2023 22:18:51 -0500 Subject: feat: use eyre, better logging, & refactor small commits be damned --- src/api/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/api/mod.rs') 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 = 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() }); -- cgit v1.2.3