mirror of https://github.com/thaldrin/thaldrin.git
add image commands
This commit is contained in:
parent
663d306043
commit
7dcbc26975
|
@ -0,0 +1,32 @@
|
||||||
|
import yiff from '../../utils/yiff';
|
||||||
|
import Command from '../../handler/structures/Command';
|
||||||
|
import { Context } from '../../utils/types';
|
||||||
|
import { MessageEmbed } from 'discord.js';
|
||||||
|
|
||||||
|
export = class Cat extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: "cat",
|
||||||
|
description: "Show a Cat",
|
||||||
|
cooldown: 1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async command(ctx: Context) {
|
||||||
|
let image = await yiff.shibe("cats", 1)
|
||||||
|
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])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
import yiff from '../../utils/yiff';
|
||||||
|
import Command from '../../handler/structures/Command';
|
||||||
|
import { Context } from '../../utils/types';
|
||||||
|
import { MessageEmbed } from 'discord.js';
|
||||||
|
|
||||||
|
export = class Birb extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: "birb",
|
||||||
|
description: "Show a Birb",
|
||||||
|
aliases: ["bird", 'birds'],
|
||||||
|
cooldown: 1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async command(ctx: Context) {
|
||||||
|
let image = await yiff.shibe("birds", 1)
|
||||||
|
let provider = "shibe.online"
|
||||||
|
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])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,18 +1,32 @@
|
||||||
import { Context } from '../../utils/types';
|
import yiff from '../../utils/yiff';
|
||||||
import Command from '../../handler/structures/Command';
|
import Command from '../../handler/structures/Command';
|
||||||
|
import { Context } from '../../utils/types';
|
||||||
|
import { MessageEmbed } from 'discord.js';
|
||||||
|
|
||||||
export = class Wolf extends Command {
|
export = class Fox extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: "fox",
|
name: "fox",
|
||||||
description: "Show a Fox",
|
description: "Show a Fox",
|
||||||
aliases: ["yip"],
|
aliases: ["yip"],
|
||||||
cooldown: 0,
|
cooldown: 1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async command(ctx: Context) {
|
async command(ctx: Context) {
|
||||||
// await find('foxes')
|
let image = await yiff.thaldrin("foxes")
|
||||||
return console.log("Fox Command")
|
let provider = "thaldr.in"
|
||||||
|
|
||||||
|
if (ctx.settings.embeds) {
|
||||||
|
let Fox = 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(Fox)
|
||||||
|
} else {
|
||||||
|
|
||||||
|
ctx.channel.send(image.url)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
import yiff from '../../utils/yiff';
|
||||||
|
import Command from '../../handler/structures/Command';
|
||||||
|
import { Context } from '../../utils/types';
|
||||||
|
import { MessageEmbed } from 'discord.js';
|
||||||
|
|
||||||
|
export = class Hyena extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: "hyena",
|
||||||
|
description: "Show a Hyena",
|
||||||
|
aliases: ["yeen"],
|
||||||
|
cooldown: 1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async command(ctx: Context) {
|
||||||
|
let image = await yiff.thaldrin("yeens")
|
||||||
|
let provider = "thaldr.in"
|
||||||
|
|
||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
import yiff from '../../utils/yiff';
|
||||||
|
import Command from '../../handler/structures/Command';
|
||||||
|
import { Context } from '../../utils/types';
|
||||||
|
import { MessageEmbed } from 'discord.js';
|
||||||
|
|
||||||
|
export = class Shibe extends Command {
|
||||||
|
constructor() {
|
||||||
|
super({
|
||||||
|
name: "shibe",
|
||||||
|
description: "Show a Shibe",
|
||||||
|
aliases: ["shib"],
|
||||||
|
cooldown: 1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async command(ctx: Context) {
|
||||||
|
let image = await yiff.shibe("shibes", 1)
|
||||||
|
let provider = "shibe.online"
|
||||||
|
if (ctx.settings.embeds) {
|
||||||
|
let Shibe = 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(Shibe)
|
||||||
|
} else {
|
||||||
|
|
||||||
|
ctx.channel.send(image[0])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -9,7 +9,7 @@ export = class Wolf extends Command {
|
||||||
name: "wolf",
|
name: "wolf",
|
||||||
description: "Show a Wolf",
|
description: "Show a Wolf",
|
||||||
aliases: ["awoo"],
|
aliases: ["awoo"],
|
||||||
cooldown: 0,
|
cooldown: 1,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,9 +17,16 @@ export = class Wolf extends Command {
|
||||||
let image = await yiff.thaldrin("wolves")
|
let image = await yiff.thaldrin("wolves")
|
||||||
let provider = "thaldr.in"
|
let provider = "thaldr.in"
|
||||||
|
|
||||||
ctx.settings.embeds ?
|
if (ctx.settings.embeds) {
|
||||||
ctx.channel.send(new MessageEmbed().setImage(image.url).setFooter(`Thaldrin - Image provided by ${provider}`, ctx.config.variables.avatar).setColor(ctx.config.variables.color))
|
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 {
|
||||||
|
|
||||||
ctx.channel.send(image.url)
|
ctx.channel.send(image.url)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue