UNPKG

la-cosa-nostra

Version:

A Mafia bot designed to run in Discord - beware the traitors and the lies!

16 lines (8 loc) 443 B
module.exports = function (player, name, category) { var attributes = player.attributes; if (category) { return attributes.some(x => x.attribute.modular && x.attribute.name.toLowerCase() === name.toLowerCase() && x.attribute["modular-details"]["cluster"].toLowerCase() === category.toLowerCase()); } else { return attributes.some(x => x.attribute.modular && x.attribute.name.toLowerCase() === name.toLowerCase()); }; };