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 .
×
May your rolls be merry + bright! 🎄
Create a free account

Word Counter in Chat

My DM is looking for a word counter script. Should be pretty simple to write, but I just started looking through the docs and I am not seeing any callback for keyup of keydown inside of the chat window. If someone can point me in the write direction loop into or create a listener for the onChange event on the chat input I would really appreciate that! 
1705896203
The Aaron
Roll20 Production Team
API Scripter
There isn't one. The API scripts do not execute in the browser, they are run in a sandbox on a server. They don't react to typing in chat, they receive a chat event that contains the result of your entered message. The best you could do with an API script is report the number of words in an issued chat message. 
roger roger.  Thank you!