return and await

This commit is contained in:
Daniel Odendahl Jr
2017-03-23 13:16:59 +00:00
parent cea110ce4b
commit 7c0a39ec5c
83 changed files with 295 additions and 264 deletions
+3 -3
View File
@@ -29,13 +29,13 @@ module.exports = class RandomNameGen extends commando.Command {
let randomFirstBoth = [randomFirstMale, randomFirstFemale];
randomFirstBoth = randomFirstBoth[Math.floor(Math.random() * randomFirstBoth.length)];
if (message.content.toLowerCase().split(" ").slice(1).includes("male")) {
message.channel.send(`${randomFirstMale} ${randomLast}`);
return message.channel.send(`${randomFirstMale} ${randomLast}`);
}
else if (message.content.toLowerCase().split(" ").slice(1).includes("female")) {
message.channel.send(`${randomFirstFemale} ${randomLast}`);
return message.channel.send(`${randomFirstFemale} ${randomLast}`);
}
else {
message.channel.send(`${randomFirstBoth} ${randomLast}`);
return message.channel.send(`${randomFirstBoth} ${randomLast}`);
}
}
};