mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-04 07:46:43 +02:00
Fix
This commit is contained in:
@@ -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!`);
|
||||
|
||||
Reference in New Issue
Block a user