diff options
Diffstat (limited to 'src/commands/playback.rs')
| -rw-r--r-- | src/commands/playback.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/commands/playback.rs b/src/commands/playback.rs index 7ecef47..1c3ab95 100644 --- a/src/commands/playback.rs +++ b/src/commands/playback.rs @@ -110,7 +110,7 @@ pub async fn _play(ctx: &Context, msg: &Message, url: &str) -> CommandResult { #[command] pub async fn play(ctx: &Context, msg: &Message, mut args: Args) -> CommandResult { - if args.len() == 0 { + if args.is_empty() { return _resume(ctx, msg).await; } @@ -168,9 +168,11 @@ pub async fn skip(ctx: &Context, msg: &Message, _args: Args) -> CommandResult { pub async fn die(ctx: &Context, msg: &Message, _: Args) -> CommandResult { let (_sb, call) = songbird(ctx, msg).await?; - let call = call.lock().await; + let mut call = call.lock().await; call.queue().stop(); + call.leave().await?; + Ok(()) } |
