Problem with $(user) on $(eval js)

Asked May 10, 2020·1 reply·Last activity 6 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.

Guys, I need to verify if $(user) is equals to a api response:

$(eval
var randomUser;
do{
randomUser = "$(urlfetch https://2g.be/twitch/randomviewer.php?channel=$(channel))";
}while(randomUser == "$(user)");
randomUser
)

I'm trying to get a random user, but that user can't be the same user who ran the command, so I created the loop to repeat until I get a different user, but the condition of the loop always returns false, even when the values ​​are the same. Can you help me with this?

1 reply

Hiya, I added a filter option for this, to make this a bit easier:
$(urlfetch https://2g.be/twitch/randomviewer.php?channel=$(channel)&user=$(user)&filterposter)