mrmBot-Matrix/commands/fun/bird.js

23 lines
558 B
JavaScript
Raw Normal View History

import fetch from "node-fetch";
import Command from "../../classes/command.js";
class BirdCommand extends Command {
async run() {
this.client.sendChannelTyping(this.message.channel.id);
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;