Invalid or unexpected token, can someone help

Asked Apr 9, 2022·2 replies·Last activity 4 years ago·Open in Discord ↗
Archived from the original community forum
Things may have changed since it was written. Still stuck? Ask the community on Discord.

When I write this in nightbot

!addcom @member $(eval const responses = ['خيير؟’,’عييون البوت’,’هلا؟’,’ازعجتني يالمزعج’,’آمر وش بغيت’,’شنو فيه؟’,’تفضل’]; responses[Math.floor(Math.random() * responses.length)]; )

It says Invalid or unexpected token

2 replies

Hey @Cuddly Goat!

That's because some of your quote symbols are in fact apostrophes: instead of '.

$(eval const responses = ['خيير؟','عييون البوت','هلا؟','ازعجتني يالمزعج','آمر وش بغيت','شنو فيه؟','تفضل']; responses[Math.floor(Math.random() * responses.length)]; )

Thank you so much, that worked 🤍🤍