I found this awesome API (courtesy of former user Shannon P ) that allows a player to generate a handout by chatting "!handout" and I was wondering - is there a way to get it to also generate the contents of a handout? I have an idea for something I'd like to do in game that would necessitate being able to add text inside the handout when it generates. on('ready',function(){
"use strict";
on('chat:message',function(msg){
var player,handout;
if('api' === msg.type && msg.content.match(/^!handout/) ){
player=getObj('player',msg.playerid);
if(player){
handout=createObj('handout',{
name: 'Handout for '+player.get('displayname'),
inplayerjournals: "all",
controlledby: (playerIsGM(msg.playerid) ? '' : msg.playerid)
});
sendChat('','/w "'+player.get('displayname')+'" Created a handout for you: <a href="<a href="http://journal.roll20.net/handout/'+handout.id+" rel="nofollow">http://journal.roll20.net/handout/'+handout.id+</a>'" style="color:blue;text-decoration:underline;">Handout for '+player.get('displayname')+'</a>');
}
}
});
});