From f99cf80e0f76eff784cccac18612d947929cabbc Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 26 Apr 2018 13:10:13 +0000 Subject: [PATCH] make guess looks a proper analyzer --- commands/analyze/guess-looks.js | 8 +++++--- package.json | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/commands/analyze/guess-looks.js b/commands/analyze/guess-looks.js index fc9ebee5..ca1f1b45 100644 --- a/commands/analyze/guess-looks.js +++ b/commands/analyze/guess-looks.js @@ -24,6 +24,7 @@ module.exports = class GuessLooksCommand extends Command { } run(msg, { user }) { + const authorUser = user.id === msg.author.id; const random = new Random(Random.engines.mt19937().seed(user.id)); const gender = genders[random.integer(0, genders.length - 1)]; const eyeColor = eyeColors[random.integer(0, eyeColors.length - 1)]; @@ -34,9 +35,10 @@ module.exports = class GuessLooksCommand extends Command { const inches = random.integer(0, 12); const weight = random.integer(50, 300); const extra = extras[random.integer(0, extras.length - 1)]; - return msg.say(oneLine` - I think ${user.username} is a ${age} year old ${gender} with ${eyeColor} eyes and ${hairStyle} ${hairColor} - hair. They are ${feet}'${inches}" and weigh ${weight} pounds. Don't forget the ${extra}! + return msg.reply(oneLine` + I think ${authorUser ? 'you are' : `${user.username} is`} a ${age} year old ${gender} with ${eyeColor} eyes + and ${hairStyle} ${hairColor} hair. ${authorUser ? 'You are' : `${gender === 'male' ? 'He' : 'She'} is`} + ${feet}'${inches}" and weigh${authorUser ? '' : 's'} ${weight} pounds. Don't forget the ${extra}! `); } }; diff --git a/package.json b/package.json index 7c540148..1b73b44e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "73.2.8", + "version": "73.2.9", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {