Anyone knows where's the error in this cmd?

Asked Jan 19, 2023·2 replies·Last activity 3 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.

I'm using this command to select a winner between the sender and the user mentioned but it gives me an error

$(eval a=[$(sender),$(user)];a[Math.floor(Math.random()*a.length)])

and gives me:

[Error: Unexpected end of input]*a.length)])

I got the same response using it exactly how I found it in the forum from @member (worked for them):

$(eval a=[RESPONSE_1,RESPONSE_2,RESPONSE_3];a[Math.floor(Math.random()*a.length)])

Edit: I tested in the Nightbot and it works there, so might be something about Fossabot. Most things works for both but it seems this one not.

78ce2ef29d2df35212e95642ec0abce3.png1a90f64b24edaf416b18cc71a0303e56.png

2 replies

Hiya, this is a Nightbot support forum, we can't help with Fossabot.

Yep, I'll have to find out another way, I posted it when I though it was an error of both bots