Parsing error unexpected token - :

qq,i make a twitch chatbot and i have trouble.when i paste token,glitch.com give me error.help me please

Why have you got a colon and token after you’ve already referenced the env variable? Just get rid of that second colon and everything after it in that line, and set the env var oauth to you token.

when i delete : bot dont work,or bot dont work always,i dont know

how to run bot

Hi, I’ve got no idea how to use the library you’re using, so I can’t help you with that. What you need to do is go to the .env file and set the oauth variable to you password (sorry I thought it was a token before). Then delete the colon and the password after it. That will get rid of the parsing error but as I said I can’t help you with making your bot work.

wrute to me in discord,please 5287#5287

Hi Nikita_Sobaken,

Change the bot.js file so that line 7 is simply:

password: process.env.oauth;

Now, go to the .env file. Make a line that is like:

oauth=lsax8w...

Make sure there are no spaces in this line.

The bot.js file will load the value from the .env file (this is what process.env refers to)

I hope this helps! :slight_smile:

2 Likes