make the bot stop typing here as well

This commit is contained in:
TheCakeChicken 2020-03-26 14:05:48 +00:00
parent 9be16b793e
commit 5d211fcc68
2 changed files with 13 additions and 14 deletions

View file

@ -7,11 +7,11 @@ exports.run = async (bot, message, args) => {
message.channel.send(`**Did you know?**\n ${body.data[0].fact}`); message.channel.send(`**Did you know?**\n ${body.data[0].fact}`);
message.channel.startTyping(); message.channel.startTyping();
}); });
} catch(err) { } catch(err) {
message.channel.send(`<:error:466995152976871434> API error: ${err}`); message.channel.send(`<:error:466995152976871434> API error: ${err}`);
};
message.channel.stopTyping(); message.channel.stopTyping();
}; };
};
exports.conf = { exports.conf = {
enabled: true, enabled: true,

View file

@ -5,13 +5,12 @@ exports.run = async (bot, message, args) => {
try{ try{
request({ uri: "https://dog-api.kinduff.com/api/facts", json: true }, (error, response, body) => { request({ uri: "https://dog-api.kinduff.com/api/facts", json: true }, (error, response, body) => {
message.channel.send(`**Did you know?**\n ${body.facts[0]}`); message.channel.send(`**Did you know?**\n ${body.facts[0]}`);
message.channel.stopTyping();
}); });
} catch(err) { } catch(err) {
message.channel.send(`<:error:466995152976871434> API error: ${err}`); message.channel.send(`<:error:466995152976871434> API error: ${err}`);
};
message.channel.stopTyping(); message.channel.stopTyping();
}; };
};
exports.conf = { exports.conf = {
enabled: true, enabled: true,