29 lines
878 B
Rust
29 lines
878 B
Rust
//! A Rust Discord Bot, in charge of greatly simplifying the process of finding a meeting date, organising an event and choosing between several options.
|
|
//!
|
|
//!
|
|
|
|
// This line is here to force the use of extensive documentation
|
|
#![warn(clippy::missing_docs_in_private_items)]
|
|
|
|
use idlefox::config::init_logger;
|
|
use idlefox::main_scheduler_loop;
|
|
use tokio::time;
|
|
|
|
// The main loop is untestable
|
|
#[cfg(not(tarpaulin_include))]
|
|
#[tokio::main]
|
|
async fn main() {
|
|
use idlefox::votes::EventHolder;
|
|
use tokio::task;
|
|
|
|
// TODO: Actually load them from disk
|
|
let event_context = EventHolder::default();
|
|
init_logger().unwrap();
|
|
// TODO: Check that this is actually what we want
|
|
task::spawn(main_scheduler_loop(
|
|
time::interval(time::Duration::from_secs(5)),
|
|
event_context.clone(),
|
|
));
|
|
idlefox::io::discord_main_loop(event_context).await;
|
|
}
|