Reorder params for ease to read
(options json param at the end)
This commit is contained in:
@ -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) {
|
||||
|
Reference in New Issue
Block a user