#dice roll is [object Promise]
1 messages · Page 1 of 1 (latest)
const roll = new game.ffg.RollFFG(this.dicePool.renderDiceExpression(), this.roll.item, this.dicePool, this.roll.flavor);
await roll.toMessage({
user: game.user.id,
speaker: {
actor: game.actors.get(this.roll.data?.actor?._id),
alias: this.roll.data?.token?.name,
token: this.roll.data?.token?._id,
},
flavor: `${game.i18n.localize("SWFFG.Rolling")} ${game.i18n.localize(this.roll.skillName)}...`,
});
and then toMessage
// Perform the roll, if it has not yet been rolled
if (!this._evaluated) await this.evaluate();
// other stuff
// Either create the message or just return the chat data
const cls = getDocumentClass("ChatMessage");
const msg = new cls(messageData);
if (rMode) msg.applyRollMode(rollMode);
// Either create or return the data
return create ? await cls.create(msg) : msg;
here are the actual changes I made, FWIW - https://github.com/StarWarsFoundryVTT/StarWarsFFG/commit/c9033ca8e701a9c778f503c6f044755520baabc0
btw you can add syntax highlighting by adding the extension inline at the top like ```js
what's the context for this?
initially it's a roll-builder, in the second block it's the (extended) roll object
I think your Promise.all needs to use Resolve
are you sure that this.terms is correct after that bit?
relatively
could also be the part with this.results
also looks correct
yeah you might want to use the proper browser debugger tools to step through things and figure out where it's weird
I've stepped through it and, so far as I can tell, they are all resolved