Reputation: 53
I have been making a currency discord bot in python but i have been getting a Syntax error whenever I run this code.
users = await.get.mainbank.data()
SyntaxError: invalid syntax
Does anyone know what to do to remove this error?
Upvotes: 0
Views: 71
Reputation: 373
Most likely this is because the await
Keyword is not valid to use as a variable, if that is what you are doing.
If you are trying to await a function, you would use await whatToAwait()
. If you wanted to await the function get.mainbank.data()
, you would use
await get.mainbank.data()
Though, I do not think this is what you want.
Upvotes: 2
Reputation: 634
This question would normally be unanswerable(you provided no code),however, you gave us one line: users = await.get.mainbank.data()
. I would recommend that you learn some more async stuff, however, the quick fix(assuming get.mainbank.data() is valid) is to change this to users = await get.mainbank.data()
Upvotes: 0