So, it will largely come down to interface. The very simplest script I can write for this is: on('ready',()=>on('chat:message',(msg)=>{
if('api'===msg.type && /^!roll\b/i.test(msg.content)){
let roll = randomInteger(20);
let res = roll + (20===roll ? 10 : 0) - (1===roll ? 10 : 0);
sendChat(msg.who,`Roll: ${res} (${roll})`);
}
}));
!roll This is probably not even close to what you need, but that shows how you can start to get there.