Ask coding questions

← Back to all posts
Why does it say await is an invalid syntax?
DSoni (0)

For some reason, even though I have been using 'await' in all the code from lines 15-72, it says await is an invalid syntax. I found the lines
76-80 online and if you see anything wrong with lines 76-80 in the image below please tell me. I have taken the code off my script as it isn't working at the moment but the code is in this picture

DSoni (0)


seems like you forgot an ) at the end of line 80. Try doing that.

'role' == discord.utils.get(server.roles, name="Admin") # added )

like that.
That should work

DSoni (0)

it still has the syntax error...

helloyanis (11)

@DSoni You also forgot ): at the end of line 82!
This is your current line :

if message.content == ('give me role'

Change it to :

if message.content == ('give me role'):

@DSoni on line 82. you are missing a ) from your if statement.

if message.content == ('give me role'):

try this.