From 41296e003b539eede34ad7fa8152f6ab90381b3d Mon Sep 17 00:00:00 2001 From: Alex Page Date: Thu, 20 Jan 2022 22:05:45 -0500 Subject: [PATCH] Try to join the caller's channel before playing --- src/commands.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/commands.rs b/src/commands.rs index aec1f7b..099b189 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -83,6 +83,11 @@ pub async fn play(ctx: &mut Context, command: &ApplicationCommandInteraction) -> .expect("Songbird Voice client placed in at initialisation.") .clone(); + // Try to join the caller's channel + if manager.get(guild_id).is_none() { + join(ctx, command).await; + } + if let Some(handler_lock) = manager.get(guild_id) { let mut handler = handler_lock.lock().await;