Help to make Rock Paper Scissors, against user and random

Asked Feb 27, 2025·3 replies·Last activity 1 year 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.

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!

3 replies

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