minor tweaks

This commit is contained in:
2024-10-12 18:22:41 -04:00
parent 38841369fc
commit 8ee7c524af
4 changed files with 23 additions and 21 deletions

View File

@@ -30,17 +30,15 @@ pub async fn run(ctx: &Context, command: &CommandInteraction) {
if let Some(handler_lock) = manager.get(guild_id.to_owned()) {
let handler = handler_lock.lock().await;
match handler.queue().current() {
Some(track) => {
match track.play() {
Ok(_) => {
log::debug!("<{guild_id}> Resumed the track");
edit_response(&ctx, &command, format!("Resuming the track")).await;
}
Err(err) => {
edit_response(&ctx, &command, format!("Failed to resume: {}", err)).await;
}
Some(track) => match track.play() {
Ok(_) => {
log::debug!("<{guild_id}> Resumed the track");
edit_response(&ctx, &command, format!("Resuming the track")).await;
}
}
Err(err) => {
edit_response(&ctx, &command, format!("Failed to resume: {}", err)).await;
}
},
None => {
edit_response(&ctx, &command, format!("No track is currently playing")).await;
return;