
I have some inline roll objects I want to parse, and spit out to the chat. This is just a quick fix until the shadowrun 5e API dev comes along. I have never worked with the roll20 API or javascript before. The line const roll = msg[0].inlinerolls[i] ? `[[${msg[0].inlinerolls[i].results}]]` : `<a ${circles} href="!sr5 --rollInit --error">!</a>` I want to display the inner roll data in the same way a [[/r 1d6]] would be displayed. the die are *already* rolled, this is part of a callback function. Does anyone know how I can do this? thanks! const displayInitiative = (msg,selected) => { try { let feedback = ''; log(msg[0].inlinerolls[0].results) for (let i = 0; i<selected.length; i++) { feedback += `<div style='display: inline-block; border: 1px solid ${third}; border-radius: 5px; padding: 2%; background-color: ${secondary}; margin-bottom: 3%; width: 95%;'>` feedback += `<img src='${selected[i].src}' style='margin-right: 2%; width: 20%;'>` feedback += `<label style='display: inline-block; font-weight: bold; font-size: 1.3em; color: ${third}; vertical-align: middle; width: 60%;'>${selected[i].name}</label>` const roll = msg[0].inlinerolls[i] ? `[[${msg[0].inlinerolls[i].results}]]` : `<a ${circles} href="!sr5 --rollInit --error">!</a>` feedback += `<div style='color: ${accent}; width: 15%; display: inline-block;'>${roll}</div>` feedback += `</div><br />` } sendChat(`${apiName} Roll Initiative`, `${header}</div>${feedback}</div>`); } catch (error) { errorMessage('displayInitiative', error) } },