From c32ec508607426d919e7371ac6feb78d9bcb173b Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Fri, 1 May 2020 10:06:07 -0400 Subject: [PATCH] Fix hangman definition being empty --- commands/games-sp/hangman.js | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/commands/games-sp/hangman.js b/commands/games-sp/hangman.js index 42a6b89d..5cc8095f 100644 --- a/commands/games-sp/hangman.js +++ b/commands/games-sp/hangman.js @@ -90,15 +90,15 @@ module.exports = class HangmanCommand extends Command { return msg.say(stripIndents` You won, it was ${word}! - **${defined.name}** (${defined.partOfSpeech}) - ${defined.definiton} + ${defined ? `**${defined.name}** (${defined.partOfSpeech})` : ''} + ${defined ? defined.definiton : ''} `); } return msg.say(stripIndents` Too bad... It was ${word}... - **${defined.name}** (${defined.partOfSpeech}) - ${defined.definiton} + ${defined ? `**${defined.name}** (${defined.partOfSpeech})` : ''} + ${defined ? defined.definiton : ''} `); } catch (err) { this.client.games.delete(msg.channel.id); diff --git a/package.json b/package.json index 78721535..e5213f9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "114.0.0", + "version": "114.0.1", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {