2021-09-11 11:36:51 +00:00
|
|
|
import yiff from '../../../utils/yiff';
|
|
|
|
import { Command } from '@thaldrin/eu';
|
|
|
|
import { Context } from '../../../utils/types';
|
2021-04-21 00:26:57 +00:00
|
|
|
import { MessageEmbed } from 'discord.js';
|
2021-09-11 11:36:51 +00:00
|
|
|
import request from '../../../utils/animals';
|
2021-04-21 00:26:57 +00:00
|
|
|
|
2021-05-16 21:39:18 +00:00
|
|
|
export = class Cat extends Command {
|
2021-04-21 00:26:57 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
2021-05-16 21:39:18 +00:00
|
|
|
name: "cat",
|
|
|
|
description: "Show a Cat",
|
|
|
|
aliases: ["mow", 'meow'],
|
2021-05-16 00:11:37 +00:00
|
|
|
cooldown: 2,
|
2021-04-21 00:26:57 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
async command(ctx: Context) {
|
2021-05-16 21:39:18 +00:00
|
|
|
let { image, provider } = await request('shibe')
|
|
|
|
|
2021-04-21 00:26:57 +00:00
|
|
|
if (ctx.settings.embeds) {
|
|
|
|
let Birb = 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(Birb)
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ctx.channel.send(image[0])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|