Here is code:
@client.command(pass_context=True)
async def join(ctx):
global voice1
global channel1
channel1 = ctx.author.voice.channel
voice1 = get(client.voice_clients, guild=ctx.guild)
if voice1 and voice1.is_connected():
await voice1.move_to(channel1)
else:
await channel1.connect()
await ctx.send(f"joined {channel1}")
I got this error:
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError:
'VoiceClient' object has no attribute 'ws'
I try make a music bot