Random viewer or targeted viewer command

Hi learned friends! Wondering if any of you can help with this. I’m trying to create a command which allows me to target either (1) random viewers in the Twitch chat when I just type the command, or (2) a selected viewer when I @ them.

So for example:

  • if I type “!snipe” it would return: “Oi, [random viewer’s name], mate! Are you stream sniping right now?! Reveal yourself!”
  • if I type “!snipe @Frank” it would return: “Oi, Frank, mate! Are you stream sniping right now?! Reveal yourself!”

I know how to make a command using $(urlfetch https://2g.be/twitch/randomviewer.php?channel=$(channel)) to pull a random user from chat and I know how to make a command using $(touser) to target specific users, but I have no idea how to make a combination command.

Help please! Thanks in advance!

Hey @thenoirman!

We already answered that question many times before, please use the search bar before opening a new topic, I invite you to a journey towards the solution:

Hi Emily! Thanks so much for pointing me to the answer. My apologies as well for starting a new topic on this already answered question. Thanks again though and much appreciated.

1 Like

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