Ask coding questions

← Back to all posts
I keep getting the same error and i dont know what it means
MariusSorensen

This is the error i'm getting: Indentationerror: unindent does not match any outer indentation level?

This is the code:
import discord
import os

client = discord.Client()

@client.event
async def on_ready():
print('We have logged in as {0.user}'.format(client))

@client
async def on_message(message):
if message.author == client.user:
return

if message.content.startswith('$hello'):
await message.channel.send('Hello!')

client.run(os.getenv('TOKEN'))

Voters
MariusSorensen
Comments
hotnewtop
NFadhlurrahman

Indent line 15 with two spaces instead of one.

MariusSorensen

@NFadhlurrahman Thank you so much! Now i am getting a different error tho. It says: TypeError 'Client' object is not callable (line 11)