mirror of https://github.com/thaldrin/thaldrin.git
add hug command and updat lingua base
This commit is contained in:
parent
54ead0c9ff
commit
e693b1e1e1
|
@ -0,0 +1,40 @@
|
|||
import yiff from '../../utils/yiff';
|
||||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
import lingua from './../../utils/lingua';
|
||||
import replace from './../../utils/replace';
|
||||
|
||||
export = class Fox extends Command {
|
||||
constructor() {
|
||||
super({
|
||||
name: "hug",
|
||||
description: "Hug somebody!",
|
||||
// aliases: ["yip"],
|
||||
cooldown: 1,
|
||||
})
|
||||
}
|
||||
|
||||
async command(ctx: Context) {
|
||||
let image = await yiff.sheri("hug")
|
||||
let provider = "sheri.bot"
|
||||
// @ts-ignore
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, 'hug', lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
// @ts-ignore
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, 'hug', lingua[ctx.settings.locale].RP_ME))
|
||||
// @ts-ignore
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, 'hug', lingua[ctx.settings.locale].RP_SELF))
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1 +1 @@
|
|||
Subproject commit 809a88c19c0a249b804c3cec77de95c8ce80adec
|
||||
Subproject commit c2836cda38b922626a3a2f532e40925437b53d0c
|
Loading…
Reference in New Issue