diff --git a/src/models/GuildModel.js b/src/models/GuildModel.js index a2b3507b..da3b57f2 100644 --- a/src/models/GuildModel.js +++ b/src/models/GuildModel.js @@ -1,5 +1,5 @@ import { model, Schema } from "mongoose"; -import { langs } from "../languages/language-meta.js"; +import { client } from "../index.js"; export default model( "Guild", @@ -9,7 +9,7 @@ export default model( membersData: { type: Object, default: {} }, members: [{ type: Schema.Types.ObjectId, ref: "Member" }], - language: { type: String, default: langs.find(l => l.default).name }, + language: { type: String, default: client.configService.get("defaultLang") }, plugins: { type: Object, default: { diff --git a/src/services/languages/index.js b/src/services/languages/index.js new file mode 100644 index 00000000..e09397ee --- /dev/null +++ b/src/services/languages/index.js @@ -0,0 +1,71 @@ +import i18next from "i18next"; +import Backend from "i18next-fs-backend"; +import fs from "fs/promises"; +import { resolve, join } from "path"; +import logger from "../../helpers/logger.js"; +import supportedLanguages from "./language-meta.js"; + +export default class InternationalizationService { + /** + * Constructs an instance of the InternationalizationService. + * + * @param {import("../../index.js").client} client - The client instance. + * @param {Object} [options={}] - Optional configuration options. + */ + constructor(client, options = {}) { + this.client = client; + this.options = { + localesPath: resolve(this.client.configService.get("paths.locales")), + defaultLanguage: options.defaultLanguage || "en-US", + }; + this.i18next = this.#init(); + } + + get getSupportedLanguages() { + return supportedLanguages.map(lang => lang.locale); + } + + async #walkDirectory(dir, namespaces = [], folderName = "") { + const files = await fs.readdir(dir, { withFileTypes: true }); + + const languages = []; + for (const file of files) { + if (file.isDirectory()) { + const isLanguage = file.name.includes("-"); + if (isLanguage) languages.push(file.name); + + const folder = await this.#walkDirectory(join(dir, file.name), namespaces, isLanguage ? "" : `${file.name}/`); + + namespaces = folder.namespaces; + } else { + namespaces.push(`${folderName}${file.name.substr(0, file.name.length - 5)}`); + } + } + return { namespaces: [...new Set(namespaces)], languages }; + } + + async #init() { + const { namespaces, languages } = await this.#walkDirectory(this.options.localesPath); + + const i18n = await i18next.use(Backend).init({ + backend: { + loadPath: resolve(this.options.localesPath, "./{{lng}}/{{ns}}.json"), + }, + debug: this.client.configService.get("production") ? true : false, + fallbackLng: this.options.defaultLanguage, + preload: languages, + ns: namespaces, + defaultNS: namespaces[0], + initImmediate: false, + }); + + this.client.translate = (key, options = {}) => { + const lng = options.lng || this.options.defaultLanguage; + return i18next.t(key, { lng, ...options }); + }; + + logger.log("Internationalization initialized"); + + return i18n; + } +} diff --git a/src/services/languages/language-meta.js b/src/services/languages/language-meta.js index 78ebc405..b0d9bab9 100644 --- a/src/services/languages/language-meta.js +++ b/src/services/languages/language-meta.js @@ -4,20 +4,17 @@ export default [ nativeName: "English", locale: "en-US", format: "HH:mm:ss, MMMM Do YYYY", - default: true, }, { name: "ru-RU", nativeName: "Русский", locale: "ru-RU", format: "HH:mm:ss, Do MMMM YYYY", - default: false, }, { name: "uk-UA", nativeName: "Українська", locale: "uk-UA", format: "HH:mm:ss, Do MMMM YYYY", - default: false, }, ]; diff --git a/src/services/languages/en-US/administration/addemoji.json b/src/services/languages/locales/en-US/administration/addemoji.json similarity index 100% rename from src/services/languages/en-US/administration/addemoji.json rename to src/services/languages/locales/en-US/administration/addemoji.json diff --git a/src/services/languages/en-US/administration/automod.json b/src/services/languages/locales/en-US/administration/automod.json similarity index 100% rename from src/services/languages/en-US/administration/automod.json rename to src/services/languages/locales/en-US/administration/automod.json diff --git a/src/services/languages/en-US/administration/autorole.json b/src/services/languages/locales/en-US/administration/autorole.json similarity index 100% rename from src/services/languages/en-US/administration/autorole.json rename to src/services/languages/locales/en-US/administration/autorole.json diff --git a/src/services/languages/en-US/administration/config.json b/src/services/languages/locales/en-US/administration/config.json similarity index 100% rename from src/services/languages/en-US/administration/config.json rename to src/services/languages/locales/en-US/administration/config.json diff --git a/src/services/languages/en-US/administration/deletemod.json b/src/services/languages/locales/en-US/administration/deletemod.json similarity index 100% rename from src/services/languages/en-US/administration/deletemod.json rename to src/services/languages/locales/en-US/administration/deletemod.json diff --git a/src/services/languages/en-US/administration/goodbye.json b/src/services/languages/locales/en-US/administration/goodbye.json similarity index 100% rename from src/services/languages/en-US/administration/goodbye.json rename to src/services/languages/locales/en-US/administration/goodbye.json diff --git a/src/services/languages/en-US/administration/selectroles.json b/src/services/languages/locales/en-US/administration/selectroles.json similarity index 100% rename from src/services/languages/en-US/administration/selectroles.json rename to src/services/languages/locales/en-US/administration/selectroles.json diff --git a/src/services/languages/en-US/administration/set.json b/src/services/languages/locales/en-US/administration/set.json similarity index 100% rename from src/services/languages/en-US/administration/set.json rename to src/services/languages/locales/en-US/administration/set.json diff --git a/src/services/languages/en-US/administration/setlang.json b/src/services/languages/locales/en-US/administration/setlang.json similarity index 100% rename from src/services/languages/en-US/administration/setlang.json rename to src/services/languages/locales/en-US/administration/setlang.json diff --git a/src/services/languages/en-US/administration/stealemoji.json b/src/services/languages/locales/en-US/administration/stealemoji.json similarity index 100% rename from src/services/languages/en-US/administration/stealemoji.json rename to src/services/languages/locales/en-US/administration/stealemoji.json diff --git a/src/services/languages/en-US/administration/welcome.json b/src/services/languages/locales/en-US/administration/welcome.json similarity index 100% rename from src/services/languages/en-US/administration/welcome.json rename to src/services/languages/locales/en-US/administration/welcome.json diff --git a/src/services/languages/en-US/beatrun/courses.json b/src/services/languages/locales/en-US/beatrun/courses.json similarity index 100% rename from src/services/languages/en-US/beatrun/courses.json rename to src/services/languages/locales/en-US/beatrun/courses.json diff --git a/src/services/languages/en-US/common.json b/src/services/languages/locales/en-US/common.json similarity index 100% rename from src/services/languages/en-US/common.json rename to src/services/languages/locales/en-US/common.json diff --git a/src/services/languages/en-US/economy/achievements.json b/src/services/languages/locales/en-US/economy/achievements.json similarity index 100% rename from src/services/languages/en-US/economy/achievements.json rename to src/services/languages/locales/en-US/economy/achievements.json diff --git a/src/services/languages/en-US/economy/bank.json b/src/services/languages/locales/en-US/economy/bank.json similarity index 100% rename from src/services/languages/en-US/economy/bank.json rename to src/services/languages/locales/en-US/economy/bank.json diff --git a/src/services/languages/en-US/economy/birthdate.json b/src/services/languages/locales/en-US/economy/birthdate.json similarity index 100% rename from src/services/languages/en-US/economy/birthdate.json rename to src/services/languages/locales/en-US/economy/birthdate.json diff --git a/src/services/languages/en-US/economy/divorce.json b/src/services/languages/locales/en-US/economy/divorce.json similarity index 100% rename from src/services/languages/en-US/economy/divorce.json rename to src/services/languages/locales/en-US/economy/divorce.json diff --git a/src/services/languages/en-US/economy/importmee6.json b/src/services/languages/locales/en-US/economy/importmee6.json similarity index 100% rename from src/services/languages/en-US/economy/importmee6.json rename to src/services/languages/locales/en-US/economy/importmee6.json diff --git a/src/services/languages/en-US/economy/leaderboard.json b/src/services/languages/locales/en-US/economy/leaderboard.json similarity index 100% rename from src/services/languages/en-US/economy/leaderboard.json rename to src/services/languages/locales/en-US/economy/leaderboard.json diff --git a/src/services/languages/en-US/economy/marry.json b/src/services/languages/locales/en-US/economy/marry.json similarity index 100% rename from src/services/languages/en-US/economy/marry.json rename to src/services/languages/locales/en-US/economy/marry.json diff --git a/src/services/languages/en-US/economy/money.json b/src/services/languages/locales/en-US/economy/money.json similarity index 100% rename from src/services/languages/en-US/economy/money.json rename to src/services/languages/locales/en-US/economy/money.json diff --git a/src/services/languages/en-US/economy/pay.json b/src/services/languages/locales/en-US/economy/pay.json similarity index 100% rename from src/services/languages/en-US/economy/pay.json rename to src/services/languages/locales/en-US/economy/pay.json diff --git a/src/services/languages/en-US/economy/profile.json b/src/services/languages/locales/en-US/economy/profile.json similarity index 100% rename from src/services/languages/en-US/economy/profile.json rename to src/services/languages/locales/en-US/economy/profile.json diff --git a/src/services/languages/en-US/economy/rep.json b/src/services/languages/locales/en-US/economy/rep.json similarity index 100% rename from src/services/languages/en-US/economy/rep.json rename to src/services/languages/locales/en-US/economy/rep.json diff --git a/src/services/languages/en-US/economy/rob.json b/src/services/languages/locales/en-US/economy/rob.json similarity index 100% rename from src/services/languages/en-US/economy/rob.json rename to src/services/languages/locales/en-US/economy/rob.json diff --git a/src/services/languages/en-US/economy/setbio.json b/src/services/languages/locales/en-US/economy/setbio.json similarity index 100% rename from src/services/languages/en-US/economy/setbio.json rename to src/services/languages/locales/en-US/economy/setbio.json diff --git a/src/services/languages/en-US/economy/slots.json b/src/services/languages/locales/en-US/economy/slots.json similarity index 100% rename from src/services/languages/en-US/economy/slots.json rename to src/services/languages/locales/en-US/economy/slots.json diff --git a/src/services/languages/en-US/economy/transactions.json b/src/services/languages/locales/en-US/economy/transactions.json similarity index 100% rename from src/services/languages/en-US/economy/transactions.json rename to src/services/languages/locales/en-US/economy/transactions.json diff --git a/src/services/languages/en-US/economy/work.json b/src/services/languages/locales/en-US/economy/work.json similarity index 100% rename from src/services/languages/en-US/economy/work.json rename to src/services/languages/locales/en-US/economy/work.json diff --git a/src/services/languages/en-US/fun/8ball.json b/src/services/languages/locales/en-US/fun/8ball.json similarity index 100% rename from src/services/languages/en-US/fun/8ball.json rename to src/services/languages/locales/en-US/fun/8ball.json diff --git a/src/services/languages/en-US/fun/cat.json b/src/services/languages/locales/en-US/fun/cat.json similarity index 100% rename from src/services/languages/en-US/fun/cat.json rename to src/services/languages/locales/en-US/fun/cat.json diff --git a/src/services/languages/en-US/fun/dog.json b/src/services/languages/locales/en-US/fun/dog.json similarity index 100% rename from src/services/languages/en-US/fun/dog.json rename to src/services/languages/locales/en-US/fun/dog.json diff --git a/src/services/languages/en-US/fun/lmgtfy.json b/src/services/languages/locales/en-US/fun/lmgtfy.json similarity index 100% rename from src/services/languages/en-US/fun/lmgtfy.json rename to src/services/languages/locales/en-US/fun/lmgtfy.json diff --git a/src/services/languages/en-US/fun/lovecalc.json b/src/services/languages/locales/en-US/fun/lovecalc.json similarity index 100% rename from src/services/languages/en-US/fun/lovecalc.json rename to src/services/languages/locales/en-US/fun/lovecalc.json diff --git a/src/services/languages/en-US/fun/memes.json b/src/services/languages/locales/en-US/fun/memes.json similarity index 100% rename from src/services/languages/en-US/fun/memes.json rename to src/services/languages/locales/en-US/fun/memes.json diff --git a/src/services/languages/en-US/fun/number.json b/src/services/languages/locales/en-US/fun/number.json similarity index 100% rename from src/services/languages/en-US/fun/number.json rename to src/services/languages/locales/en-US/fun/number.json diff --git a/src/services/languages/en-US/fun/tictactoe.json b/src/services/languages/locales/en-US/fun/tictactoe.json similarity index 100% rename from src/services/languages/en-US/fun/tictactoe.json rename to src/services/languages/locales/en-US/fun/tictactoe.json diff --git a/src/services/languages/en-US/general/afk.json b/src/services/languages/locales/en-US/general/afk.json similarity index 100% rename from src/services/languages/en-US/general/afk.json rename to src/services/languages/locales/en-US/general/afk.json diff --git a/src/services/languages/en-US/general/avatar.json b/src/services/languages/locales/en-US/general/avatar.json similarity index 100% rename from src/services/languages/en-US/general/avatar.json rename to src/services/languages/locales/en-US/general/avatar.json diff --git a/src/services/languages/en-US/general/boosters.json b/src/services/languages/locales/en-US/general/boosters.json similarity index 100% rename from src/services/languages/en-US/general/boosters.json rename to src/services/languages/locales/en-US/general/boosters.json diff --git a/src/services/languages/en-US/general/emoji.json b/src/services/languages/locales/en-US/general/emoji.json similarity index 100% rename from src/services/languages/en-US/general/emoji.json rename to src/services/languages/locales/en-US/general/emoji.json diff --git a/src/services/languages/en-US/general/help.json b/src/services/languages/locales/en-US/general/help.json similarity index 100% rename from src/services/languages/en-US/general/help.json rename to src/services/languages/locales/en-US/general/help.json diff --git a/src/services/languages/en-US/general/info.json b/src/services/languages/locales/en-US/general/info.json similarity index 100% rename from src/services/languages/en-US/general/info.json rename to src/services/languages/locales/en-US/general/info.json diff --git a/src/services/languages/en-US/general/minecraft.json b/src/services/languages/locales/en-US/general/minecraft.json similarity index 100% rename from src/services/languages/en-US/general/minecraft.json rename to src/services/languages/locales/en-US/general/minecraft.json diff --git a/src/services/languages/en-US/general/ping.json b/src/services/languages/locales/en-US/general/ping.json similarity index 100% rename from src/services/languages/en-US/general/ping.json rename to src/services/languages/locales/en-US/general/ping.json diff --git a/src/services/languages/en-US/general/remindme.json b/src/services/languages/locales/en-US/general/remindme.json similarity index 100% rename from src/services/languages/en-US/general/remindme.json rename to src/services/languages/locales/en-US/general/remindme.json diff --git a/src/services/languages/en-US/general/reminds.json b/src/services/languages/locales/en-US/general/reminds.json similarity index 100% rename from src/services/languages/en-US/general/reminds.json rename to src/services/languages/locales/en-US/general/reminds.json diff --git a/src/services/languages/en-US/general/report.json b/src/services/languages/locales/en-US/general/report.json similarity index 100% rename from src/services/languages/en-US/general/report.json rename to src/services/languages/locales/en-US/general/report.json diff --git a/src/services/languages/en-US/general/shorturl.json b/src/services/languages/locales/en-US/general/shorturl.json similarity index 100% rename from src/services/languages/en-US/general/shorturl.json rename to src/services/languages/locales/en-US/general/shorturl.json diff --git a/src/services/languages/en-US/general/staff.json b/src/services/languages/locales/en-US/general/staff.json similarity index 100% rename from src/services/languages/en-US/general/staff.json rename to src/services/languages/locales/en-US/general/staff.json diff --git a/src/services/languages/en-US/general/stats.json b/src/services/languages/locales/en-US/general/stats.json similarity index 100% rename from src/services/languages/en-US/general/stats.json rename to src/services/languages/locales/en-US/general/stats.json diff --git a/src/services/languages/en-US/general/suggest.json b/src/services/languages/locales/en-US/general/suggest.json similarity index 100% rename from src/services/languages/en-US/general/suggest.json rename to src/services/languages/locales/en-US/general/suggest.json diff --git a/src/services/languages/en-US/general/whois.json b/src/services/languages/locales/en-US/general/whois.json similarity index 100% rename from src/services/languages/en-US/general/whois.json rename to src/services/languages/locales/en-US/general/whois.json diff --git a/src/services/languages/en-US/iat/checkjar.json b/src/services/languages/locales/en-US/iat/checkjar.json similarity index 100% rename from src/services/languages/en-US/iat/checkjar.json rename to src/services/languages/locales/en-US/iat/checkjar.json diff --git a/src/services/languages/en-US/misc.json b/src/services/languages/locales/en-US/misc.json similarity index 100% rename from src/services/languages/en-US/misc.json rename to src/services/languages/locales/en-US/misc.json diff --git a/src/services/languages/en-US/moderation/ban.json b/src/services/languages/locales/en-US/moderation/ban.json similarity index 100% rename from src/services/languages/en-US/moderation/ban.json rename to src/services/languages/locales/en-US/moderation/ban.json diff --git a/src/services/languages/en-US/moderation/clear.json b/src/services/languages/locales/en-US/moderation/clear.json similarity index 100% rename from src/services/languages/en-US/moderation/clear.json rename to src/services/languages/locales/en-US/moderation/clear.json diff --git a/src/services/languages/en-US/moderation/clearwarns.json b/src/services/languages/locales/en-US/moderation/clearwarns.json similarity index 100% rename from src/services/languages/en-US/moderation/clearwarns.json rename to src/services/languages/locales/en-US/moderation/clearwarns.json diff --git a/src/services/languages/en-US/moderation/giveaway.json b/src/services/languages/locales/en-US/moderation/giveaway.json similarity index 100% rename from src/services/languages/en-US/moderation/giveaway.json rename to src/services/languages/locales/en-US/moderation/giveaway.json diff --git a/src/services/languages/en-US/moderation/kick.json b/src/services/languages/locales/en-US/moderation/kick.json similarity index 100% rename from src/services/languages/en-US/moderation/kick.json rename to src/services/languages/locales/en-US/moderation/kick.json diff --git a/src/services/languages/en-US/moderation/unban.json b/src/services/languages/locales/en-US/moderation/unban.json similarity index 100% rename from src/services/languages/en-US/moderation/unban.json rename to src/services/languages/locales/en-US/moderation/unban.json diff --git a/src/services/languages/en-US/moderation/untimeout.json b/src/services/languages/locales/en-US/moderation/untimeout.json similarity index 100% rename from src/services/languages/en-US/moderation/untimeout.json rename to src/services/languages/locales/en-US/moderation/untimeout.json diff --git a/src/services/languages/en-US/moderation/warn.json b/src/services/languages/locales/en-US/moderation/warn.json similarity index 100% rename from src/services/languages/en-US/moderation/warn.json rename to src/services/languages/locales/en-US/moderation/warn.json diff --git a/src/services/languages/en-US/moderation/warns.json b/src/services/languages/locales/en-US/moderation/warns.json similarity index 100% rename from src/services/languages/en-US/moderation/warns.json rename to src/services/languages/locales/en-US/moderation/warns.json diff --git a/src/services/languages/en-US/music/back.json b/src/services/languages/locales/en-US/music/back.json similarity index 100% rename from src/services/languages/en-US/music/back.json rename to src/services/languages/locales/en-US/music/back.json diff --git a/src/services/languages/en-US/music/clips.json b/src/services/languages/locales/en-US/music/clips.json similarity index 100% rename from src/services/languages/en-US/music/clips.json rename to src/services/languages/locales/en-US/music/clips.json diff --git a/src/services/languages/en-US/music/loop.json b/src/services/languages/locales/en-US/music/loop.json similarity index 100% rename from src/services/languages/en-US/music/loop.json rename to src/services/languages/locales/en-US/music/loop.json diff --git a/src/services/languages/en-US/music/nowplaying.json b/src/services/languages/locales/en-US/music/nowplaying.json similarity index 100% rename from src/services/languages/en-US/music/nowplaying.json rename to src/services/languages/locales/en-US/music/nowplaying.json diff --git a/src/services/languages/en-US/music/play.json b/src/services/languages/locales/en-US/music/play.json similarity index 100% rename from src/services/languages/en-US/music/play.json rename to src/services/languages/locales/en-US/music/play.json diff --git a/src/services/languages/en-US/music/queue.json b/src/services/languages/locales/en-US/music/queue.json similarity index 100% rename from src/services/languages/en-US/music/queue.json rename to src/services/languages/locales/en-US/music/queue.json diff --git a/src/services/languages/en-US/music/seek.json b/src/services/languages/locales/en-US/music/seek.json similarity index 100% rename from src/services/languages/en-US/music/seek.json rename to src/services/languages/locales/en-US/music/seek.json diff --git a/src/services/languages/en-US/music/shuffle.json b/src/services/languages/locales/en-US/music/shuffle.json similarity index 100% rename from src/services/languages/en-US/music/shuffle.json rename to src/services/languages/locales/en-US/music/shuffle.json diff --git a/src/services/languages/en-US/music/skip.json b/src/services/languages/locales/en-US/music/skip.json similarity index 100% rename from src/services/languages/en-US/music/skip.json rename to src/services/languages/locales/en-US/music/skip.json diff --git a/src/services/languages/en-US/music/stop.json b/src/services/languages/locales/en-US/music/stop.json similarity index 100% rename from src/services/languages/en-US/music/stop.json rename to src/services/languages/locales/en-US/music/stop.json diff --git a/src/services/languages/en-US/music/volume.json b/src/services/languages/locales/en-US/music/volume.json similarity index 100% rename from src/services/languages/en-US/music/volume.json rename to src/services/languages/locales/en-US/music/volume.json diff --git a/src/services/languages/en-US/owner/announcement.json b/src/services/languages/locales/en-US/owner/announcement.json similarity index 100% rename from src/services/languages/en-US/owner/announcement.json rename to src/services/languages/locales/en-US/owner/announcement.json diff --git a/src/services/languages/en-US/owner/debug.json b/src/services/languages/locales/en-US/owner/debug.json similarity index 100% rename from src/services/languages/en-US/owner/debug.json rename to src/services/languages/locales/en-US/owner/debug.json diff --git a/src/services/languages/en-US/owner/eval.json b/src/services/languages/locales/en-US/owner/eval.json similarity index 100% rename from src/services/languages/en-US/owner/eval.json rename to src/services/languages/locales/en-US/owner/eval.json diff --git a/src/services/languages/en-US/owner/reload.json b/src/services/languages/locales/en-US/owner/reload.json similarity index 100% rename from src/services/languages/en-US/owner/reload.json rename to src/services/languages/locales/en-US/owner/reload.json diff --git a/src/services/languages/en-US/owner/say.json b/src/services/languages/locales/en-US/owner/say.json similarity index 100% rename from src/services/languages/en-US/owner/say.json rename to src/services/languages/locales/en-US/owner/say.json diff --git a/src/services/languages/en-US/owner/servers.json b/src/services/languages/locales/en-US/owner/servers.json similarity index 100% rename from src/services/languages/en-US/owner/servers.json rename to src/services/languages/locales/en-US/owner/servers.json diff --git a/src/services/languages/en-US/tickets/adduser.json b/src/services/languages/locales/en-US/tickets/adduser.json similarity index 100% rename from src/services/languages/en-US/tickets/adduser.json rename to src/services/languages/locales/en-US/tickets/adduser.json diff --git a/src/services/languages/en-US/tickets/closeticket.json b/src/services/languages/locales/en-US/tickets/closeticket.json similarity index 100% rename from src/services/languages/en-US/tickets/closeticket.json rename to src/services/languages/locales/en-US/tickets/closeticket.json diff --git a/src/services/languages/en-US/tickets/createticketembed.json b/src/services/languages/locales/en-US/tickets/createticketembed.json similarity index 100% rename from src/services/languages/en-US/tickets/createticketembed.json rename to src/services/languages/locales/en-US/tickets/createticketembed.json diff --git a/src/services/languages/en-US/tickets/removeuser.json b/src/services/languages/locales/en-US/tickets/removeuser.json similarity index 100% rename from src/services/languages/en-US/tickets/removeuser.json rename to src/services/languages/locales/en-US/tickets/removeuser.json diff --git a/src/services/languages/ru-RU/administration/addemoji.json b/src/services/languages/locales/ru-RU/administration/addemoji.json similarity index 100% rename from src/services/languages/ru-RU/administration/addemoji.json rename to src/services/languages/locales/ru-RU/administration/addemoji.json diff --git a/src/services/languages/ru-RU/administration/automod.json b/src/services/languages/locales/ru-RU/administration/automod.json similarity index 100% rename from src/services/languages/ru-RU/administration/automod.json rename to src/services/languages/locales/ru-RU/administration/automod.json diff --git a/src/services/languages/ru-RU/administration/autorole.json b/src/services/languages/locales/ru-RU/administration/autorole.json similarity index 100% rename from src/services/languages/ru-RU/administration/autorole.json rename to src/services/languages/locales/ru-RU/administration/autorole.json diff --git a/src/services/languages/ru-RU/administration/config.json b/src/services/languages/locales/ru-RU/administration/config.json similarity index 100% rename from src/services/languages/ru-RU/administration/config.json rename to src/services/languages/locales/ru-RU/administration/config.json diff --git a/src/services/languages/ru-RU/administration/deletemod.json b/src/services/languages/locales/ru-RU/administration/deletemod.json similarity index 100% rename from src/services/languages/ru-RU/administration/deletemod.json rename to src/services/languages/locales/ru-RU/administration/deletemod.json diff --git a/src/services/languages/ru-RU/administration/goodbye.json b/src/services/languages/locales/ru-RU/administration/goodbye.json similarity index 100% rename from src/services/languages/ru-RU/administration/goodbye.json rename to src/services/languages/locales/ru-RU/administration/goodbye.json diff --git a/src/services/languages/ru-RU/administration/selectroles.json b/src/services/languages/locales/ru-RU/administration/selectroles.json similarity index 100% rename from src/services/languages/ru-RU/administration/selectroles.json rename to src/services/languages/locales/ru-RU/administration/selectroles.json diff --git a/src/services/languages/ru-RU/administration/set.json b/src/services/languages/locales/ru-RU/administration/set.json similarity index 100% rename from src/services/languages/ru-RU/administration/set.json rename to src/services/languages/locales/ru-RU/administration/set.json diff --git a/src/services/languages/ru-RU/administration/setlang.json b/src/services/languages/locales/ru-RU/administration/setlang.json similarity index 100% rename from src/services/languages/ru-RU/administration/setlang.json rename to src/services/languages/locales/ru-RU/administration/setlang.json diff --git a/src/services/languages/ru-RU/administration/stealemoji.json b/src/services/languages/locales/ru-RU/administration/stealemoji.json similarity index 100% rename from src/services/languages/ru-RU/administration/stealemoji.json rename to src/services/languages/locales/ru-RU/administration/stealemoji.json diff --git a/src/services/languages/ru-RU/administration/welcome.json b/src/services/languages/locales/ru-RU/administration/welcome.json similarity index 100% rename from src/services/languages/ru-RU/administration/welcome.json rename to src/services/languages/locales/ru-RU/administration/welcome.json diff --git a/src/services/languages/ru-RU/beatrun/courses.json b/src/services/languages/locales/ru-RU/beatrun/courses.json similarity index 100% rename from src/services/languages/ru-RU/beatrun/courses.json rename to src/services/languages/locales/ru-RU/beatrun/courses.json diff --git a/src/services/languages/ru-RU/common.json b/src/services/languages/locales/ru-RU/common.json similarity index 100% rename from src/services/languages/ru-RU/common.json rename to src/services/languages/locales/ru-RU/common.json diff --git a/src/services/languages/ru-RU/economy/achievements.json b/src/services/languages/locales/ru-RU/economy/achievements.json similarity index 100% rename from src/services/languages/ru-RU/economy/achievements.json rename to src/services/languages/locales/ru-RU/economy/achievements.json diff --git a/src/services/languages/ru-RU/economy/bank.json b/src/services/languages/locales/ru-RU/economy/bank.json similarity index 100% rename from src/services/languages/ru-RU/economy/bank.json rename to src/services/languages/locales/ru-RU/economy/bank.json diff --git a/src/services/languages/ru-RU/economy/birthdate.json b/src/services/languages/locales/ru-RU/economy/birthdate.json similarity index 100% rename from src/services/languages/ru-RU/economy/birthdate.json rename to src/services/languages/locales/ru-RU/economy/birthdate.json diff --git a/src/services/languages/ru-RU/economy/divorce.json b/src/services/languages/locales/ru-RU/economy/divorce.json similarity index 100% rename from src/services/languages/ru-RU/economy/divorce.json rename to src/services/languages/locales/ru-RU/economy/divorce.json diff --git a/src/services/languages/ru-RU/economy/importmee6.json b/src/services/languages/locales/ru-RU/economy/importmee6.json similarity index 100% rename from src/services/languages/ru-RU/economy/importmee6.json rename to src/services/languages/locales/ru-RU/economy/importmee6.json diff --git a/src/services/languages/ru-RU/economy/leaderboard.json b/src/services/languages/locales/ru-RU/economy/leaderboard.json similarity index 100% rename from src/services/languages/ru-RU/economy/leaderboard.json rename to src/services/languages/locales/ru-RU/economy/leaderboard.json diff --git a/src/services/languages/ru-RU/economy/marry.json b/src/services/languages/locales/ru-RU/economy/marry.json similarity index 100% rename from src/services/languages/ru-RU/economy/marry.json rename to src/services/languages/locales/ru-RU/economy/marry.json diff --git a/src/services/languages/ru-RU/economy/money.json b/src/services/languages/locales/ru-RU/economy/money.json similarity index 100% rename from src/services/languages/ru-RU/economy/money.json rename to src/services/languages/locales/ru-RU/economy/money.json diff --git a/src/services/languages/ru-RU/economy/pay.json b/src/services/languages/locales/ru-RU/economy/pay.json similarity index 100% rename from src/services/languages/ru-RU/economy/pay.json rename to src/services/languages/locales/ru-RU/economy/pay.json diff --git a/src/services/languages/ru-RU/economy/profile.json b/src/services/languages/locales/ru-RU/economy/profile.json similarity index 100% rename from src/services/languages/ru-RU/economy/profile.json rename to src/services/languages/locales/ru-RU/economy/profile.json diff --git a/src/services/languages/ru-RU/economy/rep.json b/src/services/languages/locales/ru-RU/economy/rep.json similarity index 100% rename from src/services/languages/ru-RU/economy/rep.json rename to src/services/languages/locales/ru-RU/economy/rep.json diff --git a/src/services/languages/ru-RU/economy/rob.json b/src/services/languages/locales/ru-RU/economy/rob.json similarity index 100% rename from src/services/languages/ru-RU/economy/rob.json rename to src/services/languages/locales/ru-RU/economy/rob.json diff --git a/src/services/languages/ru-RU/economy/setbio.json b/src/services/languages/locales/ru-RU/economy/setbio.json similarity index 100% rename from src/services/languages/ru-RU/economy/setbio.json rename to src/services/languages/locales/ru-RU/economy/setbio.json diff --git a/src/services/languages/ru-RU/economy/slots.json b/src/services/languages/locales/ru-RU/economy/slots.json similarity index 100% rename from src/services/languages/ru-RU/economy/slots.json rename to src/services/languages/locales/ru-RU/economy/slots.json diff --git a/src/services/languages/ru-RU/economy/transactions.json b/src/services/languages/locales/ru-RU/economy/transactions.json similarity index 100% rename from src/services/languages/ru-RU/economy/transactions.json rename to src/services/languages/locales/ru-RU/economy/transactions.json diff --git a/src/services/languages/ru-RU/economy/work.json b/src/services/languages/locales/ru-RU/economy/work.json similarity index 100% rename from src/services/languages/ru-RU/economy/work.json rename to src/services/languages/locales/ru-RU/economy/work.json diff --git a/src/services/languages/ru-RU/fun/8ball.json b/src/services/languages/locales/ru-RU/fun/8ball.json similarity index 100% rename from src/services/languages/ru-RU/fun/8ball.json rename to src/services/languages/locales/ru-RU/fun/8ball.json diff --git a/src/services/languages/ru-RU/fun/cat.json b/src/services/languages/locales/ru-RU/fun/cat.json similarity index 100% rename from src/services/languages/ru-RU/fun/cat.json rename to src/services/languages/locales/ru-RU/fun/cat.json diff --git a/src/services/languages/ru-RU/fun/dog.json b/src/services/languages/locales/ru-RU/fun/dog.json similarity index 100% rename from src/services/languages/ru-RU/fun/dog.json rename to src/services/languages/locales/ru-RU/fun/dog.json diff --git a/src/services/languages/ru-RU/fun/lmgtfy.json b/src/services/languages/locales/ru-RU/fun/lmgtfy.json similarity index 100% rename from src/services/languages/ru-RU/fun/lmgtfy.json rename to src/services/languages/locales/ru-RU/fun/lmgtfy.json diff --git a/src/services/languages/ru-RU/fun/lovecalc.json b/src/services/languages/locales/ru-RU/fun/lovecalc.json similarity index 100% rename from src/services/languages/ru-RU/fun/lovecalc.json rename to src/services/languages/locales/ru-RU/fun/lovecalc.json diff --git a/src/services/languages/ru-RU/fun/memes.json b/src/services/languages/locales/ru-RU/fun/memes.json similarity index 100% rename from src/services/languages/ru-RU/fun/memes.json rename to src/services/languages/locales/ru-RU/fun/memes.json diff --git a/src/services/languages/ru-RU/fun/number.json b/src/services/languages/locales/ru-RU/fun/number.json similarity index 100% rename from src/services/languages/ru-RU/fun/number.json rename to src/services/languages/locales/ru-RU/fun/number.json diff --git a/src/services/languages/ru-RU/fun/tictactoe.json b/src/services/languages/locales/ru-RU/fun/tictactoe.json similarity index 100% rename from src/services/languages/ru-RU/fun/tictactoe.json rename to src/services/languages/locales/ru-RU/fun/tictactoe.json diff --git a/src/services/languages/ru-RU/general/afk.json b/src/services/languages/locales/ru-RU/general/afk.json similarity index 100% rename from src/services/languages/ru-RU/general/afk.json rename to src/services/languages/locales/ru-RU/general/afk.json diff --git a/src/services/languages/ru-RU/general/avatar.json b/src/services/languages/locales/ru-RU/general/avatar.json similarity index 100% rename from src/services/languages/ru-RU/general/avatar.json rename to src/services/languages/locales/ru-RU/general/avatar.json diff --git a/src/services/languages/ru-RU/general/boosters.json b/src/services/languages/locales/ru-RU/general/boosters.json similarity index 100% rename from src/services/languages/ru-RU/general/boosters.json rename to src/services/languages/locales/ru-RU/general/boosters.json diff --git a/src/services/languages/ru-RU/general/emoji.json b/src/services/languages/locales/ru-RU/general/emoji.json similarity index 100% rename from src/services/languages/ru-RU/general/emoji.json rename to src/services/languages/locales/ru-RU/general/emoji.json diff --git a/src/services/languages/ru-RU/general/help.json b/src/services/languages/locales/ru-RU/general/help.json similarity index 100% rename from src/services/languages/ru-RU/general/help.json rename to src/services/languages/locales/ru-RU/general/help.json diff --git a/src/services/languages/ru-RU/general/info.json b/src/services/languages/locales/ru-RU/general/info.json similarity index 100% rename from src/services/languages/ru-RU/general/info.json rename to src/services/languages/locales/ru-RU/general/info.json diff --git a/src/services/languages/ru-RU/general/minecraft.json b/src/services/languages/locales/ru-RU/general/minecraft.json similarity index 100% rename from src/services/languages/ru-RU/general/minecraft.json rename to src/services/languages/locales/ru-RU/general/minecraft.json diff --git a/src/services/languages/ru-RU/general/ping.json b/src/services/languages/locales/ru-RU/general/ping.json similarity index 100% rename from src/services/languages/ru-RU/general/ping.json rename to src/services/languages/locales/ru-RU/general/ping.json diff --git a/src/services/languages/ru-RU/general/remindme.json b/src/services/languages/locales/ru-RU/general/remindme.json similarity index 100% rename from src/services/languages/ru-RU/general/remindme.json rename to src/services/languages/locales/ru-RU/general/remindme.json diff --git a/src/services/languages/ru-RU/general/reminds.json b/src/services/languages/locales/ru-RU/general/reminds.json similarity index 100% rename from src/services/languages/ru-RU/general/reminds.json rename to src/services/languages/locales/ru-RU/general/reminds.json diff --git a/src/services/languages/ru-RU/general/report.json b/src/services/languages/locales/ru-RU/general/report.json similarity index 100% rename from src/services/languages/ru-RU/general/report.json rename to src/services/languages/locales/ru-RU/general/report.json diff --git a/src/services/languages/ru-RU/general/shorturl.json b/src/services/languages/locales/ru-RU/general/shorturl.json similarity index 100% rename from src/services/languages/ru-RU/general/shorturl.json rename to src/services/languages/locales/ru-RU/general/shorturl.json diff --git a/src/services/languages/ru-RU/general/staff.json b/src/services/languages/locales/ru-RU/general/staff.json similarity index 100% rename from src/services/languages/ru-RU/general/staff.json rename to src/services/languages/locales/ru-RU/general/staff.json diff --git a/src/services/languages/ru-RU/general/stats.json b/src/services/languages/locales/ru-RU/general/stats.json similarity index 100% rename from src/services/languages/ru-RU/general/stats.json rename to src/services/languages/locales/ru-RU/general/stats.json diff --git a/src/services/languages/ru-RU/general/suggest.json b/src/services/languages/locales/ru-RU/general/suggest.json similarity index 100% rename from src/services/languages/ru-RU/general/suggest.json rename to src/services/languages/locales/ru-RU/general/suggest.json diff --git a/src/services/languages/ru-RU/general/whois.json b/src/services/languages/locales/ru-RU/general/whois.json similarity index 100% rename from src/services/languages/ru-RU/general/whois.json rename to src/services/languages/locales/ru-RU/general/whois.json diff --git a/src/services/languages/ru-RU/iat/checkjar.json b/src/services/languages/locales/ru-RU/iat/checkjar.json similarity index 100% rename from src/services/languages/ru-RU/iat/checkjar.json rename to src/services/languages/locales/ru-RU/iat/checkjar.json diff --git a/src/services/languages/ru-RU/misc.json b/src/services/languages/locales/ru-RU/misc.json similarity index 100% rename from src/services/languages/ru-RU/misc.json rename to src/services/languages/locales/ru-RU/misc.json diff --git a/src/services/languages/ru-RU/moderation/ban.json b/src/services/languages/locales/ru-RU/moderation/ban.json similarity index 100% rename from src/services/languages/ru-RU/moderation/ban.json rename to src/services/languages/locales/ru-RU/moderation/ban.json diff --git a/src/services/languages/ru-RU/moderation/clear.json b/src/services/languages/locales/ru-RU/moderation/clear.json similarity index 100% rename from src/services/languages/ru-RU/moderation/clear.json rename to src/services/languages/locales/ru-RU/moderation/clear.json diff --git a/src/services/languages/ru-RU/moderation/clearwarns.json b/src/services/languages/locales/ru-RU/moderation/clearwarns.json similarity index 100% rename from src/services/languages/ru-RU/moderation/clearwarns.json rename to src/services/languages/locales/ru-RU/moderation/clearwarns.json diff --git a/src/services/languages/ru-RU/moderation/giveaway.json b/src/services/languages/locales/ru-RU/moderation/giveaway.json similarity index 100% rename from src/services/languages/ru-RU/moderation/giveaway.json rename to src/services/languages/locales/ru-RU/moderation/giveaway.json diff --git a/src/services/languages/ru-RU/moderation/kick.json b/src/services/languages/locales/ru-RU/moderation/kick.json similarity index 100% rename from src/services/languages/ru-RU/moderation/kick.json rename to src/services/languages/locales/ru-RU/moderation/kick.json diff --git a/src/services/languages/ru-RU/moderation/unban.json b/src/services/languages/locales/ru-RU/moderation/unban.json similarity index 100% rename from src/services/languages/ru-RU/moderation/unban.json rename to src/services/languages/locales/ru-RU/moderation/unban.json diff --git a/src/services/languages/ru-RU/moderation/untimeout.json b/src/services/languages/locales/ru-RU/moderation/untimeout.json similarity index 100% rename from src/services/languages/ru-RU/moderation/untimeout.json rename to src/services/languages/locales/ru-RU/moderation/untimeout.json diff --git a/src/services/languages/ru-RU/moderation/warn.json b/src/services/languages/locales/ru-RU/moderation/warn.json similarity index 100% rename from src/services/languages/ru-RU/moderation/warn.json rename to src/services/languages/locales/ru-RU/moderation/warn.json diff --git a/src/services/languages/ru-RU/moderation/warns.json b/src/services/languages/locales/ru-RU/moderation/warns.json similarity index 100% rename from src/services/languages/ru-RU/moderation/warns.json rename to src/services/languages/locales/ru-RU/moderation/warns.json diff --git a/src/services/languages/ru-RU/music/back.json b/src/services/languages/locales/ru-RU/music/back.json similarity index 100% rename from src/services/languages/ru-RU/music/back.json rename to src/services/languages/locales/ru-RU/music/back.json diff --git a/src/services/languages/ru-RU/music/clips.json b/src/services/languages/locales/ru-RU/music/clips.json similarity index 100% rename from src/services/languages/ru-RU/music/clips.json rename to src/services/languages/locales/ru-RU/music/clips.json diff --git a/src/services/languages/ru-RU/music/loop.json b/src/services/languages/locales/ru-RU/music/loop.json similarity index 100% rename from src/services/languages/ru-RU/music/loop.json rename to src/services/languages/locales/ru-RU/music/loop.json diff --git a/src/services/languages/ru-RU/music/nowplaying.json b/src/services/languages/locales/ru-RU/music/nowplaying.json similarity index 100% rename from src/services/languages/ru-RU/music/nowplaying.json rename to src/services/languages/locales/ru-RU/music/nowplaying.json diff --git a/src/services/languages/ru-RU/music/play.json b/src/services/languages/locales/ru-RU/music/play.json similarity index 100% rename from src/services/languages/ru-RU/music/play.json rename to src/services/languages/locales/ru-RU/music/play.json diff --git a/src/services/languages/ru-RU/music/queue.json b/src/services/languages/locales/ru-RU/music/queue.json similarity index 100% rename from src/services/languages/ru-RU/music/queue.json rename to src/services/languages/locales/ru-RU/music/queue.json diff --git a/src/services/languages/ru-RU/music/seek.json b/src/services/languages/locales/ru-RU/music/seek.json similarity index 100% rename from src/services/languages/ru-RU/music/seek.json rename to src/services/languages/locales/ru-RU/music/seek.json diff --git a/src/services/languages/ru-RU/music/shuffle.json b/src/services/languages/locales/ru-RU/music/shuffle.json similarity index 100% rename from src/services/languages/ru-RU/music/shuffle.json rename to src/services/languages/locales/ru-RU/music/shuffle.json diff --git a/src/services/languages/ru-RU/music/skip.json b/src/services/languages/locales/ru-RU/music/skip.json similarity index 100% rename from src/services/languages/ru-RU/music/skip.json rename to src/services/languages/locales/ru-RU/music/skip.json diff --git a/src/services/languages/ru-RU/music/stop.json b/src/services/languages/locales/ru-RU/music/stop.json similarity index 100% rename from src/services/languages/ru-RU/music/stop.json rename to src/services/languages/locales/ru-RU/music/stop.json diff --git a/src/services/languages/ru-RU/music/volume.json b/src/services/languages/locales/ru-RU/music/volume.json similarity index 100% rename from src/services/languages/ru-RU/music/volume.json rename to src/services/languages/locales/ru-RU/music/volume.json diff --git a/src/services/languages/ru-RU/owner/announcement.json b/src/services/languages/locales/ru-RU/owner/announcement.json similarity index 100% rename from src/services/languages/ru-RU/owner/announcement.json rename to src/services/languages/locales/ru-RU/owner/announcement.json diff --git a/src/services/languages/ru-RU/owner/debug.json b/src/services/languages/locales/ru-RU/owner/debug.json similarity index 100% rename from src/services/languages/ru-RU/owner/debug.json rename to src/services/languages/locales/ru-RU/owner/debug.json diff --git a/src/services/languages/ru-RU/owner/eval.json b/src/services/languages/locales/ru-RU/owner/eval.json similarity index 100% rename from src/services/languages/ru-RU/owner/eval.json rename to src/services/languages/locales/ru-RU/owner/eval.json diff --git a/src/services/languages/ru-RU/owner/reload.json b/src/services/languages/locales/ru-RU/owner/reload.json similarity index 100% rename from src/services/languages/ru-RU/owner/reload.json rename to src/services/languages/locales/ru-RU/owner/reload.json diff --git a/src/services/languages/ru-RU/owner/say.json b/src/services/languages/locales/ru-RU/owner/say.json similarity index 100% rename from src/services/languages/ru-RU/owner/say.json rename to src/services/languages/locales/ru-RU/owner/say.json diff --git a/src/services/languages/ru-RU/owner/servers.json b/src/services/languages/locales/ru-RU/owner/servers.json similarity index 100% rename from src/services/languages/ru-RU/owner/servers.json rename to src/services/languages/locales/ru-RU/owner/servers.json diff --git a/src/services/languages/ru-RU/tickets/adduser.json b/src/services/languages/locales/ru-RU/tickets/adduser.json similarity index 100% rename from src/services/languages/ru-RU/tickets/adduser.json rename to src/services/languages/locales/ru-RU/tickets/adduser.json diff --git a/src/services/languages/ru-RU/tickets/closeticket.json b/src/services/languages/locales/ru-RU/tickets/closeticket.json similarity index 100% rename from src/services/languages/ru-RU/tickets/closeticket.json rename to src/services/languages/locales/ru-RU/tickets/closeticket.json diff --git a/src/services/languages/ru-RU/tickets/createticketembed.json b/src/services/languages/locales/ru-RU/tickets/createticketembed.json similarity index 100% rename from src/services/languages/ru-RU/tickets/createticketembed.json rename to src/services/languages/locales/ru-RU/tickets/createticketembed.json diff --git a/src/services/languages/ru-RU/tickets/removeuser.json b/src/services/languages/locales/ru-RU/tickets/removeuser.json similarity index 100% rename from src/services/languages/ru-RU/tickets/removeuser.json rename to src/services/languages/locales/ru-RU/tickets/removeuser.json diff --git a/src/services/languages/uk-UA/administration/addemoji.json b/src/services/languages/locales/uk-UA/administration/addemoji.json similarity index 100% rename from src/services/languages/uk-UA/administration/addemoji.json rename to src/services/languages/locales/uk-UA/administration/addemoji.json diff --git a/src/services/languages/uk-UA/administration/automod.json b/src/services/languages/locales/uk-UA/administration/automod.json similarity index 100% rename from src/services/languages/uk-UA/administration/automod.json rename to src/services/languages/locales/uk-UA/administration/automod.json diff --git a/src/services/languages/uk-UA/administration/autorole.json b/src/services/languages/locales/uk-UA/administration/autorole.json similarity index 100% rename from src/services/languages/uk-UA/administration/autorole.json rename to src/services/languages/locales/uk-UA/administration/autorole.json diff --git a/src/services/languages/uk-UA/administration/config.json b/src/services/languages/locales/uk-UA/administration/config.json similarity index 100% rename from src/services/languages/uk-UA/administration/config.json rename to src/services/languages/locales/uk-UA/administration/config.json diff --git a/src/services/languages/uk-UA/administration/deletemod.json b/src/services/languages/locales/uk-UA/administration/deletemod.json similarity index 100% rename from src/services/languages/uk-UA/administration/deletemod.json rename to src/services/languages/locales/uk-UA/administration/deletemod.json diff --git a/src/services/languages/uk-UA/administration/goodbye.json b/src/services/languages/locales/uk-UA/administration/goodbye.json similarity index 100% rename from src/services/languages/uk-UA/administration/goodbye.json rename to src/services/languages/locales/uk-UA/administration/goodbye.json diff --git a/src/services/languages/uk-UA/administration/selectroles.json b/src/services/languages/locales/uk-UA/administration/selectroles.json similarity index 100% rename from src/services/languages/uk-UA/administration/selectroles.json rename to src/services/languages/locales/uk-UA/administration/selectroles.json diff --git a/src/services/languages/uk-UA/administration/set.json b/src/services/languages/locales/uk-UA/administration/set.json similarity index 100% rename from src/services/languages/uk-UA/administration/set.json rename to src/services/languages/locales/uk-UA/administration/set.json diff --git a/src/services/languages/uk-UA/administration/setlang.json b/src/services/languages/locales/uk-UA/administration/setlang.json similarity index 100% rename from src/services/languages/uk-UA/administration/setlang.json rename to src/services/languages/locales/uk-UA/administration/setlang.json diff --git a/src/services/languages/uk-UA/administration/stealemoji.json b/src/services/languages/locales/uk-UA/administration/stealemoji.json similarity index 100% rename from src/services/languages/uk-UA/administration/stealemoji.json rename to src/services/languages/locales/uk-UA/administration/stealemoji.json diff --git a/src/services/languages/uk-UA/administration/welcome.json b/src/services/languages/locales/uk-UA/administration/welcome.json similarity index 100% rename from src/services/languages/uk-UA/administration/welcome.json rename to src/services/languages/locales/uk-UA/administration/welcome.json diff --git a/src/services/languages/uk-UA/beatrun/courses.json b/src/services/languages/locales/uk-UA/beatrun/courses.json similarity index 100% rename from src/services/languages/uk-UA/beatrun/courses.json rename to src/services/languages/locales/uk-UA/beatrun/courses.json diff --git a/src/services/languages/uk-UA/common.json b/src/services/languages/locales/uk-UA/common.json similarity index 100% rename from src/services/languages/uk-UA/common.json rename to src/services/languages/locales/uk-UA/common.json diff --git a/src/services/languages/uk-UA/economy/achievements.json b/src/services/languages/locales/uk-UA/economy/achievements.json similarity index 100% rename from src/services/languages/uk-UA/economy/achievements.json rename to src/services/languages/locales/uk-UA/economy/achievements.json diff --git a/src/services/languages/uk-UA/economy/bank.json b/src/services/languages/locales/uk-UA/economy/bank.json similarity index 100% rename from src/services/languages/uk-UA/economy/bank.json rename to src/services/languages/locales/uk-UA/economy/bank.json diff --git a/src/services/languages/uk-UA/economy/birthdate.json b/src/services/languages/locales/uk-UA/economy/birthdate.json similarity index 100% rename from src/services/languages/uk-UA/economy/birthdate.json rename to src/services/languages/locales/uk-UA/economy/birthdate.json diff --git a/src/services/languages/uk-UA/economy/divorce.json b/src/services/languages/locales/uk-UA/economy/divorce.json similarity index 100% rename from src/services/languages/uk-UA/economy/divorce.json rename to src/services/languages/locales/uk-UA/economy/divorce.json diff --git a/src/services/languages/uk-UA/economy/importmee6.json b/src/services/languages/locales/uk-UA/economy/importmee6.json similarity index 100% rename from src/services/languages/uk-UA/economy/importmee6.json rename to src/services/languages/locales/uk-UA/economy/importmee6.json diff --git a/src/services/languages/uk-UA/economy/leaderboard.json b/src/services/languages/locales/uk-UA/economy/leaderboard.json similarity index 100% rename from src/services/languages/uk-UA/economy/leaderboard.json rename to src/services/languages/locales/uk-UA/economy/leaderboard.json diff --git a/src/services/languages/uk-UA/economy/marry.json b/src/services/languages/locales/uk-UA/economy/marry.json similarity index 100% rename from src/services/languages/uk-UA/economy/marry.json rename to src/services/languages/locales/uk-UA/economy/marry.json diff --git a/src/services/languages/uk-UA/economy/money.json b/src/services/languages/locales/uk-UA/economy/money.json similarity index 100% rename from src/services/languages/uk-UA/economy/money.json rename to src/services/languages/locales/uk-UA/economy/money.json diff --git a/src/services/languages/uk-UA/economy/pay.json b/src/services/languages/locales/uk-UA/economy/pay.json similarity index 100% rename from src/services/languages/uk-UA/economy/pay.json rename to src/services/languages/locales/uk-UA/economy/pay.json diff --git a/src/services/languages/uk-UA/economy/profile.json b/src/services/languages/locales/uk-UA/economy/profile.json similarity index 100% rename from src/services/languages/uk-UA/economy/profile.json rename to src/services/languages/locales/uk-UA/economy/profile.json diff --git a/src/services/languages/uk-UA/economy/rep.json b/src/services/languages/locales/uk-UA/economy/rep.json similarity index 100% rename from src/services/languages/uk-UA/economy/rep.json rename to src/services/languages/locales/uk-UA/economy/rep.json diff --git a/src/services/languages/uk-UA/economy/rob.json b/src/services/languages/locales/uk-UA/economy/rob.json similarity index 100% rename from src/services/languages/uk-UA/economy/rob.json rename to src/services/languages/locales/uk-UA/economy/rob.json diff --git a/src/services/languages/uk-UA/economy/setbio.json b/src/services/languages/locales/uk-UA/economy/setbio.json similarity index 100% rename from src/services/languages/uk-UA/economy/setbio.json rename to src/services/languages/locales/uk-UA/economy/setbio.json diff --git a/src/services/languages/uk-UA/economy/slots.json b/src/services/languages/locales/uk-UA/economy/slots.json similarity index 100% rename from src/services/languages/uk-UA/economy/slots.json rename to src/services/languages/locales/uk-UA/economy/slots.json diff --git a/src/services/languages/uk-UA/economy/transactions.json b/src/services/languages/locales/uk-UA/economy/transactions.json similarity index 100% rename from src/services/languages/uk-UA/economy/transactions.json rename to src/services/languages/locales/uk-UA/economy/transactions.json diff --git a/src/services/languages/uk-UA/economy/work.json b/src/services/languages/locales/uk-UA/economy/work.json similarity index 100% rename from src/services/languages/uk-UA/economy/work.json rename to src/services/languages/locales/uk-UA/economy/work.json diff --git a/src/services/languages/uk-UA/fun/8ball.json b/src/services/languages/locales/uk-UA/fun/8ball.json similarity index 100% rename from src/services/languages/uk-UA/fun/8ball.json rename to src/services/languages/locales/uk-UA/fun/8ball.json diff --git a/src/services/languages/uk-UA/fun/cat.json b/src/services/languages/locales/uk-UA/fun/cat.json similarity index 100% rename from src/services/languages/uk-UA/fun/cat.json rename to src/services/languages/locales/uk-UA/fun/cat.json diff --git a/src/services/languages/uk-UA/fun/dog.json b/src/services/languages/locales/uk-UA/fun/dog.json similarity index 100% rename from src/services/languages/uk-UA/fun/dog.json rename to src/services/languages/locales/uk-UA/fun/dog.json diff --git a/src/services/languages/uk-UA/fun/lmgtfy.json b/src/services/languages/locales/uk-UA/fun/lmgtfy.json similarity index 100% rename from src/services/languages/uk-UA/fun/lmgtfy.json rename to src/services/languages/locales/uk-UA/fun/lmgtfy.json diff --git a/src/services/languages/uk-UA/fun/lovecalc.json b/src/services/languages/locales/uk-UA/fun/lovecalc.json similarity index 100% rename from src/services/languages/uk-UA/fun/lovecalc.json rename to src/services/languages/locales/uk-UA/fun/lovecalc.json diff --git a/src/services/languages/uk-UA/fun/memes.json b/src/services/languages/locales/uk-UA/fun/memes.json similarity index 100% rename from src/services/languages/uk-UA/fun/memes.json rename to src/services/languages/locales/uk-UA/fun/memes.json diff --git a/src/services/languages/uk-UA/fun/number.json b/src/services/languages/locales/uk-UA/fun/number.json similarity index 100% rename from src/services/languages/uk-UA/fun/number.json rename to src/services/languages/locales/uk-UA/fun/number.json diff --git a/src/services/languages/uk-UA/fun/tictactoe.json b/src/services/languages/locales/uk-UA/fun/tictactoe.json similarity index 100% rename from src/services/languages/uk-UA/fun/tictactoe.json rename to src/services/languages/locales/uk-UA/fun/tictactoe.json diff --git a/src/services/languages/uk-UA/general/afk.json b/src/services/languages/locales/uk-UA/general/afk.json similarity index 100% rename from src/services/languages/uk-UA/general/afk.json rename to src/services/languages/locales/uk-UA/general/afk.json diff --git a/src/services/languages/uk-UA/general/avatar.json b/src/services/languages/locales/uk-UA/general/avatar.json similarity index 100% rename from src/services/languages/uk-UA/general/avatar.json rename to src/services/languages/locales/uk-UA/general/avatar.json diff --git a/src/services/languages/uk-UA/general/boosters.json b/src/services/languages/locales/uk-UA/general/boosters.json similarity index 100% rename from src/services/languages/uk-UA/general/boosters.json rename to src/services/languages/locales/uk-UA/general/boosters.json diff --git a/src/services/languages/uk-UA/general/emoji.json b/src/services/languages/locales/uk-UA/general/emoji.json similarity index 100% rename from src/services/languages/uk-UA/general/emoji.json rename to src/services/languages/locales/uk-UA/general/emoji.json diff --git a/src/services/languages/uk-UA/general/help.json b/src/services/languages/locales/uk-UA/general/help.json similarity index 100% rename from src/services/languages/uk-UA/general/help.json rename to src/services/languages/locales/uk-UA/general/help.json diff --git a/src/services/languages/uk-UA/general/info.json b/src/services/languages/locales/uk-UA/general/info.json similarity index 100% rename from src/services/languages/uk-UA/general/info.json rename to src/services/languages/locales/uk-UA/general/info.json diff --git a/src/services/languages/uk-UA/general/minecraft.json b/src/services/languages/locales/uk-UA/general/minecraft.json similarity index 100% rename from src/services/languages/uk-UA/general/minecraft.json rename to src/services/languages/locales/uk-UA/general/minecraft.json diff --git a/src/services/languages/uk-UA/general/ping.json b/src/services/languages/locales/uk-UA/general/ping.json similarity index 100% rename from src/services/languages/uk-UA/general/ping.json rename to src/services/languages/locales/uk-UA/general/ping.json diff --git a/src/services/languages/uk-UA/general/remindme.json b/src/services/languages/locales/uk-UA/general/remindme.json similarity index 100% rename from src/services/languages/uk-UA/general/remindme.json rename to src/services/languages/locales/uk-UA/general/remindme.json diff --git a/src/services/languages/uk-UA/general/reminds.json b/src/services/languages/locales/uk-UA/general/reminds.json similarity index 100% rename from src/services/languages/uk-UA/general/reminds.json rename to src/services/languages/locales/uk-UA/general/reminds.json diff --git a/src/services/languages/uk-UA/general/report.json b/src/services/languages/locales/uk-UA/general/report.json similarity index 100% rename from src/services/languages/uk-UA/general/report.json rename to src/services/languages/locales/uk-UA/general/report.json diff --git a/src/services/languages/uk-UA/general/shorturl.json b/src/services/languages/locales/uk-UA/general/shorturl.json similarity index 100% rename from src/services/languages/uk-UA/general/shorturl.json rename to src/services/languages/locales/uk-UA/general/shorturl.json diff --git a/src/services/languages/uk-UA/general/staff.json b/src/services/languages/locales/uk-UA/general/staff.json similarity index 100% rename from src/services/languages/uk-UA/general/staff.json rename to src/services/languages/locales/uk-UA/general/staff.json diff --git a/src/services/languages/uk-UA/general/stats.json b/src/services/languages/locales/uk-UA/general/stats.json similarity index 100% rename from src/services/languages/uk-UA/general/stats.json rename to src/services/languages/locales/uk-UA/general/stats.json diff --git a/src/services/languages/uk-UA/general/suggest.json b/src/services/languages/locales/uk-UA/general/suggest.json similarity index 100% rename from src/services/languages/uk-UA/general/suggest.json rename to src/services/languages/locales/uk-UA/general/suggest.json diff --git a/src/services/languages/uk-UA/general/whois.json b/src/services/languages/locales/uk-UA/general/whois.json similarity index 100% rename from src/services/languages/uk-UA/general/whois.json rename to src/services/languages/locales/uk-UA/general/whois.json diff --git a/src/services/languages/uk-UA/iat/checkjar.json b/src/services/languages/locales/uk-UA/iat/checkjar.json similarity index 100% rename from src/services/languages/uk-UA/iat/checkjar.json rename to src/services/languages/locales/uk-UA/iat/checkjar.json diff --git a/src/services/languages/uk-UA/misc.json b/src/services/languages/locales/uk-UA/misc.json similarity index 100% rename from src/services/languages/uk-UA/misc.json rename to src/services/languages/locales/uk-UA/misc.json diff --git a/src/services/languages/uk-UA/moderation/ban.json b/src/services/languages/locales/uk-UA/moderation/ban.json similarity index 100% rename from src/services/languages/uk-UA/moderation/ban.json rename to src/services/languages/locales/uk-UA/moderation/ban.json diff --git a/src/services/languages/uk-UA/moderation/clear.json b/src/services/languages/locales/uk-UA/moderation/clear.json similarity index 100% rename from src/services/languages/uk-UA/moderation/clear.json rename to src/services/languages/locales/uk-UA/moderation/clear.json diff --git a/src/services/languages/uk-UA/moderation/clearwarns.json b/src/services/languages/locales/uk-UA/moderation/clearwarns.json similarity index 100% rename from src/services/languages/uk-UA/moderation/clearwarns.json rename to src/services/languages/locales/uk-UA/moderation/clearwarns.json diff --git a/src/services/languages/uk-UA/moderation/giveaway.json b/src/services/languages/locales/uk-UA/moderation/giveaway.json similarity index 100% rename from src/services/languages/uk-UA/moderation/giveaway.json rename to src/services/languages/locales/uk-UA/moderation/giveaway.json diff --git a/src/services/languages/uk-UA/moderation/kick.json b/src/services/languages/locales/uk-UA/moderation/kick.json similarity index 100% rename from src/services/languages/uk-UA/moderation/kick.json rename to src/services/languages/locales/uk-UA/moderation/kick.json diff --git a/src/services/languages/uk-UA/moderation/unban.json b/src/services/languages/locales/uk-UA/moderation/unban.json similarity index 100% rename from src/services/languages/uk-UA/moderation/unban.json rename to src/services/languages/locales/uk-UA/moderation/unban.json diff --git a/src/services/languages/uk-UA/moderation/untimeout.json b/src/services/languages/locales/uk-UA/moderation/untimeout.json similarity index 100% rename from src/services/languages/uk-UA/moderation/untimeout.json rename to src/services/languages/locales/uk-UA/moderation/untimeout.json diff --git a/src/services/languages/uk-UA/moderation/warn.json b/src/services/languages/locales/uk-UA/moderation/warn.json similarity index 100% rename from src/services/languages/uk-UA/moderation/warn.json rename to src/services/languages/locales/uk-UA/moderation/warn.json diff --git a/src/services/languages/uk-UA/moderation/warns.json b/src/services/languages/locales/uk-UA/moderation/warns.json similarity index 100% rename from src/services/languages/uk-UA/moderation/warns.json rename to src/services/languages/locales/uk-UA/moderation/warns.json diff --git a/src/services/languages/uk-UA/music/back.json b/src/services/languages/locales/uk-UA/music/back.json similarity index 100% rename from src/services/languages/uk-UA/music/back.json rename to src/services/languages/locales/uk-UA/music/back.json diff --git a/src/services/languages/uk-UA/music/clips.json b/src/services/languages/locales/uk-UA/music/clips.json similarity index 100% rename from src/services/languages/uk-UA/music/clips.json rename to src/services/languages/locales/uk-UA/music/clips.json diff --git a/src/services/languages/uk-UA/music/loop.json b/src/services/languages/locales/uk-UA/music/loop.json similarity index 100% rename from src/services/languages/uk-UA/music/loop.json rename to src/services/languages/locales/uk-UA/music/loop.json diff --git a/src/services/languages/uk-UA/music/nowplaying.json b/src/services/languages/locales/uk-UA/music/nowplaying.json similarity index 100% rename from src/services/languages/uk-UA/music/nowplaying.json rename to src/services/languages/locales/uk-UA/music/nowplaying.json diff --git a/src/services/languages/uk-UA/music/play.json b/src/services/languages/locales/uk-UA/music/play.json similarity index 100% rename from src/services/languages/uk-UA/music/play.json rename to src/services/languages/locales/uk-UA/music/play.json diff --git a/src/services/languages/uk-UA/music/queue.json b/src/services/languages/locales/uk-UA/music/queue.json similarity index 100% rename from src/services/languages/uk-UA/music/queue.json rename to src/services/languages/locales/uk-UA/music/queue.json diff --git a/src/services/languages/uk-UA/music/seek.json b/src/services/languages/locales/uk-UA/music/seek.json similarity index 100% rename from src/services/languages/uk-UA/music/seek.json rename to src/services/languages/locales/uk-UA/music/seek.json diff --git a/src/services/languages/uk-UA/music/shuffle.json b/src/services/languages/locales/uk-UA/music/shuffle.json similarity index 100% rename from src/services/languages/uk-UA/music/shuffle.json rename to src/services/languages/locales/uk-UA/music/shuffle.json diff --git a/src/services/languages/uk-UA/music/skip.json b/src/services/languages/locales/uk-UA/music/skip.json similarity index 100% rename from src/services/languages/uk-UA/music/skip.json rename to src/services/languages/locales/uk-UA/music/skip.json diff --git a/src/services/languages/uk-UA/music/stop.json b/src/services/languages/locales/uk-UA/music/stop.json similarity index 100% rename from src/services/languages/uk-UA/music/stop.json rename to src/services/languages/locales/uk-UA/music/stop.json diff --git a/src/services/languages/uk-UA/music/volume.json b/src/services/languages/locales/uk-UA/music/volume.json similarity index 100% rename from src/services/languages/uk-UA/music/volume.json rename to src/services/languages/locales/uk-UA/music/volume.json diff --git a/src/services/languages/uk-UA/owner/announcement.json b/src/services/languages/locales/uk-UA/owner/announcement.json similarity index 100% rename from src/services/languages/uk-UA/owner/announcement.json rename to src/services/languages/locales/uk-UA/owner/announcement.json diff --git a/src/services/languages/uk-UA/owner/debug.json b/src/services/languages/locales/uk-UA/owner/debug.json similarity index 100% rename from src/services/languages/uk-UA/owner/debug.json rename to src/services/languages/locales/uk-UA/owner/debug.json diff --git a/src/services/languages/uk-UA/owner/eval.json b/src/services/languages/locales/uk-UA/owner/eval.json similarity index 100% rename from src/services/languages/uk-UA/owner/eval.json rename to src/services/languages/locales/uk-UA/owner/eval.json diff --git a/src/services/languages/uk-UA/owner/reload.json b/src/services/languages/locales/uk-UA/owner/reload.json similarity index 100% rename from src/services/languages/uk-UA/owner/reload.json rename to src/services/languages/locales/uk-UA/owner/reload.json diff --git a/src/services/languages/uk-UA/owner/say.json b/src/services/languages/locales/uk-UA/owner/say.json similarity index 100% rename from src/services/languages/uk-UA/owner/say.json rename to src/services/languages/locales/uk-UA/owner/say.json diff --git a/src/services/languages/uk-UA/owner/servers.json b/src/services/languages/locales/uk-UA/owner/servers.json similarity index 100% rename from src/services/languages/uk-UA/owner/servers.json rename to src/services/languages/locales/uk-UA/owner/servers.json diff --git a/src/services/languages/uk-UA/tickets/adduser.json b/src/services/languages/locales/uk-UA/tickets/adduser.json similarity index 100% rename from src/services/languages/uk-UA/tickets/adduser.json rename to src/services/languages/locales/uk-UA/tickets/adduser.json diff --git a/src/services/languages/uk-UA/tickets/closeticket.json b/src/services/languages/locales/uk-UA/tickets/closeticket.json similarity index 100% rename from src/services/languages/uk-UA/tickets/closeticket.json rename to src/services/languages/locales/uk-UA/tickets/closeticket.json diff --git a/src/services/languages/uk-UA/tickets/createticketembed.json b/src/services/languages/locales/uk-UA/tickets/createticketembed.json similarity index 100% rename from src/services/languages/uk-UA/tickets/createticketembed.json rename to src/services/languages/locales/uk-UA/tickets/createticketembed.json diff --git a/src/services/languages/uk-UA/tickets/removeuser.json b/src/services/languages/locales/uk-UA/tickets/removeuser.json similarity index 100% rename from src/services/languages/uk-UA/tickets/removeuser.json rename to src/services/languages/locales/uk-UA/tickets/removeuser.json diff --git a/src/structures/client.js b/src/structures/client.js index 50db67d6..c55a5ac3 100644 --- a/src/structures/client.js +++ b/src/structures/client.js @@ -3,7 +3,8 @@ import MongooseAdapter from "../adapters/database/MongooseAdapter.js"; import { init as initCommands } from "../handlers/command-handler/index.js"; import { init as initEvents } from "../handlers/event-handler/index.js"; import logger from "../helpers/logger.js"; -import configService from "../services/config/index.js"; +import ConfigService from "../services/config/index.js"; +import InternationalizationService from "../services/languages/index.js"; export class ExtendedClient extends Client { /** @@ -12,8 +13,9 @@ export class ExtendedClient extends Client { constructor(options) { super(options); - this.configService = new configService(); + this.configService = new ConfigService(); this.adapter = new MongooseAdapter(this.configService.get("mongoDB")); + this.i18n = new InternationalizationService(this); } async init() {