I would like to ask if there is another way how to pick a random active user via variables. I know the command !winner but I mean something like $(randomuser) or something like that, thanks.
!commands add !slap $(user) has slapped $(urlfetch https://2g.be/twitch/randomviewer.php?channel=$(channel)).
You could use something like this, it picks a random person from the chat, just change ‘yourchannel’ to the channelname.
Generating random people in chat
Useful Custom APIs
Well, that seems like it doesn’t work for me at all It says [empty response]…
Works fine for me. Did you put your own channelname in there, and there has to be someone in your channel since its picking a random viewer. I edited something though, so it should not give an empty response anymore.
Well, I just copy whole command and it didn’t work for me… And yes, I put right channelname in there. Still returning: Nightbot: BlabosCZ has slapped Empty viewer list even though there are viewers in chat.
Ah, I think I found the problem, apparently capital letters are not allowed. You don’t have to change anything, the code will change the channelname to lowercase, so just try again.
Oh, thanks! It works for me now
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.