Create databases for cf

This commit is contained in:
Natsu Kagami 2020-02-09 12:01:48 -05:00
parent 4b5dcfd072
commit 5b64d1e535
Signed by: nki
GPG key ID: 73376E117CD20735
5 changed files with 45 additions and 1 deletions

View file

@ -3,15 +3,26 @@ use serenity::{
macros::{command, group},
Args, CommandResult,
},
model::{channel::Message, id::UserId},
model::channel::Message,
};
use youmubot_prelude::*;
mod db;
mod embed;
mod hook;
// /// Live-commentating a Codeforces round.
// pub mod live;
pub use db::CfSavedUsers;
pub use hook::codeforces_info_hook;
/// Sets up the CF databases.
pub fn setup(path: &std::path::Path, data: &mut ShareMap) {
CfSavedUsers::insert_into(data, path.join("cf_saved_users.yaml"))
.expect("Must be able to set up DB")
}
#[group]
#[prefix = "cf"]
#[description = "Codeforces-related commands"]