Random Response

Hi, i’m from Viet Nam.
I tried add command to response everyone by random message on youtube chat. But my command it’s not working.
My command message https://imgur.com/EtVYWHC :
$(eval a=[“BOSS mà không hay thì ai hay ở đây nữa :D”, " Thực ra thì NightBot có thể làm tốt hơn thế =))", “Nightbot thấy bình thường mà các bạn cứ quá khen”];a[Math.floor(Math.random() * a.length)])

But it shows up on youtube chat like this, when user call my command. https://imgur.com/t86dSs3
​Right-hand side of ‘instanceof’ is not an object)", “Nightbot thấy bình thường mà các bạn cứ quá khen”];a[Math.floor(Math.random() * a.length)])

I think it’s a mistake, and where is it wrong, please guide me! Sorry my english is not very well !
Please help me, thanks a lot !

@nmc237

The response with =)) at the end has parenthesis inside it. Command variables like $(eval) are closed off by parenthesis so Nightbot is basically running off incomplete code. I replaced the =)) with =D

Try this command response:

$(eval a=[`BOSS mà không hay thì ai hay ở đây nữa :D`,`Thực ra thì NightBot có thể làm tốt hơn thế =D`,`Nightbot thấy bình thường mà các bạn cứ quá khen`];a[Math.floor(Math.random()*a.length)])
1 Like

Thanks you so so so much, it’s work :smiley:

1 Like

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