Random answers for the night bot

Asked Oct 24, 2020·1 reply·Last activity 5 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.

hey im trying to use a command saw somoene using before its like random answers like

!addcom Noob $(eval const responses = ['da nub ', 'baka , 'THeLastnoob ', ' da cat ', catman ', 'TLNW', 'wanna bully him? ', ' timeout this nub ؟', ' he is watching ', ' kill him', '', 'noobi', 'the bot',TheLastNoobWarrior', 'nub' ]; responses[ Math.floor ( Math.random () * responses.length )];)
when someone write noob the bot randomly answers with one of those thats what i saw can someone help me and tell me why the bot says
Unexpected identifier

1 reply

Well you should be using “ \` ” instead of “ ‘ ” and “ ’ ”
Also “TheLastNoobWarrior”, “baka”, and “catman” are missing a back tick.
Try this:

!addcom Noob $(eval responses=[`da nub`,`baka`,`THeLastnoob`,`da cat`,`catman`,`TLNW`,`wanna bully him?`,`timeout this nub`,`he is watching`,`kill him`,` `,`noobi`,`the bot`,`TheLastNoobWarrior`,`nub`];responses[Math.floor(Math.random()*responses.length)])

Also idk if this is intended or not but there is a response that just returns nothing.