Fix stop bug
This commit is contained in:
parent
b9b631c892
commit
a99fd897af
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue