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)])
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)]}.`)