mrmBot-Matrix/commands/catfact.js
2019-09-13 15:02:41 -05:00

10 lines
292 B
JavaScript

const fetch = require("node-fetch");
exports.run = async (message) => {
message.channel.sendTyping();
const imageData = await fetch("https://catfact.ninja/fact");
const json = await imageData.json();
return `🐱 **Did you know?** ${json.fact}`;
};
exports.aliases = ["kittyfact"];