Random user and touser variable

Asked Aug 7, 2021·1 reply·Last activity 5 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.

Hi, I wanted to know if there is a way to make a !slap command that if used it alone shows a random user, but if someone is tagged show the $(touser)
Sorry if there is something misspelled, I don't know much English, I hope it is understood. Thanks.

1 reply

Hey @Agile Bison!

There already are a couple topics covering this type of command already, please use the search bar before opening a new topic, in the meantime here's a solution:

!addcom !slap $(eval t='$(touser)'!='$(user)'?'$(touser)':'$(urlfetch https://2g.be/twitch/randomviewer.php?channel=$(channel))'; '$(user) slaps '+t)