made it a bit better
This commit is contained in:
parent
5b9d187366
commit
0f65b56dcc
1 changed files with 11 additions and 12 deletions
|
@ -56,21 +56,20 @@ class borgarCommand extends Command {
|
||||||
message.util.edit(borgarEmbed);
|
message.util.edit(borgarEmbed);
|
||||||
|
|
||||||
const filter = m => m.content && m.author.id == message.author.id;
|
const filter = m => m.content && m.author.id == message.author.id;
|
||||||
message.channel.awaitMessages(filter, {time: args.time * 1000, errors: ['time'] })
|
message.channel.awaitMessages(filter, {time: args.time * 1000, max: hamIngredient.length, errors: ['time'] })
|
||||||
.catch(collected => {
|
.then(messages => {
|
||||||
let userIngredient = collected.map(collected => collected.content);
|
let userIngredient = messages.map(messages => messages.content);
|
||||||
|
|
||||||
if (userIngredient.toString().toLowerCase() == hamIngredient.toString()) {
|
if (userIngredient.toString().toLowerCase() == hamIngredient.toString()) {
|
||||||
return message.reply('u won bro,,,, that\'s kinda epic if i do say so myself');
|
return message.reply('u won bro,,,, that\'s kinda epic if i do say so myself');
|
||||||
} else {
|
} else if (userIngredient.length == hamIngredient.length) {
|
||||||
if (userIngredient.length == hamIngredient.length) {
|
return message.reply(`you failed noob... you were supposed to make **${hamIngredient}**`);
|
||||||
return message.reply(`you failed noob... you were supposed to make ${hamIngredient}`);
|
|
||||||
} else if (userIngredient.length > hamIngredient.length) {
|
} else if (userIngredient.length > hamIngredient.length) {
|
||||||
return message.reply('Too much ingredient...');
|
return message.reply('Too much ingredient...');
|
||||||
} else {
|
}
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
return message.reply('time runned out noob...');
|
return message.reply('time runned out noob...');
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}, 2000);
|
}, 2000);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue