More Prettify

This commit is contained in:
Daniel Odendahl Jr
2017-05-28 14:58:52 +00:00
parent 4bd10517f1
commit 0b3a0a30f2
+4 -4
View File
@@ -27,14 +27,14 @@ module.exports = class BattleCommand extends Command {
if (opponent.id === msg.author.id) return msg.say('You cannot fight yourself!');
if (this.fighting.has(msg.guild.id)) return msg.say('There is already a fight in this server...');
this.fighting.add(msg.guild.id);
await msg.say(`${opponent.username}, do you accept this challenge? Yes or No?`);
await msg.say(`**${opponent.username}**, do you accept this challenge? **_Y_es** or **No**?`);
try {
const verify = await msg.channel.awaitMessages(res => res.author.id === opponent.id, {
max: 1,
time: 15000,
errors: ['time']
});
if (verify.first().content.toLowerCase() === 'yes') {
if (['yes', 'y'].includes(verify.first().content.toLowerCase())) {
let userHP = 500;
let oppoHP = 500;
let userTurn = true;
@@ -117,8 +117,8 @@ module.exports = class BattleCommand extends Command {
this.fighting.delete(msg.guild.id);
return msg.say(stripIndents`
The match is over!
**Winner:** ${(userHP > oppoHP) ? `${msg.author.username} (${userHP})` : `${opponent.username} (${oppoHP})`}
**Loser:** ${(userHP > oppoHP) ? `${opponent.username} (${oppoHP})` : `${msg.author.username} (${userHP})`}
**Winner: ${(userHP > oppoHP) ? `${msg.author.username}** (${userHP})` : `${opponent.username}** (${oppoHP})`}
**Loser: ${(userHP > oppoHP) ? `${opponent.username}** (${oppoHP})` : `${msg.author.username}** (${userHP})`}
`);
} else {
this.fighting.delete(msg.guild.id);