File "main.py", line 11 if message.author == client.user: ^ IndentationError: expected an indented block 1

File “main.py”, line 11 if message.author == client.user: ^ IndentationError: expected an indented block

 File "main.py", line 11
    if message.author == client.user: 
    ^
IndentationError: expected an indented block

Here is what the above code is Doing:
1. It’s importing the discord.py library.
2. It’s creating a new Discord client.
3. It’s defining a new event called on_message.
4. It’s checking if the message author is the bot itself.
5. It’s checking if the message content is “Hello”.
6. It’s replying to the message with “World”.
7. It’s running the bot with your token.

Similar Posts