2019-09-13 20:02:41 +00:00
|
|
|
const fetch = require("node-fetch");
|
|
|
|
|
|
|
|
exports.run = async (message) => {
|
|
|
|
message.channel.sendTyping();
|
|
|
|
const data = await fetch("https://api.thecatapi.com/v1/images/search?format=json", {
|
|
|
|
headers: {
|
2019-11-13 00:09:06 +00:00
|
|
|
"x-api-key": process.env.CAT
|
2019-09-13 20:02:41 +00:00
|
|
|
}
|
|
|
|
});
|
|
|
|
const json = await data.json();
|
|
|
|
return message.channel.createMessage({
|
|
|
|
embed: {
|
|
|
|
color: 16711680,
|
|
|
|
image: {
|
|
|
|
url: json[0].url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
exports.aliases = ["kitters", "kitties", "kitty", "cattos", "catto", "cats"];
|
2019-12-02 20:47:22 +00:00
|
|
|
exports.category = 4;
|
|
|
|
exports.help = "Gets a random cat picture";
|
2019-11-30 02:00:14 +00:00
|
|
|
exports.requires = "cat";
|