thaldrin/src/modules/animals/wolf.ts

31 lines
914 B
TypeScript
Raw Normal View History

2021-04-10 21:28:17 +00:00
import yiff from '../../utils/yiff';
2021-04-04 15:17:46 +00:00
import Command from '../../handler/structures/Command';
2021-04-10 21:28:17 +00:00
import { Context } from '../../utils/types';
2021-04-19 22:19:57 +00:00
import { MessageEmbed } from 'discord.js';
2021-04-04 15:17:46 +00:00
export = class Wolf extends Command {
constructor() {
super({
2021-04-08 00:43:17 +00:00
name: "wolf",
2021-04-04 15:17:46 +00:00
description: "Show a Wolf",
aliases: ["awoo"],
2021-04-21 00:26:57 +00:00
cooldown: 1,
2021-04-04 15:17:46 +00:00
})
}
2021-04-10 21:28:17 +00:00
async command(ctx: Context) {
2021-04-19 22:19:57 +00:00
let image = await yiff.thaldrin("wolves")
let provider = "thaldr.in"
2021-04-21 00:26:57 +00:00
if (ctx.settings.embeds) {
let Wolf = 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(Wolf)
} else {
2021-04-19 22:19:57 +00:00
ctx.channel.send(image.url)
2021-04-21 00:26:57 +00:00
}
2021-04-04 15:17:46 +00:00
}
}