I was hoping I could somehow make a command that will find a random active user in chat that will automatically give them channel points. So far, I have:
!commands add !lottery $(urlfetch https://2g.be/twitch/activeuser.php?channel=$(channel)) has won $(customapi http://2g.be/twitch/randomnumber.php?=defstart=1&defend=1000&start=$(1)&end=$(2)) points!
However, this sometimes makes nightbot win but I wanted only active chatters. How do I make it so it gives points?