Add initial response while a song loads
This commit is contained in:
		
							parent
							
								
									3bdd819d75
								
							
						
					
					
						commit
						30ffacfef0
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -81,6 +81,10 @@ pub async fn play(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    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;
 | 
			
		||||
 | 
			
		||||
        debug!("Trying to play: {}", url);
 | 
			
		||||
| 
						 | 
				
			
			@ -106,7 +110,7 @@ pub async fn play(
 | 
			
		|||
 | 
			
		||||
        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 mut currently_playing = ctx.data().currently_playing.lock();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue