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

Help on a script feature

Hi I'm trying to send through API script a message to the gm(myself) that is a clickable button which do /gr SOME_NUMBER_SET_FROM_API &{tracker} so i can set some missing token init on the fly, but i can't figure out how to do that i've tried the sendChat function with and without /direct but nothing works as i would like i tried to send <button type="roll" value="/gr SOME_NUMBER_SET_FROM_API &{tracker}">btn</button> and <a href="/gr SOME_NUMBER_SET_FROM_API &{tracker}">btn</a> if anyone have an idea i'd be really glad ! Have a great day everyone
1651649974
Oosh
Sheet Author
API Scripter
Either of these should work: sendChat('', `<a href="\`/gr 1d20 &{tracker}">btn</a>`); sendChat('', `[Roll](\`/gr 1d20 &{tracker})`);
1651807529

Edited 1651808525
Thanks a lot ! i successfully sent the 1st one you provided (only tried this one because i want to style it), but it didn't work when sending it with /w gm, do you have any idea about that ? Anyway, its already really helpfull, Thanks !!!