foundryvtt-reve-de-dragon/module/rdd-roll-result.js

18 lines
606 B
JavaScript
Raw Permalink Normal View History

import { ChatUtility } from "./chat-utility.js";
export class RdDRollResult {
2025-01-27 22:13:33 +01:00
static async displayRollData(rollData, actor = undefined, template = 'chat-resultat-general.hbs') {
const chatMessage = await ChatUtility.createChatWithRollMode(
{ content: await RdDRollResult.buildRollDataHtml(rollData, template) },
actor
)
return chatMessage
}
2025-01-27 22:13:33 +01:00
static async buildRollDataHtml(rollData, template = 'chat-resultat-general.hbs') {
rollData.show = rollData.show || {};
return await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/${template}`, rollData);
}
}