Switches to other channel if in different voice channel

This commit is contained in:
Twentysix 2016-02-20 01:31:08 +01:00
parent 428ad71006
commit b753a26a77

View File

@ -513,8 +513,9 @@ class Audio:
if author.voice_channel == v_channel: if author.voice_channel == v_channel:
return True return True
elif len(v_channel.voice_members) == 1: elif len(v_channel.voice_members) == 1:
if author.is_voice_connected(): if author.voice_channel:
if author.voice_channel.permissions_for(message.server.me).connect: if author.voice_channel.permissions_for(message.server.me).connect:
wait = await self.close_audio()
await self.bot.join_voice_channel(author.voice_channel) await self.bot.join_voice_channel(author.voice_channel)
return True return True
else: else: