diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/actions.rs | 2 | ||||
-rw-r--r-- | src/commands/osu.rs | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/commands/actions.rs b/src/commands/actions.rs index 63d00fb..a283238 100644 --- a/src/commands/actions.rs +++ b/src/commands/actions.rs @@ -114,6 +114,8 @@ pub async fn hug( Ok(()) } + +/// Takes in a specific vector of URLs and returns a random one fn get_random_url_from_vec(vec: Vec<&str>) -> &str { let mut url = ""; let rand = rand::thread_rng().gen_range(0..vec.len()); diff --git a/src/commands/osu.rs b/src/commands/osu.rs index 8d91f56..5e0b563 100644 --- a/src/commands/osu.rs +++ b/src/commands/osu.rs @@ -18,6 +18,9 @@ struct OsuTokenRequest { pub scope: String, } +/// This is kinda loose, and we should really be caching the osu token +/// +/// Eh well, this *works* (sort of) async fn setup_reqwest() -> Result<reqwest::Client, Error> { let client_id = std::env::var("OSU_CLIENT_ID").unwrap(); let client_secret = std::env::var("OSU_CLIENT_SECRET").unwrap(); |