Fix horoscope and stripIndents mentions

This commit is contained in:
Daniel Odendahl Jr
2018-05-02 11:00:16 +00:00
parent 568707bb17
commit 104eb56e54
5 changed files with 9 additions and 8 deletions
+1 -2
View File
@@ -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}...`)
+5 -3
View File
@@ -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);
+1 -1
View File
@@ -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}
`);
+1 -1
View File
@@ -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]}
—————————
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "75.0.2",
"version": "75.0.3",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {