Ask coding questions

← Back to all posts
syntax error :(
FunnySusMan420

i've been trying to make a discord bot in python(unfinished) but i keep on getting a invalid syntax error on row 10.how do i fix this?

Voters
ch1ck3n
FunnySusMan420
Comments
hotnewtop
RYANTADIPARTHI

Solution

your error is because on the line above 10, you have indented @client.event, this is wrong. Try this code.

you also have multiple indentation errors. Your overall code should look like this.

like that. Remember to only indent if you see a : on the line above.
Thats should work

VinPetrolGod

@RYANTADIPARTHI I literally copy pasted your code, but it stills shows an error. pls help me