mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-07 23:05:04 +02:00
Fix horoscope and stripIndents mentions
This commit is contained in:
@@ -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}...`)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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}
|
||||
`);
|
||||
|
||||
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "75.0.2",
|
||||
"version": "75.0.3",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user