Why is this having a syntaxerror?
@client.event async def on_message(message): if message.author == client.user: return if message.content.startswith('$hello'): await message.channel.send('Hello!') @client.command(pass_context = True) async def join(ctx): if (ctx.author.voice): channel = ctx.message.author.voice.channel await channel.connect() else: await ctx.send('You are not in a voice channel, you must be in a voice channel to run this command!') @client.command(pass_context = True) async def leave(ctx): if (ctx.voice_client): await ctx.guild.voice_client.disconnect() await ctx.send('I left the Voice Channel') else: await ctx.send("I am not in a voice channel")
Its only the async def parts thats having this error.
Voters
Like Coder100 said, line 10 is missing a
)
at the end, so just add that on and it should be fine :P@QuickV Brooooo._.thx.
No problem :) @MrDeer