Ask coding questions

← Back to all posts
Unvalid syntax
Ekylytra (0)

What should it be? Discord bot need help! unvalid syntax 2nd last line


First off, it's invalid instead of unvalid. Sorry if I sound kind of harsh, it's just I'm very TRIGGERED!!! Ok, now we got that out of the way, it's pretty simple. You put an extra : at line 75. Because you put that there, the computer thinks it's an if statement, when it is not, so it looks to line 76. There's nothing there, so then it moves to line 77. It's not indented, so it ignores it all. There. Hopefully that helped!


@SyedAliAli6 Sir, please remove the comma after encouragements in line 75, and get rid of the : after the final parentheses. Also, out of curiosity, did you get the idea from freecodecamp's YouTube channel? This seems awfully similar...

Ekylytra (0)

@Aphmeta File "", line 61
SyntaxError: invalid syntax


@SyedAliAli6 get rid of the period after await in line 61, then replace that with a space

Wumi4 (542)

You put an extra comma and the end of the code at line 75.