mrmBot-Matrix/commands/bird.js

19 lines
428 B
JavaScript
Raw Normal View History

2019-09-13 20:02:41 +00:00
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 {
2019-09-13 20:02:41 +00:00
embed: {
color: 16711680,
image: {
url: json[0]
}
}
};
2019-09-13 20:02:41 +00:00
};
exports.aliases = ["birb", "birds", "birbs"];
exports.category = 4;
exports.help = "Gets a random bird picture";