![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
My GTalk bot (randrewsbot@gmail.com) does something useful now: it rolls dice. I'll make a post later introducing the library and such if people want to write their own, but for now, here's an example bot (minus the parser):
/*extern load */ load('bot-framework.js'); /*extern gtBot */ load('dice.js'); /*extern rollExpression */ var logout= gtBot('randrewsbot','mypassword', function(username){ return function(line){ var result=rollExpression(line); if(result===null){ return "I roll dice. Say something like 2d6+1d4-3"; }else{ return result; } }; });