Updated Blind Roll

1506613613
I've been using this script for two or so years. Grabbed it off a forum message here; not sure who the author is.  on("chat:message", function(msg) {     var cmdName = "!broll ";     var msgTxt = msg.content;     var msgWho = msg.who;     var msgFormula = msgTxt.slice(cmdName.length);     if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) {         sendChat(msgWho, "/gmroll " + msgFormula); sendChat(msgWho, "/w " + msgWho + " secret roll sent to GM (" + msgFormula + ")");   }; }); I was wondering if it was ever updated to use inline rolls or if another script exists like it that I can use with inline rolls? Thanks!
1506615120
The Aaron
Pro
API Scripter
As in, you want it to send you the roll inline? on("chat:message", function(msg) {     var cmdName = "!broll ";     var msgTxt = msg.content;     var msgWho = msg.who;     var msgFormula = msgTxt.slice(cmdName.length);     if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) {         sendChat(msgWho, `/w gm [[${msgFormula}]]`); sendChat(msgWho, "/w " + msgWho + " secret roll sent to GM (" + msgFormula + ")");   }; });
1506617415
Exactly. The script you quickly wrote up there gives me this as an output of [[1d20]] [[$[[0]]]] 6:48PM(From Erich S. (GM)): S. (GM) secret roll sent to GM ($[[0]])
1506617703
The Aaron
Pro
API Scripter
You'd still call it with the formula: !broll 1d20+3
1506619712
Ah, I was thinking of brackets.  Can it be modded to add verbiage behind it? Like !broll 1d20+3 Search check?
1506620078
The Aaron
Pro
API Scripter
How about: on("chat:message", function(msg) {     var cmdName = "!broll ";     var msgTxt = msg.content;     var msgWho = msg.who;     var msgArgs = msgTxt.slice(cmdName.length).split(/\s+--/);     if(msg.type == "api" && msgTxt.indexOf(cmdName) !== -1) {         sendChat(msgWho, `/w gm [[${msgArgs[0]}]]${msgArgs.length>1?` ${msgArgs[1]}`:''}`); sendChat(msgWho, `/w "${msgWho}" secret roll sent to GM ( ${msgArgs[0]} )${msgArgs.length>1?` [${msgArgs[1]}]`:''}`);   }; }); Call with: !broll 1d20+3 --Some text that shows up with the roll
1506620631
Hey, that worked. Thanks for the prompt and concise remedy to my dire need to hide dice from prying eyes. My players will learn to snarl and whine at the mention of your name. At least whine... 7:39PM(From Erich S. (GM)):4 The Aaron reveled in your failure to roll high!
1506620786
The Aaron
Pro
API Scripter
HAHAHAHAAHAH =D  No problem.