Add initial response while a song loads

This commit is contained in:
Alex Page 2023-03-02 22:36:56 -05:00
parent 3bdd819d75
commit 30ffacfef0

View file

@ -81,6 +81,10 @@ pub async fn play(
} }
if let Some(handler_lock) = manager.get(guild.id) { if let Some(handler_lock) = manager.get(guild.id) {
let response = ctx
.send(|r| r.content("https://media.giphy.com/media/H1dxi6xdh4NGQCZSvz/giphy.gif"))
.await?;
let mut handler = handler_lock.lock().await; let mut handler = handler_lock.lock().await;
debug!("Trying to play: {}", url); debug!("Trying to play: {}", url);
@ -106,7 +110,7 @@ pub async fn play(
msg.push_bold("Now playing: ").push_named_link(title, url); msg.push_bold("Now playing: ").push_named_link(title, url);
ctx.say(msg.build()).await?; response.edit(ctx, |r| r.content(msg.build())).await?;
let (audio, track_handle) = create_player(source); let (audio, track_handle) = create_player(source);
let mut currently_playing = ctx.data().currently_playing.lock(); let mut currently_playing = ctx.data().currently_playing.lock();