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

17 lines
393 B
JavaScript

const fetch = require("node-fetch");
exports.run = async (message) => {
message.channel.sendTyping();
const imageData = await fetch("http://shibe.online/api/birds");
const json = await imageData.json();
return message.channel.createMessage({
embed: {
color: 16711680,
image: {
url: json[0]
}
}
});
};
exports.aliases = ["birb", "birds", "birbs"];