mirror of
https://github.com/natsukagami/youmubot.git
synced 2025-04-19 08:48:54 +00:00
Rewrite setup
This commit is contained in:
parent
a8958a20f2
commit
ff2626b656
1 changed files with 2 additions and 5 deletions
|
@ -4,14 +4,11 @@ use std::path::Path;
|
|||
/// Set up the prelude libraries.
|
||||
///
|
||||
/// Panics on failure: Youmubot should *NOT* attempt to continue when this function fails.
|
||||
pub fn setup_prelude(db_path: &Path, data: &mut ShareMap, _: &mut StandardFramework) {
|
||||
pub fn setup_prelude(db_path: &Path, data: &mut TypeMap, _: &mut StandardFramework) {
|
||||
// Setup the announcer DB.
|
||||
crate::announcer::AnnouncerChannels::insert_into(data, db_path.join("announcers.yaml"))
|
||||
.expect("Announcers DB set up");
|
||||
|
||||
// Set up the HTTP client.
|
||||
data.insert::<crate::HTTPClient>(reqwest::blocking::Client::new());
|
||||
|
||||
// Set up the reaction watcher.
|
||||
data.insert::<crate::ReactionWatcher>(crate::ReactionWatcher::new());
|
||||
data.insert::<crate::HTTPClient>(reqwest::Client::new());
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue