mirror of https://github.com/thaldrin/thaldrin.git
new language module :3
This commit is contained in:
parent
d51bd5e57c
commit
2ac92a829f
|
@ -24,6 +24,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@types/figlet": "^1.5.1",
|
||||
"@types/js-yaml": "^4.0.2",
|
||||
"@types/node": "^14.14.37",
|
||||
"@types/roll": "^1.2.0",
|
||||
"@types/ws": "^7.4.1"
|
||||
|
@ -108,6 +109,12 @@
|
|||
"integrity": "sha512-dwOwRPJY122FcWRdiXic+H72AOD+Cx69NO6Z9STtm9eIvM47qBe0vXdD/w4ad+ygIqvSTdnQyeMwlxotDjlvPg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/js-yaml": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.2.tgz",
|
||||
"integrity": "sha512-KbeHS/Y4R+k+5sWXEYzAZKuB1yQlZtEghuhRxrVRLaqhtoG5+26JwQsa4HyS3AWX8v1Uwukma5HheduUDskasA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "14.14.37",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz",
|
||||
|
@ -1365,6 +1372,12 @@
|
|||
"integrity": "sha512-dwOwRPJY122FcWRdiXic+H72AOD+Cx69NO6Z9STtm9eIvM47qBe0vXdD/w4ad+ygIqvSTdnQyeMwlxotDjlvPg==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/js-yaml": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/js-yaml/-/js-yaml-4.0.2.tgz",
|
||||
"integrity": "sha512-KbeHS/Y4R+k+5sWXEYzAZKuB1yQlZtEghuhRxrVRLaqhtoG5+26JwQsa4HyS3AWX8v1Uwukma5HheduUDskasA==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "14.14.37",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.37.tgz",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"description": "",
|
||||
"main": "build/shard.js",
|
||||
"scripts": {
|
||||
"node:build": "rm -rf build/ && tsc",
|
||||
"node:build": "rm -rf build/ && tsc && cp -r src/utils/lingua/langs build/src/utils/lingua/langs",
|
||||
"node:start": "node build/shard.js",
|
||||
"node:dev": "nodemon --ignore \"build/\" -e js,ts --exec \"npm run node:build && npm run node:start\"",
|
||||
"docker:build": "docker-compose build",
|
||||
|
@ -42,6 +42,7 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@types/figlet": "^1.5.1",
|
||||
"@types/js-yaml": "^4.0.2",
|
||||
"@types/node": "^14.14.37",
|
||||
"@types/roll": "^1.2.0",
|
||||
"@types/ws": "^7.4.1"
|
||||
|
|
|
@ -5,12 +5,12 @@ import supabase from "../utils/database";
|
|||
import { Command, Server, Usage } from "../utils/types";
|
||||
import config from "../../config";
|
||||
import { Commands, Shortlink, SourceFinder } from "../utils/wrapper.features";
|
||||
import lingua from "../utils/lingua";
|
||||
import language from "../utils/language";
|
||||
import replace from "../utils/replace";
|
||||
import chalk from "chalk";
|
||||
import Prom from "../utils/init.prometheus";
|
||||
|
||||
|
||||
//
|
||||
export = {
|
||||
name: "message",
|
||||
run: async (client: Client, message: Message) => {
|
||||
|
@ -88,7 +88,7 @@ export = {
|
|||
lingua[ctx.settings.locale].CHANNEL_NOT_NSFW
|
||||
)
|
||||
|
||||
if (cmd.AuthorPermissions !== "NONE" && ctx.member?.permissions.has(cmd.AuthorPermissions)) return ctx.channel.send(replace(/PERMISSIONS/gm, cmd.AuthorPermissions.join(", "), lingua[ctx.settings.locale].INSUFFICIENT_PERMISSIONS))
|
||||
if (cmd.AuthorPermissions !== "NONE" && ctx.member?.permissions.has(cmd.AuthorPermissions)) return ctx.channel.send(replace(/PERMISSIONS/gm, cmd.AuthorPermissions.join(", "), language.get(ctx.settings.locale).error.permissions))
|
||||
|
||||
|
||||
const now = Date.now()
|
||||
|
@ -99,8 +99,8 @@ export = {
|
|||
if (now < time) {
|
||||
let CooldownEmbed = new MessageEmbed()
|
||||
const left = (time - now) / 1000
|
||||
let title = replace(/COMMAND/g, cmd.name, lingua[ctx.settings.locale].ON_COOLDOWN)
|
||||
let description = replace(/COMMAND/g, cmd.name, replace(/COOLDOWN/g, `${cmd.cooldown}s`, replace(/TIME/g, left, lingua[ctx.settings.locale].ON_COOLDOWN_DESCRIPTION)))
|
||||
let title = replace(/COMMAND/g, cmd.name, language.get(ctx.settings.locale).error.cooldown.name)
|
||||
let description = replace(/COMMAND/g, cmd.name, replace(/COOLDOWN/g, `${cmd.cooldown}s`, replace(/TIME/g, left, language.get(ctx.settings.locale).error.cooldown.desc)))
|
||||
CooldownEmbed.setTitle(title)
|
||||
.setDescription(description)
|
||||
.setColor("ORANGE")
|
||||
|
@ -133,7 +133,7 @@ export = {
|
|||
} catch (error) {
|
||||
// Logger.error(error)
|
||||
console.log(error)
|
||||
let ErrorEmbed = new MessageEmbed().setTitle(replace(/COMMAND/g, cmd.name, lingua[ctx.settings.locale].ON_ERROR)).setDescription(`\`${error.message}\`\n\n\`${error}\``).setColor("RED")
|
||||
let ErrorEmbed = new MessageEmbed().setTitle(replace(/COMMAND/g, cmd.name, language.get(ctx.settings.locale).error.error)).setDescription(`\`${error.message}\`\n\n\`${error}\``).setColor("RED")
|
||||
ctx.channel.send(ErrorEmbed)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,9 +18,9 @@ export = class Boop extends Command {
|
|||
|
||||
async command(ctx: Context) {
|
||||
let action = "boop"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -18,9 +18,9 @@ export = class Cuddle extends Command {
|
|||
|
||||
async command(ctx: Context) {
|
||||
let action = "cuddle"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
import { request } from '../../utils/command.roleplay';
|
||||
|
||||
|
@ -19,9 +19,9 @@ export = class Hold extends Command {
|
|||
|
||||
async command(ctx: Context) {
|
||||
let action = "hold"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
import { request } from '../../utils/command.roleplay';
|
||||
|
||||
|
@ -18,9 +18,9 @@ export = class Hug extends Command {
|
|||
|
||||
async command(ctx: Context) {
|
||||
let action = "hug"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
import { request } from '../../utils/command.roleplay';
|
||||
|
||||
|
@ -18,9 +18,9 @@ export = class Lick extends Command {
|
|||
|
||||
async command(ctx: Context) {
|
||||
let action = "lick"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import { Guild, GuildMember, MessageEmbed, User as DiscordUser } from 'discord.js';
|
||||
import replace from '../../utils/replace';
|
||||
|
||||
|
@ -37,11 +37,11 @@ export = class User extends Command {
|
|||
|
||||
Embed
|
||||
// @ts-ignore
|
||||
.setTitle(replace(/USER/gi, USER?.nickname || USER.user.username, lingua[ctx.settings.locale].USER_INFO.INFO_ON))
|
||||
.setTitle(replace(/USER/gi, USER?.nickname || USER.user.username, language.get(ctx.settings.locale).user.info))
|
||||
// @ts-ignore
|
||||
.addField(lingua[ctx.settings.locale].USER_INFO.USERNAME, USER?.user.tag, true)
|
||||
.addField(language.get(ctx.settings.locale).user.username, USER?.user.tag, true)
|
||||
// @ts-ignore
|
||||
.addField(lingua[ctx.settings.locale].USER_INFO.USERID, USER?.user.id, true)
|
||||
.addField(language.get(ctx.settings.locale).user.id, USER?.user.id, true)
|
||||
// @ts-ignore
|
||||
console.log(USER)
|
||||
// let Roles = USER?.roles.cache.map(role => (`<@${role.id}>`))
|
||||
|
@ -49,9 +49,9 @@ export = class User extends Command {
|
|||
Embed
|
||||
//.addField(lingua[ctx.settings.locale].USER_INFO.ROLES, [Roles].join(", "), false)
|
||||
// @ts-ignore
|
||||
.addField(lingua[ctx.settings.locale].USER_INFO.CREATED_DATE, USER?.user.createdAt.toString(), false)
|
||||
.addField(language.get(ctx.settings.locale).user.created, USER?.user.createdAt.toString(), false)
|
||||
// @ts-ignore
|
||||
.addField(lingua[ctx.settings.locale].USER_INFO.JOINED_AT, USER?.joinedAt?.toString(), true)
|
||||
.addField(language.get(ctx.settings.locale).user.joined, USER?.joinedAt?.toString(), true)
|
||||
|
||||
// @ts-ignore
|
||||
.setThumbnail(USER?.user.avatarURL({ format: "png" }))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import SendWS from "../../utils/webhook";
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import { bug } from '../../utils/trello';
|
||||
import replace from '../../utils/replace';
|
||||
export = class Suggestion extends Command {
|
||||
|
@ -17,7 +17,7 @@ export = class Suggestion extends Command {
|
|||
async command(ctx: Context) {
|
||||
const [title, desc] = ctx.args.join(" ").split("|").map(v => v.trim());
|
||||
// @ts-ignore
|
||||
if (!title) return ctx.channel.send(lingua[ctx.settings.locale].MISSING_TITLE)
|
||||
if (!title) return ctx.channel.send(language.get(ctx.settings.locale).missing.title)
|
||||
let author = `${ctx.author.tag} (${ctx.author.id})`
|
||||
let guild = `${ctx.guild?.name} (${ctx.guild?.id})`
|
||||
|
||||
|
@ -25,6 +25,6 @@ export = class Suggestion extends Command {
|
|||
if (ctx.config?.webhook?.bug) await SendWS(ctx.config.webhook.bug, { title, desc, ctx })
|
||||
|
||||
// @ts-ignore
|
||||
ctx.channel.send(replace(/VALUE/gi, "Bug Report", lingua[ctx.settings.locale].VALUE_SENT))
|
||||
ctx.channel.send(replace(/VALUE/gi, "Bug Report", language.get(ctx.settings.locale).misc.sent))
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@ 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 language from "../../utils/language";
|
||||
export = class E926 extends Command {
|
||||
constructor() {
|
||||
super({
|
||||
|
@ -17,7 +17,7 @@ export = class E926 extends Command {
|
|||
async command(ctx: Context) {
|
||||
let embed = new MessageEmbed().setColor(ctx.config.variables.color).setFooter(`${ctx.config.variables.name}`, ctx.config.variables.avatar)
|
||||
// @ts-ignore
|
||||
if (ctx.args.length < 1) return ctx.channel.send(embed.setTitle(lingua[ctx.settings.locale].NOT_ENOUGH_TAGS).setDescription(lingua[ctx.settings.locale].NOT_ENOUGH_TAGS_DES))
|
||||
if (ctx.args.length < 1) return ctx.channel.send(embed.setTitle(language.get(ctx.settings.locale).missing.tags.name).setDescription(language.get(ctx.settings.locale).missing.tags.desc))
|
||||
let request = await yiff.e926(ctx.args.join(" "))
|
||||
if (ctx.settings.embeds) {
|
||||
embed.setAuthor('e926.net', 'https://thaldrin.media/e621.png', `https://e926.net/post/${request[0].id}`)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import { Folders, Commands } from "../../utils/command.amount";
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
|
||||
|
@ -23,7 +23,7 @@ export = class Help extends Command {
|
|||
await (await Folders()).forEach(async folder => {
|
||||
if (!ctx.isDeveloper && folder === 'developer') return
|
||||
// @ts-ignore
|
||||
return embed.addField(`${lingua[ctx.settings.locale].CATEGORIES[folder.toUpperCase()].name || folder} [\`${[...(await Commands(folder, ctx.client))].length}\`]`, `\`${ctx.config.variables.prefix[0]} help ${folder}\``, true)
|
||||
return embed.addField(`${language.get(ctx.settings.locale).categories[folder.toLowerCase()].name || folder} [\`${[...(await Commands(folder, ctx.client))].length}\`]`, `\`${ctx.config.variables.prefix[0]} help ${folder}\``, true)
|
||||
})
|
||||
embed.setTitle(`${ctx.config.variables.name} Help`)
|
||||
return ctx.channel.send(embed)
|
||||
|
@ -34,9 +34,9 @@ export = class Help extends Command {
|
|||
let commands = await (await Commands(arg, ctx.client)).map(command => `\`${command.name}\` - ${command.description}`)
|
||||
embed.addField("Commands", commands.join("\n"))
|
||||
// @ts-ignore
|
||||
embed.setTitle(`${lingua[ctx.settings.locale].CATEGORIES[arg.toUpperCase()].name || arg}`)
|
||||
embed.setTitle(`${language.get(ctx.settings.locale).categories[folder.toLowerCase()].name || arg}`)
|
||||
// @ts-ignore
|
||||
embed.setDescription(`${lingua[ctx.settings.locale].CATEGORIES[arg.toUpperCase()].desc || ""}\n\nTotal Commands: **${commands.length}**`)
|
||||
embed.setDescription(`${language.get(ctx.settings.locale).categories[folder.toLowerCase()].desc || ""}\n\nTotal Commands: **${commands.length}**`)
|
||||
return ctx.channel.send(embed)
|
||||
}
|
||||
// @ts-ignore
|
||||
|
@ -46,7 +46,7 @@ export = class Help extends Command {
|
|||
embed.setTitle("Command Help")
|
||||
if (command.aliases?.length !== 0) embed.addField("Aliases", `⇒\`${command.aliases?.join("`\n⇒`")}\``, true)
|
||||
// @ts-ignore
|
||||
embed.setDescription(`**Cooldown:** ${command.cooldown}s\n**Module:** ${lingua[ctx.settings.locale].CATEGORIES[command.module.toUpperCase()].name || command.module}\n**NSFW:** ${command.nsfw}`)
|
||||
embed.setDescription(`**Cooldown:** ${command.cooldown}s\n**Module:** ${language.get(ctx.settings.locale).categories[folder.toLowerCase()].name || command.module}\n**NSFW:** ${command.nsfw}`)
|
||||
embed.addField("Usage", `\`thal ${command.name}\` ${command.usage}`, true)
|
||||
ctx.channel.send(embed)
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
|
||||
export = class Invite extends Command {
|
||||
|
@ -16,7 +16,7 @@ export = class Invite extends Command {
|
|||
async command(ctx: Context) {
|
||||
// TODO: generate custom invites for every server
|
||||
// @ts-ignore
|
||||
ctx.channel.send(`${replace(/BOT/gi, ctx.config.variables.name, lingua[ctx.settings.locale].INVITE_STRING)}:\n<${ctx.config.variables.invite}>`)
|
||||
ctx.channel.send(`${replace(/BOT/gi, ctx.config.variables.name, language.get(ctx.settings.locale).misc.invite)}:\n<${ctx.config.variables.invite}>`)
|
||||
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context, Server } from '../../utils/types';
|
||||
import database from "../../utils/database"
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
export = class Prefix extends Command {
|
||||
|
@ -28,7 +28,7 @@ export = class Prefix extends Command {
|
|||
case "a":
|
||||
case "add": {
|
||||
// @ts-ignore
|
||||
if (ctx.args === [] || ctx.args.join(' ').trim() === '') return ctx.channel.send(lingua[ctx.settings.locale].MISSING.VALUE.PREFIX);
|
||||
if (ctx.args === [] || ctx.args.join(' ').trim() === '') return ctx.channel.send(language.get(ctx.settings.locale).missing.values.prefix);
|
||||
// @ts-ignore
|
||||
let { data, error } = await database.from<Server>("servers").update({ prefix: [...ctx.settings.prefix, `${ctx.args.join(" ").trim()}`] }).match({ server_id: ctx.guild?.id })
|
||||
// @ts-ignore
|
||||
|
@ -45,7 +45,7 @@ export = class Prefix extends Command {
|
|||
case "r":
|
||||
case "rm":
|
||||
case "remove": {
|
||||
if (ctx.args === [] || ctx.args.join(' ').trim() === '') return ctx.channel.send('No Prefix was given');
|
||||
if (ctx.args === [] || ctx.args.join(' ').trim() === '') return ctx.channel.send(language.get(ctx.settings.locale).missing.values.prefix);
|
||||
if (!ctx.settings.prefix.includes(ctx.args.join(" ").trim())) return ctx.channel.send(`\`${ctx.args.join(" ").trim()}\` is not configured as a prefix on this Server.`)
|
||||
let newprefixes = ctx.settings.prefix.filter(prefix => prefix !== ctx.args.join(" ").trim())
|
||||
// @ts-ignore
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import Command from "../../handler/structures/Command";
|
||||
import { Context } from "../../utils/types";
|
||||
import lingua from "../../utils/lingua";
|
||||
import language from "../../utils/language";
|
||||
import replace from "../../utils/replace";
|
||||
import Roll from 'roll'
|
||||
const roll = new Roll()
|
||||
|
@ -20,7 +20,7 @@ export = class Roll extends Command {
|
|||
let diceThrow = roll.roll(Dice)
|
||||
|
||||
// @ts-ignore
|
||||
let RollMessage = await ctx.channel.send(`${replace(/AMOUNT/gi, diceThrow.input.quantity, replace(/DICE/gi, `d${diceThrow.input.sides}`, lingua[ctx.settings.locale].ROLL))}`);
|
||||
let RollMessage = await ctx.channel.send(`${replace(/AMOUNT/gi, diceThrow.input.quantity, replace(/DICE/gi, `d${diceThrow.input.sides}`, language.get(ctx.settings.locale).misc.roll))}`);
|
||||
await RollMessage.edit(`:game_die: **Results**
|
||||
Throws: **${diceThrow.rolled.join("**, **")}**
|
||||
Total: **${diceThrow.result}**`)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import SendWS from "../../utils/webhook";
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import { suggest } from '../../utils/trello';
|
||||
export = class Suggestion extends Command {
|
||||
constructor() {
|
||||
|
@ -16,7 +16,7 @@ export = class Suggestion extends Command {
|
|||
async command(ctx: Context) {
|
||||
const [title, desc] = ctx.args.join(" ").split("|").map(v => v.trim());
|
||||
// @ts-ignore
|
||||
if (!title) return ctx.channel.send(lingua[ctx.settings.locale].MISSING_TITLE)
|
||||
if (!title) return ctx.channel.send(language.get(ctx.settings.locale).missing.title)
|
||||
let author = `${ctx.author.tag} (${ctx.author.id})`
|
||||
let guild = `${ctx.guild?.name} (${ctx.guild?.id})`
|
||||
|
||||
|
@ -24,6 +24,6 @@ export = class Suggestion extends Command {
|
|||
if (ctx.config?.webhook?.suggestions) await SendWS(ctx.config.webhook.suggestions, { title, desc, ctx })
|
||||
|
||||
// @ts-ignore
|
||||
ctx.channel.send(replace(/VALUE/gi, "Suggestion", lingua[ctx.settings.locale].VALUE_SENT))
|
||||
ctx.channel.send(replace(/VALUE/gi, "Suggestion", language.get(ctx.settings.locale).misc.sent))
|
||||
}
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
import { request } from '../../utils/command.roleplay';
|
||||
|
||||
|
@ -19,9 +19,9 @@ export = class Bulge extends Command {
|
|||
|
||||
async command(ctx: Context) {
|
||||
let action = "nsfw_bulge"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -2,7 +2,7 @@ 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 language from "../../utils/language";
|
||||
export = class E621 extends Command {
|
||||
constructor() {
|
||||
super({
|
||||
|
@ -17,7 +17,7 @@ export = class E621 extends Command {
|
|||
async command(ctx: Context) {
|
||||
let embed = new MessageEmbed().setColor(ctx.config.variables.color).setFooter(`${ctx.config.variables.name}`, ctx.config.variables.avatar)
|
||||
// @ts-ignore
|
||||
if (ctx.args.length < 1) return ctx.channel.send(embed.setTitle(lingua[ctx.settings.locale].NOT_ENOUGH_TAGS).setDescription(lingua[ctx.settings.locale].NOT_ENOUGH_TAGS_DES))
|
||||
if (ctx.args.length < 1) return ctx.channel.send(embed.setTitle(language.get(ctx.settings.locale).missing.tags.name).setDescription(language.get(ctx.settings.locale).missing.tags.desc))
|
||||
let request = await yiff.e621(ctx.args.join(" "))
|
||||
if (ctx.settings.embeds) {
|
||||
embed.setAuthor('e621.net', 'https://thaldrin.media/e621.png', `https://e621.net/post/${request[0].id}`)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
import { request } from '../../utils/command.roleplay';
|
||||
|
||||
|
@ -19,9 +19,9 @@ export = class NSFW_Cuddle extends Command {
|
|||
|
||||
async command(ctx: Context) {
|
||||
let action = "nsfw_cuddle"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
import { request } from '../../utils/command.roleplay';
|
||||
|
||||
|
@ -18,10 +18,10 @@ export = class NSFW_Hold extends Command {
|
|||
}
|
||||
|
||||
async command(ctx: Context) {
|
||||
let action = "hug"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
let action = "nhold"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
import { request } from '../../utils/command.roleplay';
|
||||
|
||||
|
@ -19,9 +19,9 @@ export = class NSFW_Hug extends Command {
|
|||
|
||||
async command(ctx: Context) {
|
||||
let action = "nsfw_hug"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
import { request } from '../../utils/command.roleplay';
|
||||
|
||||
|
@ -19,9 +19,9 @@ export = class NSFW_Kiss extends Command {
|
|||
|
||||
async command(ctx: Context) {
|
||||
let action = "nsfw_kiss"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import Command from '../../handler/structures/Command';
|
||||
import { Context } from '../../utils/types';
|
||||
import { MessageEmbed } from 'discord.js';
|
||||
import lingua from '../../utils/lingua';
|
||||
import language from '../../utils/language';
|
||||
import replace from '../../utils/replace';
|
||||
import { request } from '../../utils/command.roleplay';
|
||||
|
||||
|
@ -18,9 +18,9 @@ export = class NSFW_Lick extends Command {
|
|||
|
||||
async command(ctx: Context) {
|
||||
let action = "nsfw_lick"
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_REQUIRE_MENTION))
|
||||
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?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, lingua[ctx.settings.locale].RP_SELF))
|
||||
if (ctx.message.mentions.members?.size === 0) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).missing.mention))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.client.user?.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(ctx.settings.locale).rp.client))
|
||||
if (ctx.message.mentions.members?.first()?.id === ctx.author.id) return ctx.channel.send(replace(/ACTION/g, action, language.get(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)
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 8d7df1812e79d67247d058d3c5d44de337a8f65f
|
||||
Subproject commit eb4dea0bf641938fbe2939ab6fb529915957fe17
|
|
@ -1,3 +0,0 @@
|
|||
import Language from "./lingua/index"
|
||||
|
||||
export default Language
|
Loading…
Reference in New Issue