mirror of
https://github.com/thaldrin/thaldrin.git
synced 2024-08-14 23:57:21 +00:00
roleplay commands, pog
This commit is contained in:
parent
39b8e045d5
commit
fd831f2958
2 changed files with 17 additions and 16 deletions
|
@ -1,40 +1,41 @@
|
||||||
import yiff from '../../utils/yiff';
|
// @ts-nocheck
|
||||||
import Command from '../../handler/structures/Command';
|
import Command from '../../handler/structures/Command';
|
||||||
import { Context } from '../../utils/types';
|
import { Context } from '../../utils/types';
|
||||||
import { MessageEmbed } from 'discord.js';
|
import { MessageEmbed } from 'discord.js';
|
||||||
import lingua from '../../utils/lingua';
|
import lingua from '../../utils/lingua';
|
||||||
import replace from '../../utils/replace';
|
import replace from '../../utils/replace';
|
||||||
|
import { request } from '../../utils/commmand.roleplay';
|
||||||
|
|
||||||
export = class Hug extends Command {
|
export = class Hug extends Command {
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: "hug",
|
name: "hug",
|
||||||
description: "Hug somebody!",
|
description: "Hug somebody!",
|
||||||
// aliases: ["yip"],
|
|
||||||
cooldown: 1,
|
cooldown: 1,
|
||||||
|
usage: `<@User>`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async command(ctx: Context) {
|
async command(ctx: Context) {
|
||||||
let image = await yiff.sheri("hug")
|
let action = "hug"
|
||||||
let provider = "sheri.bot"
|
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, 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, action, lingua[ctx.settings.locale].RP_ME))
|
||||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, 'hug', lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||||
// @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))
|
|
||||||
|
|
||||||
|
let users = [ctx.message.author.username, ctx.message.mentions.members?.first()?.user.username]
|
||||||
|
let { image, provider, line } = await request(action, ctx.settings.locale, users)
|
||||||
if (ctx.settings.embeds) {
|
if (ctx.settings.embeds) {
|
||||||
let Fox = new MessageEmbed()
|
let Action = new MessageEmbed().setImage(image.url)
|
||||||
.setImage(image.url)
|
if ((line && ctx.message.mentions.members?.size !== 0) && ctx.settings.interactiontext) Action.setDescription(line)
|
||||||
|
|
||||||
|
Action
|
||||||
.setFooter(`${ctx.config.variables.name} - Image provided by ${provider}`, ctx.config.variables.avatar)
|
.setFooter(`${ctx.config.variables.name} - Image provided by ${provider}`, ctx.config.variables.avatar)
|
||||||
.setColor(ctx.config.variables.color)
|
.setColor(ctx.config.variables.color)
|
||||||
|
|
||||||
ctx.channel.send(Fox)
|
ctx.channel.send(Action)
|
||||||
} else {
|
} else {
|
||||||
|
if ((line && ctx.message.mentions.members?.size !== 0) && ctx.settings.interactiontext) ctx.channel.send(`${line}\n\n${image.url}`)
|
||||||
ctx.channel.send(image.url)
|
else ctx.channel.send(image.url)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1 +1 @@
|
||||||
Subproject commit e6ba2d38b0b2c9d2e5ba2b0e5379a9a6178daa1b
|
Subproject commit bda873655d0aa46da44d904e1c0edd968c407556
|
Loading…
Reference in a new issue