This commit is contained in:
Daniel Odendahl Jr
2017-05-09 17:10:38 +00:00
parent 732fa79b7e
commit 256d94c9c0
+3 -1
View File
@@ -49,10 +49,12 @@ client.registry
client.on('message', async (msg) => {
if (msg.isMentioned(client.user)) {
msg.channel.startTyping();
const message = msg.content.replace(mention, '');
try {
const { body } = await clevs.ask(message);
return msg.reply(body.response);
return msg.reply(body.response)
.then(() => msg.channel.stopTyping());
} catch (err) {
return msg.reply(err);
}