diff --git a/src/commands.rs b/src/commands.rs index e87b1c4..647b213 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -91,7 +91,27 @@ pub async fn play( let mut handler = handler_lock.lock().await; debug!("Trying to play: {}", url); - let source = songbird::ytdl(&url).await?; + let source = songbird::ytdl(&url).await; + + let source = match source { + Ok(source) => source, + Err(e) => { + match e { + songbird::input::error::Error::Json { + ref error, + ref parsed_text, + } => { + debug!("Failed to play: {}", error); + debug!("Parsed text: {}", parsed_text); + } + _ => { + debug!("Failed to play: {}", e); + } + } + return Err(Box::new(e)); + } + }; + debug!("Playing: {:?}", source.metadata); let title = source .metadata