-5

SyntaxError: Unexpected token (
The problem is in (bot). This part of the code:

let task = async (bot) => {

2
  • What are you trying to do? Commented Aug 3, 2018 at 14:32
  • Please read first a tutorial about async/await: javascript.info/async-await Commented Aug 3, 2018 at 14:33

1 Answer 1

4

Async functions are not supported by Node versions older than version 7.6.

You'll need to transpile your code (e.g. using Babel) to a version of JS that Node understands if you are using an older version.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.