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

32 lines
928 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 Hyena extends Command {
constructor() {
super({
name: "hyena",
description: "Show a Hyena",
aliases: ["yeen"],
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('hyena')
2021-04-21 00:26:57 +00:00
if (ctx.settings.embeds) {
let Hyena = new MessageEmbed()
.setImage(image.url)
.setFooter(`${ctx.config.variables.name} - Image provided by ${provider}`, ctx.config.variables.avatar)
.setColor(ctx.config.variables.color)
ctx.channel.send(Hyena)
} else {
ctx.channel.send(image.url)
}
}
}