Nightbot edit command?

I have this code where if the $(user) leaves $(query) blank it will select a random user and if user chooses to @ a user it will select the $(touser) but I’m trying to exclude nightbot , wizebot from random user ? How would i do this

This is what i have now?

$(eval a=decodeURIComponent($(querystring)).replace(/@/g,``);a?a:$(urlfetch https://decapi.me/twitch/random_user/$(channel)?exclude=Nightbot,Wizebot)) and he $(eval a=[Won,Lost];a[Math.floor(Math.random()*a.length)])

Hey @Cyrensy!

Looks like it’d work, I improved it slightly though if you’re interested:

$(eval `$(query)`?a=`$(touser)`:a=`$(urlfetch https://decapi.me/twitch/random_user/$(channel)?exclude=nightbot,wizebot)`;b=[`won`,`lost`];`$(user) started a fight with ${a} and they ${b[Math.floor(Math.random()*2)]}.`)
1 Like

Thank you! Have a wonderful day/night emily!

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