This commit is contained in:
Daniel Odendahl Jr
2018-02-21 22:23:07 +00:00
parent de3d5be50c
commit c8f0c5b70e
+2 -2
View File
@@ -31,8 +31,8 @@ module.exports = class ToxicityCommand extends Command {
requestedAttributes: { TOXICITY: {} }
});
const toxicity = Math.round(body.attributeScores.TOXICITY.summaryScore.value * 100);
if (toxicity < 70) return msg.say(`Likely to be perceived as toxic. (${toxicity}%)`);
if (toxicity < 40) return msg.say(`Unsure if this will be perceived as toxic. (${toxicity}%)`);
if (toxicity >= 70) return msg.say(`Likely to be perceived as toxic. (${toxicity}%)`);
if (toxicity >= 40) return msg.say(`Unsure if this will be perceived as toxic. (${toxicity}%)`);
return msg.say(`Unlikely to be perceived as toxic. (${toxicity}%)`);
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);