diff options
| author | Nathan Perry <np@nathanperry.dev> | 2024-05-08 14:15:42 -0400 |
|---|---|---|
| committer | Nathan Perry <np@nathanperry.dev> | 2024-05-08 14:16:01 -0400 |
| commit | 47817c4166937af24041a93e56ad9f841bf1e8f1 (patch) | |
| tree | a8ec0a674a5a4e5046e1bc92c1c317a48b5e4815 /src/commands/playback.rs | |
| parent | ffba60b278162707bc4eb004c3bfb6b2e9595213 (diff) | |
fixups: memes working
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(()) } |
