thaldrin/src/modules/animals/birb.ts

31 lines
930 B
TypeScript
Raw Normal View History

2021-04-21 00:26:57 +00:00
import yiff from '../../utils/yiff';
import Command from '../../handler/structures/Command';
import { Context } from '../../utils/types';
import { MessageEmbed } from 'discord.js';
2021-04-28 01:34:16 +00:00
export = class Birb extends Command {
2021-04-21 00:26:57 +00:00
constructor() {
super({
2021-04-28 01:34:16 +00:00
name: "bird",
description: "Show a Bird",
aliases: ["birbs", "birb", "birds"],
2021-04-21 00:26:57 +00:00
cooldown: 1,
})
}
async command(ctx: Context) {
2021-04-28 01:34:16 +00:00
let image = await yiff.shibe("birds", 1)
2021-04-21 00:26:57 +00:00
let provider = "shibe.online"
if (ctx.settings.embeds) {
let Cat = new MessageEmbed()
.setImage(image[0])
.setFooter(`${ctx.config.variables.name} - Image provided by ${provider}`, ctx.config.variables.avatar)
.setColor(ctx.config.variables.color)
ctx.channel.send(Cat)
} else {
ctx.channel.send(image[0])
}
}
}