thaldrin/src/discord/commands/animals/cat.ts

32 lines
925 B
TypeScript
Raw Normal View History

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
export = class Cat extends Command {
2021-04-21 00:26:57 +00:00
constructor() {
super({
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) {
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])
}
}
}