From 850fad62f12b4e764f5e64036db35259237994cb Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 19 Aug 2026 02:45:49 +0200 Subject: fix: Various cron fixes Not saving full URL Not using autocompletion content, just label --- src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 31c9e94..7f57421 100644 --- a/src/main.rs +++ b/src/main.rs @@ -49,7 +49,7 @@ pub struct Data { /// next keystroke's autocomplete can serve real results immediately. pub ac_search_cache: AcSearchCache, /// Active music track per guild (only one music source at a time). - pub music_tracks: tokio::sync::Mutex>, + pub music_tracks: Arc>>, } impl Data { @@ -185,6 +185,8 @@ async fn main() -> Result<(), Box> { Box::pin(async move { let vm = voice::VoiceManager::new(ctx).await?; + let music_tracks: Arc>> = Arc::new(tokio::sync::Mutex::new(HashMap::new())); + let data = Data { config, db_pool, @@ -195,7 +197,7 @@ async fn main() -> Result<(), Box> { triggers: tokio::sync::Mutex::new(triggers), ac_cache: tokio::sync::Mutex::new(HashMap::new()), ac_search_cache: Arc::new(tokio::sync::Mutex::new(HashMap::new())), - music_tracks: tokio::sync::Mutex::new(HashMap::new()), + music_tracks: music_tracks.clone(), }; // Spawn cron scheduler loop. @@ -205,6 +207,7 @@ async fn main() -> Result<(), Box> { http: ctx.http.clone(), voice_manager: data.voice_manager.clone(), copyparty: data.copyparty.clone(), + music_tracks: music_tracks.clone(), }; tokio::spawn(async move { crate::tasks::cron_scheduler_loop(cron_ctx).await; -- cgit v1.2.3