Try to join the caller's channel before playing
This commit is contained in:
parent
37885e5572
commit
41296e003b
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue