mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-05-24 17:20:49 +00:00
Update to Tokio 1 and Serenity 0.10 (#9)
This commit is contained in:
parent
40f6c6e553
commit
901d55814d
19 changed files with 238 additions and 281 deletions
|
@ -33,8 +33,7 @@ pub use hook::InfoHook;
|
|||
pub async fn setup(path: &std::path::Path, data: &mut TypeMap, announcers: &mut AnnouncerHandler) {
|
||||
CfSavedUsers::insert_into(data, path.join("cf_saved_users.yaml"))
|
||||
.expect("Must be able to set up DB");
|
||||
let http = data.get::<HTTPClient>().unwrap();
|
||||
let client = Arc::new(codeforces::Client::new(http.clone()));
|
||||
let client = Arc::new(codeforces::Client::new());
|
||||
data.insert::<hook::ContestCache>(hook::ContestCache::new(client.clone()).await.unwrap());
|
||||
data.insert::<CFClient>(client);
|
||||
announcers.add("codeforces", announcer::Announcer);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue