From a99fd897af5148aedf25d12edb89208d6cdedd75 Mon Sep 17 00:00:00 2001 From: "oupson1er@gmail.com" Date: Thu, 18 Mar 2021 16:32:17 +0100 Subject: [PATCH] Fix stop bug --- src/commands/music.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/music.rs b/src/commands/music.rs index 39f26a1..21e0b45 100644 --- a/src/commands/music.rs +++ b/src/commands/music.rs @@ -331,7 +331,6 @@ async fn play(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { }; let meta = &source.metadata.clone(); - handler.enqueue_source(source); msg.channel_id @@ -443,9 +442,10 @@ async fn stop(ctx: &Context, msg: &Message) -> CommandResult { .await .expect("Songbird Voice client placed in at initialisation.") .clone(); + if let Some(handler) = manager.get(guild_id) { - let mut handler = handler.lock().await; - handler.stop(); + let handler = handler.lock().await; + handler.queue().stop(); msg.channel_id.say(&ctx.http, "Stopping").await?; } else {