diff options
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index 47daed8..8980b31 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,20 +1,23 @@ mod agenda; mod discord; +mod reminder; mod slack; use crate::agenda::AgendaPoint; +use crate::reminder::ReminderType; use futures::join; -use tokio::sync::mpsc; +use tokio::sync::{mpsc, watch}; #[tokio::main] async fn main() { - println!("Hello, world!"); - let (from_discord, to_slack) = mpsc::unbounded_channel::<AgendaPoint>(); let (from_slack, to_discord) = mpsc::unbounded_channel::<AgendaPoint>(); + let (reminder_sender, reminder_receiver) = watch::channel(ReminderType::Void); + join!( - discord::handle(from_discord, to_discord), - slack::handle(from_slack, to_slack), + reminder::handle(reminder_sender), + discord::handle(from_discord, to_discord, reminder_receiver.clone()), + slack::handle(from_slack, to_slack, reminder_receiver), ); } |
