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

10 lines
305 B
JavaScript

const fetch = require("node-fetch");
exports.run = async (message) => {
message.channel.sendTyping();
const imageData = await fetch("https://dog-api.kinduff.com/api/facts");
const json = await imageData.json();
return `🐶 **Did you know?** ${json.facts[0]}`;
};
exports.aliases = ["pupfact"];