foundry-vtt-community/macros

Incorrect macro update

kandashi opened this issue · 2 comments

for(let nextToken of canvas.tokens.placeables) {
if (nextToken.actor.data.token.randomImg) {
let tokenImgArray = await game.actors.get(nextToken.actor.id).getTokenImages();
let imageChoice = Math.floor(Math.random() * tokenImgArray.length);
let image = tokenImgArray[imageChoice]
await nextToken.document.update({ "img": image })
}
}
this is the "correct" update for v9 compatibility

Sorry about that. This has been corrected in the v9.7 release.