Help to make Rock Paper Scissors, against user and random

I’m trying to work out how to add two new commands to play rock paper scissors against a specific user or a random user (if it is possible to have one command that works for both, filling in a random user if you don’t specifically @ someone that would be great, unsure if that’s possible) but I’m super new to custom commands and can’t find anything that seems to be what I’m looking for, separate or combined command. Any help is hugely appreciated!

I do not believe you’ll be able to select a user at random, but you can create commands targeting specific users with variables: https://docs.nightbot.tv/variables/touser

Try:

$(eval a=[`won`,`drew`,`lost`];b=[`a rock`,`paper`,`scissors`];r=x=>x[Math.floor(Math.random()*x.length)];t=`$(query)`.replace(/@/g,``)||`$(urlfetch https://muckzz.com/random_viewer/$(channel))`;`$(user) fought ${t} and ${r(a)} with ${r(b)}`;)

thank you! This worked perfectly, you’ve saved my tired little brain

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