diff --git a/src/main.rs b/src/main.rs index 5d6f8de..e1b214b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,7 +22,7 @@ async fn main() { init_logger().unwrap(); // TODO: Check that this is actually what we want task::spawn(main_scheduler_loop( - time::interval(time::Duration::from_secs(1)), + time::interval(time::Duration::from_secs(5)), event_context.clone(), )); discord_main_loop(event_context).await; diff --git a/src/watchdog.rs b/src/watchdog.rs index 45b9b2e..3163b99 100644 --- a/src/watchdog.rs +++ b/src/watchdog.rs @@ -15,6 +15,8 @@ use crate::votes::EventHolder; use chrono::{DateTime, Local, NaiveDate}; +use poise::serenity_prelude::{CacheHttp, ChannelId}; +use serde::Serialize; /// The main scheduler waiting and dispatch loop. /// @@ -40,9 +42,17 @@ fn fk_around(ev_ctx: &EventHolder) { "In the fk_around function ({}):", Local::now() // &ev_ctx ); - if let Some(discord_ctx) = ev_ctx.discord_ctx.lock().unwrap().as_mut() { - println!("Fking around : {:#?}", discord_ctx); - } + // if let Some(discord_ctx) = ev_ctx.discord_ctx.lock().unwrap().as_mut() { + // println!("Fking around : {:#?}", discord_ctx); + // let _ = discord_ctx + // .http() + // .send_message( + // ChannelId::new(1300786300143800351), + // Vec::new(), + // &"This is a message".to_owned(), + // ) + // .await; + // } } /// The `watchdog_update` function updates the state of the watchdog and executes the necessary tasks.