v9 - roll now async (sync is removed in v10)

This commit is contained in:
Vlyan
2021-12-21 12:50:59 +01:00
parent 8080016b6a
commit 2173cc6150
5 changed files with 11 additions and 11 deletions

View File

@@ -68,7 +68,7 @@ export default class HooksL5r5e {
* @param {string} userId
* @return {boolean}
*/
static preCreateChatMessage(document, data, options, userId) {
static async preCreateChatMessage(document, data, options, userId) {
// Roll from DP have the "isL5r5eTemplate" option set
if (!document.isRoll || options?.isL5r5eTemplate || !document.data?.roll) {
return;
@@ -83,7 +83,7 @@ export default class HooksL5r5e {
}
// So now we have our wrong message only, redo it using the roll
roll.toMessage();
await roll.toMessage();
// Return false to let the system known we handled this
return false;