Ajout async sur displayRollData

Préparation pour récupérer le message affiché et lui ajouter des flags
This commit is contained in:
Vincent Vandemeulebrouck
2022-01-29 18:50:37 +01:00
parent c0b5bb3f35
commit 3ae3003be3
4 changed files with 26 additions and 26 deletions

View File

@ -66,7 +66,7 @@ export class ChatUtility {
/* -------------------------------------------- */
static removeMessages(data) {
if (Misc.isUniqueConnectedGM()){
if (Misc.isUniqueConnectedGM()) {
ChatUtility.onRemoveMessages(data);
}
else {
@ -86,12 +86,12 @@ export class ChatUtility {
}
/* -------------------------------------------- */
static createChatWithRollMode(name, chatOptions) {
ChatUtility.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions);
static async createChatWithRollMode(name, chatOptions) {
return await ChatUtility.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions);
}
/* -------------------------------------------- */
static createChatMessage(name, rollMode, chatOptions) {
static async createChatMessage(name, rollMode, chatOptions) {
switch (rollMode) {
case "blindroll": // GM only
if (!game.user.isGM) {
@ -109,7 +109,7 @@ export class ChatUtility {
break;
}
chatOptions.alias = chatOptions.alias || name;
ChatMessage.create(chatOptions);
return await ChatMessage.create(chatOptions);
}
/* -------------------------------------------- */