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
+4 -4
View File
@@ -54,7 +54,7 @@ module.exports = class UserInfoCommand extends commando.Command {
break;
}
if (message.mentions.users.size !== 1) {
message.channel.send(':x: Error! Please mention one user!');
return message.channel.send(':x: Error! Please mention one user!');
}
else {
if (!message.mentions.users.first().presence.game) {
@@ -73,7 +73,7 @@ module.exports = class UserInfoCommand extends commando.Command {
stat, true)
.addField('**Playing:**',
"None", true);
message.channel.sendEmbed(embed).catch(console.error);
return message.channel.sendEmbed(embed).catch(console.error);
}
else {
const embed = new Discord.RichEmbed()
@@ -91,12 +91,12 @@ module.exports = class UserInfoCommand extends commando.Command {
stat, true)
.addField('**Playing:**',
message.mentions.users.first().presence.game.name, true);
message.channel.sendEmbed(embed).catch(console.error);
return message.channel.sendEmbed(embed).catch(console.error);
}
}
}
else {
message.channel.send(":x: Error! This command does not work in DM!");
return message.channel.send(":x: Error! This command does not work in DM!");
}
}
};