mrmBot-Matrix/commands/fun/bird.js

23 lines
522 B
JavaScript
Raw Normal View History

import fetch from "node-fetch";
import Command from "../../classes/command.js";
class BirdCommand extends Command {
async run() {
2022-03-22 20:43:26 +00:00
this.acknowledge();
const imageData = await fetch("http://shibe.online/api/birds");
const json = await imageData.json();
return {
2021-11-10 04:09:10 +00:00
embeds: [{
color: 16711680,
image: {
url: json[0]
}
2021-11-10 04:09:10 +00:00
}]
};
}
static description = "Gets a random bird picture";
static aliases = ["birb", "birds", "birbs"];
}
export default BirdCommand;