Fixed catfact

This commit is contained in:
Emily 2020-03-10 10:57:54 +11:00
parent 85be37097d
commit 1bf10ccc0c

View file

@ -3,7 +3,7 @@ const request = require("request");
exports.run = async (bot, message, args) => {
request({ uri: "https://catfact.ninja/facts", json: true }, (error, response, body) => {
if (error) throw new Error(error);
message.channel.send(`**Did you know?**\n ${body.facts[0]}`);
message.channel.send(`**Did you know?**\n ${body.data[0].fact}`);
});
};