Last active
December 28, 2015 01:59
-
-
Save goblinHordes/7424756 to your computer and use it in GitHub Desktop.
apicmd.r20.js - Roll20 API hooks for apicmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apicmd.on('apicmd', '[options] info', | |
[['-e', '--echo', 'echos the remaining arguments back to chat']], | |
function (msg, argv){ | |
if(argv.opts.echo){ | |
sendChat('API', '/desc ' + argv.args.join(' ')); | |
return; | |
}; | |
}); | |
on('chat:message', function(msg) { | |
if(msg.type == 'api'){ | |
apicmd.call(msg) | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment