@vttforge/core / postRoll
Function: postRoll() ​
postRoll(
roll,options?):Promise<{message:ChatMessageLike<Record<string,unknown>> |undefined;outcome:RollOutcome; }>
Evaluate the roll if it has not been, and post it as a chat card.
js
const roll = new foundry.dice.Roll('1d20 + @str.mod', actor.getRollData());
await postRoll(roll, { actor, flavor: 'Strength check', crit: 20, fumble: 1 });Returns the created message and the outcome it was tagged with.
Parameters ​
roll ​
options? ​
PostRollOptions = {}
Returns ​
Promise<{ message: ChatMessageLike<Record<string, unknown>> | undefined; outcome: RollOutcome; }>