From 85337fbfcaec41f2ec4177fc8b61598d38269464 Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sat, 5 Feb 2022 21:58:30 +0500 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D1=8C=20=D0=BF=D1=80=D0=B8=D0=B3=D0=BB=D0=B0?= =?UTF-8?q?=D1=81=D0=B8=D1=82=D1=8C=20=D0=B1=D0=BE=D1=82=D0=B0=20=D0=BD?= =?UTF-8?q?=D0=B0=20=D1=81=D0=B2=D0=BE=D0=B9=20=D1=81=D0=B5=D1=80=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=20=D0=B1=D0=B5=D0=B7=20=D1=83=D1=87=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D0=B8=D1=8F=20=D1=80=D0=B0=D0=B7=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D1=87=D0=B8=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/Administration/configuration.js | 2 +- commands/Economy/leaderboard.js | 8 ++++---- commands/General/help.js | 8 ++++---- commands/General/invite.js | 12 ++++++------ commands/General/stats.js | 3 ++- commands/General/userinfo.js | 4 ++-- dashboard/public/docs/updates.md | 3 ++- languages/en-US/misc.json | 2 +- languages/ru-RU/general/invite.json | 4 ++-- languages/ru-RU/misc.json | 2 +- languages/uk-UA/economy/marry.json | 2 +- languages/uk-UA/general/invite.json | 4 ++-- languages/uk-UA/misc.json | 2 +- 13 files changed, 29 insertions(+), 27 deletions(-) diff --git a/commands/Administration/configuration.js b/commands/Administration/configuration.js index 90cd16dd..bcfbff35 100644 --- a/commands/Administration/configuration.js +++ b/commands/Administration/configuration.js @@ -87,7 +87,7 @@ class Configuration extends Command { embed.addField(message.translate("administration/configuration:AUTODELETEMOD"), guildData.autoDeleteModCommands ? message.translate("administration/configuration:AUTODELETEMOD_ENABLED") : message.translate("administration/configuration:AUTODELETEMOD_DISABLED")); // Dashboard link - embed.addField(message.translate("administration/configuration:DASHBOARD_TITLE"), `[${message.translate("administration/configuration:DASHBOARD_CONTENT")}](${this.client.config.dashboard.baseURL})`); + embed.addField(message.translate("administration/configuration:DASHBOARD_TITLE"), `[${message.translate("administration/configuration:DASHBOARD_CONTENT")}](${data.config.dashboard.baseURL})`); message.channel.send({ embeds: [embed] diff --git a/commands/Economy/leaderboard.js b/commands/Economy/leaderboard.js index bdb8262e..7e486de7 100644 --- a/commands/Economy/leaderboard.js +++ b/commands/Economy/leaderboard.js @@ -17,7 +17,7 @@ class Leaderboard extends Command { }); } - async run(message, args) { + async run(message, args, data) { const isOnlyOnMobile = (message.member.presence.clientStatus ? JSON.stringify(Object.keys(message.member.presence.clientStatus)) === JSON.stringify(["mobile"]) : false); const type = args[0]; @@ -54,7 +54,7 @@ class Leaderboard extends Command { dynamic: true }) }) - .setColor(this.client.config.embed.color) + .setColor(data.config.embed.color) .addFields({ name: message.translate("economy/leaderboard:TOP"), value: userNames, @@ -102,7 +102,7 @@ class Leaderboard extends Command { dynamic: true }) }) - .setColor(this.client.config.embed.color) + .setColor(data.config.embed.color) .addFields({ name: message.translate("economy/leaderboard:TOP"), value: userNames, @@ -151,7 +151,7 @@ class Leaderboard extends Command { dynamic: true }) }) - .setColor(this.client.config.embed.color) + .setColor(data.config.embed.color) .addFields({ name: message.translate("economy/leaderboard:TOP"), value: userNames, diff --git a/commands/General/help.js b/commands/General/help.js index 8222de4b..93286376 100644 --- a/commands/General/help.js +++ b/commands/General/help.js @@ -51,9 +51,9 @@ class Help extends Command { .addField(message.translate("general/help:FIELD_EXAMPLES"), examples) .addField(message.translate("general/help:FIELD_ALIASES"), cmd.help.aliases.length > 0 ? cmd.help.aliases.map(a => "`" + a + "`").join("\n") : message.translate("general/help:NO_ALIAS")) .addField(message.translate("general/help:FIELD_PERMISSIONS"), cmd.conf.memberPermissions.length > 0 ? cmd.conf.memberPermissions.map((p) => `\`${p}\``).join("\n") : message.translate("general/help:NO_REQUIRED_PERMISSION")) - .setColor(this.client.config.embed.color) + .setColor(data.config.embed.color) .setFooter({ - text: this.client.config.embed.footer + text: data.config.embed.footer }); return message.channel.send({ @@ -66,7 +66,7 @@ class Help extends Command { commands.forEach((command) => { if (!categories.includes(command.help.category)) { - if (command.help.category === "Owner" && message.author.id !== this.client.config.owner.id) return; + if (command.help.category === "Owner" && message.author.id !== data.config.owner.id) return; categories.push(command.help.category); } }); @@ -94,7 +94,7 @@ class Help extends Command { dashboardLink: "https://dashboard.jaba.pp.ua/", docsLink: "https://jaba.pp.ua/docs/", donateLink: "https://qiwi.com/n/JONNYBRO/", - owner: this.client.config.owner.id + owner: data.config.owner.id })); embed.setAuthor({ name: message.translate("general/help:TITLE", { diff --git a/commands/General/invite.js b/commands/General/invite.js index 3a47194e..69316579 100644 --- a/commands/General/invite.js +++ b/commands/General/invite.js @@ -6,7 +6,7 @@ class Invite extends Command { super(client, { name: "invite", dirname: __dirname, - enabled: false, + enabled: true, guildOnly: false, aliases: ["i", "add", "vote"], memberPermissions: [], @@ -22,10 +22,10 @@ class Invite extends Command { scopes: ["bot"], permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR] }); - const voteURL = `https://discordbots.org/bot/${this.client.user.id}/vote`; - const supportURL = await this.client.functions.supportLink(this.client); + const donateLink = "https://qiwi.com/n/JONNYBRO/"; + // const voteURL = `https://discordbots.org/bot/${this.client.user.id}/vote`; - if (args[0] && args[0] === "copy") return message.channel.send({ + if (args[0] && args[0] === "copy") return message.reply({ content: inviteLink }); @@ -37,8 +37,8 @@ class Invite extends Command { prefix: data.guild.prefix || "" })) .addField(message.translate("general/invite:ADD"), inviteLink) - .addField(message.translate("general/invite:VOTE"), voteURL) - .addField(message.translate("general/invite:SUPPORT"), supportURL) + .addField(message.translate("general/invite:SUPPORT"), donateLink + `\nдля других способов пишите в ЛС <@${data.config.owner.id}>`) + // .addField(message.translate("general/invite:VOTE"), voteURL) .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer diff --git a/commands/General/stats.js b/commands/General/stats.js index cac66cd6..8295f417 100644 --- a/commands/General/stats.js +++ b/commands/General/stats.js @@ -50,8 +50,9 @@ class Stats extends Command { .addField(this.client.customEmojis.link + " " + message.translate("general/stats:LINKS_TITLE"), message.translate("misc:STATS_FOOTER", { dashboardLink: "https://dashboard.jaba.pp.ua/", docsLink: "https://jaba.pp.ua/docs/", + inviteLink: this.client.generateInvite({ scopes: ["bot"], permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR] }), donateLink: "https://qiwi.com/n/JONNYBRO/", - owner: this.client.config.owner.id + owner: data.config.owner.id })); message.channel.send({ embeds: [statsEmbed] diff --git a/commands/General/userinfo.js b/commands/General/userinfo.js index f97cd10f..b2b53d2b 100644 --- a/commands/General/userinfo.js +++ b/commands/General/userinfo.js @@ -86,10 +86,10 @@ class Userinfo extends Command { }) : (member.roles.cache.size < 1) ? message.translate("general/userinfo:NO_ROLE") : member.roles.cache.map((r) => r).join(", "))); } - if (user.bot && this.client.config.apiKeys.dbl && (this.client.config.apiKeys.dbl !== "")) { + if (user.bot && data.config.apiKeys.dbl && (data.config.apiKeys.dbl !== "")) { const res = await fetch("https://discordbots.org/api/bots/" + user.id, { headers: { - "Authorization": this.client.config.apiKeys.dbl + "Authorization": data.config.apiKeys.dbl } }); const data = await res.json(); diff --git a/dashboard/public/docs/updates.md b/dashboard/public/docs/updates.md index 8b35c730..d250a3c8 100644 --- a/dashboard/public/docs/updates.md +++ b/dashboard/public/docs/updates.md @@ -1,6 +1,7 @@ ### JaBa v3.3.6 * Изменения - * Панель управления теперь доступна по ссылке *https://dashboard.jaba.pp.ua* + * Панель управления теперь доступна по ссылке *https://dashboard.jaba.pp.ua*. + * Вы теперь можете пригласить JaBa на свой сервер по ссылке из команды *invite*, *stats* или [тут](https://discord.com/api/oauth2/authorize?client_id=708637495054565426&scope=bot&permissions=8) ### JaBa v3.3.5 * Исправления diff --git a/languages/en-US/misc.json b/languages/en-US/misc.json index ae6c9af0..8da7f8c1 100644 --- a/languages/en-US/misc.json +++ b/languages/en-US/misc.json @@ -9,7 +9,7 @@ "INVALID_TIME": "You must enter a valid time! Available units: `s`, `m`, `h` or `d`", "INVALID_NUMBER": "Please specify a valid number!", "INVALID_NUMBER_RANGE": "Please specify a valid number between **{{min}}** and **{{max}}**!", - "STATS_FOOTER": "● [Dashboard]({{dashboardLink}})\n● [Docs]({{docsLink}})\n● [Support]({{donateLink}}) (for other payment methods send DM to <@{{owner}}>)", + "STATS_FOOTER": "● [Dashboard]({{dashboardLink}})\n● [Docs]({{docsLink}})\n● [Invite JaBa]({{inviteLink}})\n● [Support]({{donateLink}}) (for other payment methods send DM to <@{{owner}}>)", "BOT_USER": "This user is a bot!", "NO_PERMS": "You must have an administration rights to perform this action!", "NO_REASON_PROVIDED": "No reason provided", diff --git a/languages/ru-RU/general/invite.json b/languages/ru-RU/general/invite.json index fe487c15..c2f61c0b 100644 --- a/languages/ru-RU/general/invite.json +++ b/languages/ru-RU/general/invite.json @@ -3,8 +3,8 @@ "USAGE": "{{prefix}}invite (copy)", "EXAMPLES": "{{prefix}}invite\n{{prefix}}invite copy", "LINKS": "Ссылки JaBa", - "TIP": "Отправьте `{{prefix}}invite copy`, чтобы получить ссылку которую можно скопировать!", + "TIP": "Отправьте `{{prefix}}invite copy`, чтобы получить ссылку для копирования!", "ADD": "Пригласить JaBa", "VOTE": "Проголосовать за JaBa", - "SUPPORT": "Получить помощь" + "SUPPORT": "Поддержать разработчика" } \ No newline at end of file diff --git a/languages/ru-RU/misc.json b/languages/ru-RU/misc.json index 603db309..fdc0c376 100644 --- a/languages/ru-RU/misc.json +++ b/languages/ru-RU/misc.json @@ -10,7 +10,7 @@ "INVALID_NUMBER": "Укажите число!", "INVALID_NUMBER_RANGE": "Укажите число от **{{min}}** до **{{max}}**!", "FORCE_STOP": "Игра принудительно окончена {{user}}, никто не победил!", - "STATS_FOOTER": "● [Панель управления]({{dashboardLink}})\n● [Документация]({{docsLink}})\n● [Поддержать]({{donateLink}}) (для других способов пишите в ЛС <@{{owner}}>)", + "STATS_FOOTER": "● [Панель управления]({{dashboardLink}})\n● [Документация]({{docsLink}})\n● [Пригласить JaBa на свой сервер]({{inviteLink}})\n● [Поддержать]({{donateLink}}) (для других способов пишите в ЛС <@{{owner}}>)", "BOT_USER": "Это бот!", "NO_PERMS": "Недостаточно прав для выполнения данного действия!", "NO_REASON_PROVIDED": "Причина не указана", diff --git a/languages/uk-UA/economy/marry.json b/languages/uk-UA/economy/marry.json index d277cb32..8c61d128 100644 --- a/languages/uk-UA/economy/marry.json +++ b/languages/uk-UA/economy/marry.json @@ -14,5 +14,5 @@ "SUCCESS": "🎉 Поздравляем! **{{creator}}** и **{{partner}}** теперь состоят в браке!", "DENIED": "{{creator}}, у меня есть плохие новости... {{partner}} отказался(лась) от вашего предложение.", "REQUEST": "{{to}}, вы согласны вступить в брак с {{from}}? Ответьте `да` или `нет`!", - "BOT_USER": "Боты вечно одиноки" + "BOT_USER": "Боты вечно одиноки!" } \ No newline at end of file diff --git a/languages/uk-UA/general/invite.json b/languages/uk-UA/general/invite.json index fe487c15..c2f61c0b 100644 --- a/languages/uk-UA/general/invite.json +++ b/languages/uk-UA/general/invite.json @@ -3,8 +3,8 @@ "USAGE": "{{prefix}}invite (copy)", "EXAMPLES": "{{prefix}}invite\n{{prefix}}invite copy", "LINKS": "Ссылки JaBa", - "TIP": "Отправьте `{{prefix}}invite copy`, чтобы получить ссылку которую можно скопировать!", + "TIP": "Отправьте `{{prefix}}invite copy`, чтобы получить ссылку для копирования!", "ADD": "Пригласить JaBa", "VOTE": "Проголосовать за JaBa", - "SUPPORT": "Получить помощь" + "SUPPORT": "Поддержать разработчика" } \ No newline at end of file diff --git a/languages/uk-UA/misc.json b/languages/uk-UA/misc.json index 603db309..fdc0c376 100644 --- a/languages/uk-UA/misc.json +++ b/languages/uk-UA/misc.json @@ -10,7 +10,7 @@ "INVALID_NUMBER": "Укажите число!", "INVALID_NUMBER_RANGE": "Укажите число от **{{min}}** до **{{max}}**!", "FORCE_STOP": "Игра принудительно окончена {{user}}, никто не победил!", - "STATS_FOOTER": "● [Панель управления]({{dashboardLink}})\n● [Документация]({{docsLink}})\n● [Поддержать]({{donateLink}}) (для других способов пишите в ЛС <@{{owner}}>)", + "STATS_FOOTER": "● [Панель управления]({{dashboardLink}})\n● [Документация]({{docsLink}})\n● [Пригласить JaBa на свой сервер]({{inviteLink}})\n● [Поддержать]({{donateLink}}) (для других способов пишите в ЛС <@{{owner}}>)", "BOT_USER": "Это бот!", "NO_PERMS": "Недостаточно прав для выполнения данного действия!", "NO_REASON_PROVIDED": "Причина не указана",