Reorder params for ease to read

(options json param at the end)
This commit is contained in:
Vincent Vandemeulebrouck
2021-01-09 19:36:19 +01:00
parent e7b9070cf1
commit b611cc9092
5 changed files with 24 additions and 25 deletions

View File

@ -3,21 +3,20 @@
* Class providing helper methods to get the list of users, and
*/
export class ChatUtility {
/* -------------------------------------------- */
static removeMyChatMessageContaining(part) {
const toDelete = game.messages.filter(it => it.user._id == game.user._id)
.filter(it => it.data.content.includes(part));
toDelete.forEach(it => it.delete());
}
/* -------------------------------------------- */
static chatWithRollMode(chatOptions, name) {
let rollMode = game.settings.get("core", "rollMode");
ChatUtility.createChatMessage(chatOptions, rollMode, name);
static createChatWithRollMode(name, chatOptions) {
ChatUtility.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions);
}
/* -------------------------------------------- */
static createChatMessage(chatOptions, rollMode, name) {
static createChatMessage(name, rollMode, chatOptions) {
switch (rollMode) {
case "blindroll": // GM only
if (!game.user.isGM) {