Im a Mod for a twitch channel and im wondering if a command can add the users name to a pastebin behind the scenes if they hit a specific number on a RNG command.
ex. TheShreddingMonkey: !roll
nightbot:(if 100) Welcome to the club! (then adds my username to a pastebin list)
Then I can do another command like !rngods or something and itll post a link to that pastebin in chat.
It works perfectly. I do have one question though, how do I get it to include the user in the answer so I know who rolled the number. On the chance that two people both do the command near same time, I wouldnt know whos command went through. I’ve tried adding ${user} in parts of the command but cant get it right.
$(eval a=`$(urlfetch https://twitch.center/customapi/addquote?token=$(1))`;b=$(2);if(b==100){c=`$(user) welcome to the club`}else{c=`$(user) rolled a ${b}.`};c)
The words inside the qoutes after c= are the two responses.