summaryrefslogtreecommitdiff
path: root/src/api/mod.rs
blob: 6554553c970ae5925564b95f612462d8ef78b043 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use once_cell::sync::Lazy;

pub mod guzzle;
pub mod shiggy;

pub static USER_AGENT: Lazy<String> = Lazy::new(|| {
	let version = option_env!("CARGO_PKG_VERSION").unwrap_or("development");

	format!("teawieBot/{version}")
});

pub static REQWEST_CLIENT: Lazy<reqwest::Client> = Lazy::new(|| {
	reqwest::Client::builder()
		.user_agent(USER_AGENT.to_string())
		.build()
		.unwrap_or_default()
});