Macro Help: Adding A # To A Rolltable
Can anyone help with a macro that will prompt me to add a number to the rolltable's dice roll?
Currently it brings up the menu to input it, but nothing is rolled.
const table = await foundry.utils.fromUuid("UUID Here");
const reponse =
await foundry.applications.api.Dialog.input({
window: { title: "Roll Table"},
content: '<input type="number" name="mod" value="0" autofocus>',
ok: {
label: "Roll",
icon: "fa-solid fa-dice-d20",
}});
if(!response) return;
table.draw({ roll: foundry.dice.Roll.create(`${table.formula} + ${response.mod}`) })