I am having trouble with my code

I was trying to build my discord server using js but here I am getting a syntax error which says SyntaxError: Invalid or unexpected token, can anyone please help me with it

Hey, @ananya0804 welcome to the forums!

When using '' for a string it can only be on one line unlike what is in your code. If you substitute it with `` it will become a multi-line string and it wont error.

1 Like

Adding on to what @not-ethan said, template literals (${}) can only be used between backticks (``).


and the message event is removed, so lines 12 to 16 wouldn’t work. I would recommend to just create slash commands instead

1 Like