aboutsummaryrefslogtreecommitdiffstats
path: root/src/commands/music.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/commands/music.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/commands/music.rs b/src/commands/music.rs
index baa91b1..51bd619 100644
--- a/src/commands/music.rs
+++ b/src/commands/music.rs
@@ -3,7 +3,7 @@ use poise::serenity_prelude as serenity;
3 3
4use tracing::{error, info}; 4use tracing::{error, info};
5 5
6use super::autocomplete::audio_file; 6use super::autocomplete::{MOCK_SEARCHING, audio_file};
7use crate::Data; 7use crate::Data;
8use crate::copyparty::{html_decode, percent_decode}; 8use crate::copyparty::{html_decode, percent_decode};
9use crate::error::{Error, Result}; 9use crate::error::{Error, Result};
@@ -87,6 +87,9 @@ async fn resolve_source(
87 } 87 }
88 88
89 let name = melodia.ok_or_else(|| Error::Custom(lang::L_MUSIC_NEED_NAME.into()))?; 89 let name = melodia.ok_or_else(|| Error::Custom(lang::L_MUSIC_NEED_NAME.into()))?;
90 if name == MOCK_SEARCHING {
91 return Err(Error::Custom(lang::L_UTIL_PICK_FROM_AUTOCOMPLETE.into()));
92 }
90 93
91 // ── Autocomplete cache (per-user: (UserId, filename) → SearchHit) ─ 94 // ── Autocomplete cache (per-user: (UserId, filename) → SearchHit) ─
92 if let Some(hit) = ctx.data().ac_lookup(ctx.author().id, &name).await { 95 if let Some(hit) = ctx.data().ac_lookup(ctx.author().id, &name).await {