initial rewrite in rust & moderation commands
Signed-off-by: seth <getchoo@tuta.io>
This commit is contained in:
parent
b17e357b75
commit
45403e9d9b
53 changed files with 3297 additions and 2820 deletions
17
src/api/mod.rs
Normal file
17
src/api/mod.rs
Normal file
|
@ -0,0 +1,17 @@
|
|||
use once_cell::sync::Lazy;
|
||||
|
||||
pub mod dadjoke;
|
||||
pub mod rory;
|
||||
|
||||
pub static USER_AGENT: Lazy<String> = Lazy::new(|| {
|
||||
let version = option_env!("CARGO_PKG_VERSION").unwrap_or("development");
|
||||
|
||||
format!("refraction/{version}")
|
||||
});
|
||||
|
||||
pub static REQWEST_CLIENT: Lazy<reqwest::Client> = Lazy::new(|| {
|
||||
reqwest::Client::builder()
|
||||
.user_agent(USER_AGENT.to_string())
|
||||
.build()
|
||||
.unwrap_or_default()
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue