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!