I'm making a script that sets dice tokens (the ones dragged onto the table from chat) to be controlled by all players. What I have so far is just listening to `add:token` and setting `controlledby`. on('add:token', tok=>{
tok.set('controlledby', 'all')
}) ...that works fine, but it changes all tokens on creation. Ideally, I'd like to look for some property of `tok` in there to only do this for dice tokens, but I'm not sure what to check for on those objects. I'm seeing some consistent portions of the `imgsrc` and `sides` properties, but I'm not sure if those will be reliable between games, pages, etc. {
"_id": "-Nj9Konx97GwuoWRrQRd",
"_pageid": "-Nj4peOfoo40_aom8KKr",
"left": 872,
"top": 115,
"width": 70,
"height": 70,
"rotation": 0,
"layer": "objects",
"isdrawing": true,
"imgsrc": "<a href="https://s3.amazonaws.com/files.d20.io/images/779535/vkc_PT4z-d_ON1MvfHaCiA/thumb.png?1363049999" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/779535/vkc_PT4z-d_ON1MvfHaCiA/thumb.png?1363049999</a>",
"sides": "https%3A//s3.amazonaws.com/files.d20.io/images/779533/-gS85HUaXIvmE5SjGpoH4w/thumb.png%3F1363049998|\
https%3A//s3.amazonaws.com/files.d20.io/images/779535/vkc_PT4z-d_ON1MvfHaCiA/thumb.png%3F1363049999|\
https%3A//s3.amazonaws.com/files.d20.io/images/779534/mHDadFirie4L12_ii-HYqQ/thumb.png%3F1363049998|\
https%3A//s3.amazonaws.com/files.d20.io/images/779531/nXqp2BhdwVsQn7cDR3cMlg/thumb.png%3F1363049998|\
https%3A//s3.amazonaws.com/files.d20.io/images/779532/nQD5_IXYLWN7YCjnd5zugA/thumb.png%3F1363049998|\
https%3A//s3.amazonaws.com/files.d20.io/images/779536/ttiwwiWE2PVkhD2d7fV3GA/thumb.png%3F1363049999",
"currentSide": 1,
"_type": "graphic",
"_subtype": "token",
"_cardid": "",
} Anyone know if there's a definitive property I could look for that tells me "this is definitely a dice token?"