From 34d8713c2743e3de07603e9a72122f47013ec551 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sun, 22 Apr 2018 01:32:27 +0000 Subject: [PATCH] Special case if ship users are the same --- commands/analyze/ship.js | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/analyze/ship.js b/commands/analyze/ship.js index e24332be..487f7f4c 100644 --- a/commands/analyze/ship.js +++ b/commands/analyze/ship.js @@ -26,6 +26,7 @@ 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 random = new Random(Random.engines.mt19937().seed(Math.abs(first.id - second.id))); return msg.say(`I'd give ${first.username} and ${second.username} a ${random.integer(0, 100)}%!`); } diff --git a/package.json b/package.json index 4c9974b9..75cd66be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "73.1.0", + "version": "73.1.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {