From f8ca8ebeb69ba1f4eeaee9e8cc380d7a1c9453ff Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 26 Apr 2018 20:47:49 +0000 Subject: [PATCH] Inches can't be 12 --- commands/analyze/guess-looks.js | 2 +- commands/events/google-doodle.js | 5 +++-- package.json | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/commands/analyze/guess-looks.js b/commands/analyze/guess-looks.js index ca1f1b45..5dfc5a10 100644 --- a/commands/analyze/guess-looks.js +++ b/commands/analyze/guess-looks.js @@ -32,7 +32,7 @@ module.exports = class GuessLooksCommand extends Command { const hairStyle = hairStyles[random.integer(0, hairStyles.length - 1)]; const age = random.integer(10, 100); const feet = random.integer(3, 7); - const inches = random.integer(0, 12); + const inches = random.integer(0, 11); const weight = random.integer(50, 300); const extra = extras[random.integer(0, extras.length - 1)]; return msg.reply(oneLine` diff --git a/commands/events/google-doodle.js b/commands/events/google-doodle.js index c40ffc4d..9a41711a 100644 --- a/commands/events/google-doodle.js +++ b/commands/events/google-doodle.js @@ -28,8 +28,9 @@ module.exports = class GoogleDoodleCommand extends Command { async run(msg, { month, year }) { const latest = month === 'latest'; - if (latest) month = new Date().getMonth() + 1; - if (!year) year = new Date().getFullYear(); + const now = new Date(); + if (latest) month = now.getMonth() + 1; + if (!year) year = now.getFullYear(); try { const { body } = await snekfetch.get(`https://www.google.com/doodles/json/${year}/${month}`); if (!body.length) return msg.say('Could not find any results.'); diff --git a/package.json b/package.json index 1b73b44e..6b919c47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "73.2.9", + "version": "73.2.10", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {