From 162a83ae2b4fe75d1d47932dad555b45d7848c74 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Fri, 15 Mar 2019 14:34:32 +0000 Subject: [PATCH] Improve ship command --- commands/analyze/ship.js | 11 +++++++---- package.json | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/commands/analyze/ship.js b/commands/analyze/ship.js index 737ddf5c..55ad4a54 100644 --- a/commands/analyze/ship.js +++ b/commands/analyze/ship.js @@ -29,14 +29,17 @@ module.exports = class ShipCommand extends Command { run(msg, { first, second }) { if (first.id === second.id) return msg.reply('Shipping someone with themselves would be pretty weird.'); - const botText = first.id === this.client.user.id || second.id === this.client.user.id - ? `But ${first.id === msg.author.id || second.id === msg.author.id ? 'you\'re' : 'they\'re'} still rejected.` - : ''; + const authorInvolved = first.id === msg.author.id || second.id === msg.author.id; const random = new Random(Random.engines.mt19937().seed(Math.abs(first.id - second.id))); const level = random.integer(0, 100); + const botText = first.id === this.client.user.id || second.id === this.client.user.id + ? level >= 70 + ? `But ${authorInvolved ? 'you\'re' : 'they\'re'} still rejected.` + : `Haha even a bot thinks ${authorInvolved ? 'you\'re' : 'they\'re'} lame.` + : ''; return msg.say(oneLine` ${first.id === this.client.user.id ? 'Me' : first.username} and - ${second.id === this.client.user.id ? 'me' : second.username} have a compatability of... **${level}%**! ${botText} + ${second.id === this.client.user.id ? 'I' : second.username} have a compatability of... **${level}%**! ${botText} `); } }; diff --git a/package.json b/package.json index 4f6a3158..5baaf3fb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "102.0.0", + "version": "102.0.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {