aboutsummaryrefslogtreecommitdiffstats
path: root/src/commands/cron.rs
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 01:32:06 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 01:32:06 +0100
commit382bb2af15e7076f8dcbbe6cc4a6b135709ef7b9 (patch)
tree5e03e559d05ff2510781d5b760f5737e4ff03580 /src/commands/cron.rs
parentcron: validate expressions and allocate ids atomically (diff)
downloadsenator-sperma-382bb2af15e7076f8dcbbe6cc4a6b135709ef7b9.tar.gz
senator-sperma-382bb2af15e7076f8dcbbe6cc4a6b135709ef7b9.zip
autocomplete: key results by extension filter and reject the placeholder
Diffstat (limited to 'src/commands/cron.rs')
-rw-r--r--src/commands/cron.rs5
1 files changed, 5 insertions, 0 deletions
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(
34 _ => return Err(lang::err_bad_channel_type()), 34 _ => return Err(lang::err_bad_channel_type()),
35 }; 35 };
36 36
37 if audio_filename == crate::commands::autocomplete::MOCK_SEARCHING {
38 ctx.say(lang::L_UTIL_PICK_FROM_AUTOCOMPLETE).await?;
39 return Ok(());
40 }
41
37 // Resolve full path from autocomplete cache (value is truncated to 99 chars by Discord) 42 // Resolve full path from autocomplete cache (value is truncated to 99 chars by Discord)
38 let full_url = if let Some(hit) = ctx.data().ac_lookup(ctx.author().id, &audio_filename).await { 43 let full_url = if let Some(hit) = ctx.data().ac_lookup(ctx.author().id, &audio_filename).await {
39 let path = hit.url_path().unwrap_or(&audio_filename); 44 let path = hit.url_path().unwrap_or(&audio_filename);