Update dogfact.js

This commit is contained in:
MrTech999 2020-03-11 20:58:58 +00:00
parent 525d3ce123
commit 9948976cf7

View file

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