Fix stop bug

This commit is contained in:
oupson1er@gmail.com 2021-03-18 16:32:17 +01:00
parent b9b631c892
commit a99fd897af
1 changed files with 3 additions and 3 deletions

View File

@ -331,7 +331,6 @@ async fn play(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult {
}; };
let meta = &source.metadata.clone(); let meta = &source.metadata.clone();
handler.enqueue_source(source); handler.enqueue_source(source);
msg.channel_id msg.channel_id
@ -443,9 +442,10 @@ async fn stop(ctx: &Context, msg: &Message) -> CommandResult {
.await .await
.expect("Songbird Voice client placed in at initialisation.") .expect("Songbird Voice client placed in at initialisation.")
.clone(); .clone();
if let Some(handler) = manager.get(guild_id) { if let Some(handler) = manager.get(guild_id) {
let mut handler = handler.lock().await; let handler = handler.lock().await;
handler.stop(); handler.queue().stop();
msg.channel_id.say(&ctx.http, "Stopping").await?; msg.channel_id.say(&ctx.http, "Stopping").await?;
} else { } else {