Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

API script and whispering

1597611014

Edited 1597611053
Hello.  I'm just starting to play around with API scripts and first thing I noticed is that execution of any API commands executed via chat must be done publicly.  Namely, when sending the command text with /talktomyself on, it will just eat them up seemingly without execution and when combined with whispering will just out put the text, again seemingly without execution.  Hence, to execute a command, it has to always be done publicly I'm deducing.  I just want to verify this is correct.  Thank you. 
1597611871

Edited 1597612030
vÍnce
Pro
Sheet Author
API commands are not recognized when using /talktomyself  API scripts may or may not handle whispers.  I would check the help/docs for a given script to see how/if whispers are handled.  Cheers
Right and same when whispering.
1597612189
vÍnce
Pro
Sheet Author
aisforanagrams said: Right and same when whispering. Correct. I suppose everything could be considered a whisper when using /talktomyself. ;-)
1597615600
GiGs
Pro
Sheet Author
API Scripter
While API commands must be done publicly, the command is not actually visible in chat, so it doenst matter. The script output is completely separate from the command used to trigger it, and whether that output is public or private is dependent on the way the script is written. 
1597615795

Edited 1597615823
GiGs, while true, most scripts have at the least, some kind of command line style --help output (that I've noticed so far), which I generally wouldn't want to output to players during the game and clutter things up.  But, it's a minor point.
1597616063
GiGs
Pro
Sheet Author
API Scripter
True. i think help commands are usually set to whisper to the person who triggered them. Its very likely some script writers dont write them in that way, and in that case the only thing to do is edit the script or ask the writer to edit it. The main point is: even if you could whisper the script command, it wouldnt change how the script sends its output to chat. Whether it is whispered or not is set inside the script. Some script writers give the option to whisper output, others don't.
1597616090

Edited 1597616135
That's why most scripts incorporate either a permanent '/w gm' prefix or '/w triggeringplayer' with an isGM check to avoid normal players from changing configuration files. Whichever script that doesn't have that would have to be slightly changed to incorporate either prefix.
GiGs said: The main point is: even if you could whisper the script command, it wouldnt change how the script sends its output to chat. Whether it is whispered or not is set inside the script. Some script writers give the option to whisper output, others don't. Ideally, it would be nice to have a layer that would capture script outputs and redirect them to a whisper regardless of the script itself. Personally speaking.
1597617877
GiGs
Pro
Sheet Author
API Scripter
aisforanagrams said: GiGs said: The main point is: even if you could whisper the script command, it wouldnt change how the script sends its output to chat. Whether it is whispered or not is set inside the script. Some script writers give the option to whisper output, others don't. Ideally, it would be nice to have a layer that would capture script outputs and redirect them to a whisper regardless of the script itself. Personally speaking. I agree, such a feature would be nice. I was just explaining how things work now.