From 382bb2af15e7076f8dcbbe6cc4a6b135709ef7b9 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 01:32:06 +0100 Subject: autocomplete: key results by extension filter and reject the placeholder --- src/commands/cron.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/commands/cron.rs') diff --git a/src/commands/cron.rs b/src/commands/cron.rs index 94cf955..ec5b702 100644 --- a/src/commands/cron.rs +++ b/src/commands/cron.rs @@ -34,6 +34,11 @@ pub async fn dodaj_audio( _ => return Err(lang::err_bad_channel_type()), }; + if audio_filename == crate::commands::autocomplete::MOCK_SEARCHING { + ctx.say(lang::L_UTIL_PICK_FROM_AUTOCOMPLETE).await?; + return Ok(()); + } + // Resolve full path from autocomplete cache (value is truncated to 99 chars by Discord) let full_url = if let Some(hit) = ctx.data().ac_lookup(ctx.author().id, &audio_filename).await { let path = hit.url_path().unwrap_or(&audio_filename); -- cgit v1.2.3