ported emote.py from fiolina to emote.js for wintermute