Skip to content

Instantly share code, notes, and snippets.

@Bastlifa
Created November 4, 2017 21:26
Show Gist options
  • Save Bastlifa/d900ede441a5045014ea29a96cacf472 to your computer and use it in GitHub Desktop.
Save Bastlifa/d900ede441a5045014ea29a96cacf472 to your computer and use it in GitHub Desktop.
Removes GM Whispers From Characters in Roll20
on("ready", function() {
on("chat:message", function (msg) {
if (msg.type === "api" && msg.content === "!NoWhisper")
{
var characters = findObjs({type: 'character'});
for (var i=0; i<characters.length; i++)
{
if (getAttrByName(characters[i].id, 'wtype'))
{
findObjs({_type: 'attribute', _characterid: characters[i].id, name: 'wtype'})[0].set('current', "");
}
}
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment