Proper await

This commit is contained in:
Daniel Odendahl Jr
2017-03-24 02:29:31 +00:00
parent 5329d08581
commit 122fcf5de3
103 changed files with 613 additions and 577 deletions
+6 -1
View File
@@ -18,6 +18,11 @@ module.exports = class BinaryCommand extends commando.Command {
}
console.log(`[Command] ${message.content}`);
let turnToBinary = message.content.split(" ").slice(1).join(" ");
return message.channel.send(stringToBinary(turnToBinary)).catch(error => message.channel.send(':x: Error! Translation is too long, or nothing was entered!'));
try {
message.channel.send(stringToBinary(turnToBinary));
}
catch (err) {
message.channel.send(':x: Error! Translation is too long, or nothing was entered!');
}
}
};