Help with a Command

Hi, im completely new to creating commands for night bot. ive been making commands for a friend who streams phasmopobia. i managed to make one to randomly choose a map for the game but im trying to make one to randomly guess the ghost type but i keep getting

Unexpected string [:1:159]

can anyone help/explain what to do?

$(eval const responses = [‘Spirit’, ‘Poltergeist’, ‘Mare’, ‘Demon’, ‘Yokia’, ‘Myling’, ‘Raiju’, ‘Moroi’, ‘Wraith’, ‘Banshee’, ‘Revenant’, ‘Yurei’, ‘Hantu’, ‘Onryo,’ ‘Obake,’ ‘Deogen,’ ‘Phantom,’ ‘Jinn,’ ‘Shade,’ ‘Oni,’ ‘Goryo,’ The Twins,’ ‘The Mimic,’ ‘Thaye,’];responses[Math.floor(Math.random() * responses.length)]; )

thank you!
the space between the last bracket and the semi colon is to stop it appearing as a emoji

Try:

 $(eval const responses = ['Spirit', 'Poltergeist', 'Mare', 'Demon', 'Yokia', 'Myling', 'Raiju', 'Moroi', 'Wraith', 'Banshee', 'Revenant', 'Yurei', 'Hantu', 'Onryo', 'Obake', 'Deogen', 'Phantom', 'Jinn', 'Shade', 'Oni', 'Goryo', 'The Twins', 'The Mimic', 'Thaye']; responses[Math.floor(Math.random() * responses.length)])

Perfect! thank you! works perfectly!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.