diff --git a/commands/events/horoscope.js b/commands/events/horoscope.js index 433b582e..c9efe470 100644 --- a/commands/events/horoscope.js +++ b/commands/events/horoscope.js @@ -27,8 +27,7 @@ module.exports = class HoroscopeCommand extends Command { async run(msg, { sign }) { try { - const { raw } = await snekfetch.get(`http://sandipbgt.com/theastrologer/api/horoscope/${sign}/today/`); - const body = JSON.parse(raw.toString()); + const { body } = await snekfetch.get(`http://theastrologer-api.herokuapp.com/api/horoscope/${sign}/today`); const embed = new MessageEmbed() .setColor(0x9797FF) .setTitle(`Horoscope for ${body.sunsign}...`) diff --git a/commands/games/battle.js b/commands/games/battle.js index bac40f0d..bcc3d85d 100644 --- a/commands/games/battle.js +++ b/commands/games/battle.js @@ -57,7 +57,7 @@ module.exports = class BattleCommand extends Command { let choice; if (!opponent.bot || (opponent.bot && userTurn)) { await msg.say(stripIndents` - ${user}, do you **fight**, **guard**, **special**, or **run**? + ${user.toString()}, do you **fight**, **guard**, **special**, or **run**? **${msg.author.username}**: ${userHP}HP **${opponent.username}**: ${oppoHP}HP `); @@ -104,10 +104,12 @@ module.exports = class BattleCommand extends Command { } this.fighting.delete(msg.channel.id); const userWin = userHP > oppoHP; + const winner = userWin ? `${msg.author} (${userHP}HP)` : `${opponent} (${oppoHP}HP)`; + const loser = userWin ? `${opponent} (${oppoHP}HP)` : `${msg.author} (${userHP}HP)`; return msg.say(stripIndents` The match is over! - **Winner**: ${userWin ? `${msg.author} (${userHP}HP)` : `${opponent} (${oppoHP}HP)`} - **Loser**: ${userWin ? `${opponent} (${oppoHP}HP)` : `${msg.author} (${userHP}HP)`} + **Winner**: ${winner} + **Loser**: ${loser} `); } catch (err) { this.fighting.delete(msg.channel.id); diff --git a/commands/games/emoji-emoji-revolution.js b/commands/games/emoji-emoji-revolution.js index 15d7084f..91f0a45e 100644 --- a/commands/games/emoji-emoji-revolution.js +++ b/commands/games/emoji-emoji-revolution.js @@ -56,7 +56,7 @@ module.exports = class EmojiEmojiRevolutionCommand extends Command { if (winner.id === msg.author.id) ++aPts; else ++oPts; await msg.say(stripIndents` - ${winner} won this round! + ${winner.toString()} won this round! **${msg.author.username}**: ${aPts} **${opponent.username}**: ${oPts} `); diff --git a/commands/games/tic-tac-toe.js b/commands/games/tic-tac-toe.js index 56583bdf..73fd2bbb 100644 --- a/commands/games/tic-tac-toe.js +++ b/commands/games/tic-tac-toe.js @@ -42,7 +42,7 @@ module.exports = class TicTacToeCommand extends Command { const user = userTurn ? msg.author : opponent; const sign = userTurn ? 'X' : 'O'; await msg.say(stripIndents` - ${user}, which side do you pick? + ${user.toString()}, which side do you pick? \`\`\` ${sides[0]} | ${sides[1]} | ${sides[2]} ————————— diff --git a/package.json b/package.json index c91b3470..a2fd90d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "75.0.2", + "version": "75.0.3", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {