Need help with !setwins command

Hey I am a mod for several people and have set up this command up before in almost everyone stream but for some reason it is not working anymore can someone look at this and tell me what could be wrong. It hasn’t changed since the first time it was used and it worked completely fine.

!addcom !setwins -ul=mod -a=!commands edit !wins clutchings_ has $(eval var q="$(querystring)";var s=“0 wins”;if(""!=q.trim()){var wins=q.split("%2C");if(wins.length>0)s=wins.length+" wins ("+wins.join( " kills, “)+ " kills)”} s)

It’s should then be able to be edited like !setwins 13,16

So when someone in chat types !wins nightbot will then show…
Clutchings has 2 wins (13 kills, 16 kills)

But instead this is what it is showing me after you try and update it.
(NAME) has Right-hand side of ‘instanceof’ is not an object.

Please help thank you!!!

@jumpergirl375

I copied and pasted that command into my chat, and it seems to work fine. The only possible concern would be that you didn’t use straight quotes throughout the entire code.

If you want something that definitely should work, here you go:

!addcom !setwins -a=!editcom !wins cluthings_ has $(eval q=decodeURIComponent(`$(querystring)`).split(`,`).map(a=>parseInt(a.trim())+` kills`);q[0]?`${q.length} wins (${q.join(`, `)})`:`0 wins`)

Thank you very much. Not sure sure why it was not working but we got it to work now!!

Thanks again

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