From d7b279020048535dd9315bf2cf6c777966c3d0cb Mon Sep 17 00:00:00 2001 From: JonnyBro Date: Sun, 31 Jul 2022 17:08:00 +0500 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20?= =?UTF-8?q?=D0=BD=D0=B0=20discord.js=2014=20=D0=A4=D0=B8=D0=BA=D1=81=D1=8B?= =?UTF-8?q?=20=D0=9F=D0=BE=D0=B4=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=BA=D0=B0?= =?UTF-8?q?=20=D1=81=D1=82=D0=B0=D1=80=D1=8B=D1=85=20=D0=BA=D0=BE=D0=BC?= =?UTF-8?q?=D0=B0=D0=BD=D0=B4=20=D0=BA=20d.js=2014?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TO REWRITE/Administration/backup.js | 145 --- TO REWRITE/Administration/configuration.js | 129 +-- TO REWRITE/Administration/stealemoji.js | 4 +- TO REWRITE/Economy/achievements.js | 95 +- TO REWRITE/Economy/leaderboard.js | 18 +- TO REWRITE/Economy/money.js | 23 +- TO REWRITE/Economy/profile.js | 78 +- TO REWRITE/Economy/transactions.js | 19 +- TO REWRITE/Economy/work.js | 39 +- TO REWRITE/Examples/mention.js | 7 +- TO REWRITE/Examples/ping.js | 35 - TO REWRITE/Examples/repeat.js | 9 +- TO REWRITE/Fun/8ball.js | 31 - TO REWRITE/Fun/ascii.js | 34 - TO REWRITE/Fun/flip.js | 25 - TO REWRITE/Fun/lmg.js | 30 - TO REWRITE/Fun/lovecalc.js | 59 -- TO REWRITE/Fun/memes.js | 78 -- TO REWRITE/General/activity.js | 30 +- TO REWRITE/General/avatar.js | 1 - TO REWRITE/General/emoji.js | 23 +- TO REWRITE/General/help.js | 64 +- TO REWRITE/General/invite.js | 55 - TO REWRITE/General/invites.js | 72 -- TO REWRITE/General/minecraft.js | 32 +- TO REWRITE/General/permissions.js | 50 - TO REWRITE/General/quote.js | 88 -- TO REWRITE/General/report.js | 35 +- TO REWRITE/General/serverinfo.js | 76 +- TO REWRITE/General/shorturl.js | 2 +- TO REWRITE/General/staff.js | 20 +- TO REWRITE/General/stats.js | 77 +- TO REWRITE/General/suggest.js | 28 +- TO REWRITE/General/translate.js | 72 -- TO REWRITE/General/userinfo.js | 103 +- TO REWRITE/General/whois.js | 20 +- TO REWRITE/Moderation/announcement.js | 2 +- TO REWRITE/Moderation/ban.js | 112 -- TO REWRITE/Moderation/kick.js | 100 -- TO REWRITE/Moderation/mute.js | 113 -- TO REWRITE/Moderation/poll.js | 15 +- TO REWRITE/Moderation/unmute.js | 47 - TO REWRITE/Moderation/untimeout.js | 60 ++ TO REWRITE/Moderation/warn.js | 20 +- .../Moderation/{sanctions.js => warns.js} | 11 +- TO REWRITE/Music/back.js | 2 +- TO REWRITE/Music/clips.js | 2 +- TO REWRITE/Music/jump.js | 2 +- TO REWRITE/Music/np.js | 32 +- TO REWRITE/Music/play.js | 4 +- TO REWRITE/Music/queue.js | 26 +- TO REWRITE/Music/skip.js | 2 +- TO REWRITE/Music/stop.js | 2 +- base/BaseCommand.js | 2 +- base/JaBa.js | 17 +- commands/Fun/8ball.js | 53 + commands/Fun/lmgtfy.js | 47 + commands/Fun/lovecalc.js | 74 ++ commands/Fun/memes.js | 81 ++ commands/General/ping.js | 2 +- commands/NSFW/nsfw.js | 20 +- commands/Owner/debug.js | 2 +- commands/Owner/eval.js | 4 +- commands/Owner/reload.js | 6 +- commands/Owner/say.js | 4 +- commands/Owner/servers.js | 6 +- dashboard/routes/discord.js | 2 +- dashboard/utils.js | 6 +- events/CommandHandler.js | 3 +- events/Guild/guildCreate.js | 10 +- events/Guild/guildDelete.js | 8 +- events/Guild/guildMemberAdd.js | 4 +- events/Guild/guildMemberRemove.js | 4 +- events/messageCreate.js | 4 +- events/ready.js | 5 +- helpers/birthdays.js | 20 +- helpers/checkReminds.js | 20 +- helpers/checkUnmutes.js | 4 +- helpers/extenders.js | 56 +- helpers/functions.js | 6 +- helpers/tictactoe.js | 64 +- index.js | 6 +- languages/ru-RU/administration/backup.json | 20 - languages/ru-RU/common.json | 6 +- languages/ru-RU/fun/8ball.json | 6 +- languages/ru-RU/fun/flip.json | 7 - languages/ru-RU/fun/{lmg.json => lmgtfy.json} | 4 +- languages/ru-RU/fun/lovecalc.json | 3 +- languages/ru-RU/fun/memes.json | 2 +- languages/ru-RU/general/invite.json | 10 - languages/ru-RU/general/invites.json | 13 - languages/ru-RU/general/translate.json | 9 - languages/ru-RU/misc.json | 46 - languages/ru-RU/moderation/ban.json | 13 - languages/ru-RU/moderation/kick.json | 11 - languages/ru-RU/moderation/mute.json | 10 - languages/ru-RU/moderation/unmute.json | 9 - languages/ru-RU/nsfw/nsfw.json | 2 - languages/ru-RU/owner/eval.json | 2 +- languages/ru-RU/owner/reload.json | 2 +- languages/uk-UA/misc.json | 45 - package-lock.json | 964 +++++++----------- package.json | 26 +- scripts/verify-config.js | 4 +- 104 files changed, 1571 insertions(+), 2441 deletions(-) delete mode 100644 TO REWRITE/Administration/backup.js delete mode 100644 TO REWRITE/Examples/ping.js delete mode 100644 TO REWRITE/Fun/8ball.js delete mode 100644 TO REWRITE/Fun/ascii.js delete mode 100644 TO REWRITE/Fun/flip.js delete mode 100644 TO REWRITE/Fun/lmg.js delete mode 100644 TO REWRITE/Fun/lovecalc.js delete mode 100644 TO REWRITE/Fun/memes.js delete mode 100644 TO REWRITE/General/invite.js delete mode 100644 TO REWRITE/General/invites.js delete mode 100644 TO REWRITE/General/permissions.js delete mode 100644 TO REWRITE/General/quote.js delete mode 100644 TO REWRITE/General/translate.js delete mode 100644 TO REWRITE/Moderation/ban.js delete mode 100644 TO REWRITE/Moderation/kick.js delete mode 100644 TO REWRITE/Moderation/mute.js delete mode 100644 TO REWRITE/Moderation/unmute.js create mode 100644 TO REWRITE/Moderation/untimeout.js rename TO REWRITE/Moderation/{sanctions.js => warns.js} (81%) create mode 100644 commands/Fun/8ball.js create mode 100644 commands/Fun/lmgtfy.js create mode 100644 commands/Fun/lovecalc.js create mode 100644 commands/Fun/memes.js delete mode 100644 languages/ru-RU/administration/backup.json delete mode 100644 languages/ru-RU/fun/flip.json rename languages/ru-RU/fun/{lmg.json => lmgtfy.json} (61%) delete mode 100644 languages/ru-RU/general/invite.json delete mode 100644 languages/ru-RU/general/invites.json delete mode 100644 languages/ru-RU/general/translate.json delete mode 100644 languages/ru-RU/moderation/ban.json delete mode 100644 languages/ru-RU/moderation/kick.json delete mode 100644 languages/ru-RU/moderation/mute.json delete mode 100644 languages/ru-RU/moderation/unmute.json diff --git a/TO REWRITE/Administration/backup.js b/TO REWRITE/Administration/backup.js deleted file mode 100644 index 27e034e2..00000000 --- a/TO REWRITE/Administration/backup.js +++ /dev/null @@ -1,145 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"), - backup = require("discord-backup"); - -backup.setStorageFolder(__dirname + "/../../backups"); - -class Backup extends Command { - constructor(client) { - super(client, { - name: "backup", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["ba"], - memberPermissions: ["MANAGE_GUILD"], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ADMINISTRATOR"], - nsfw: false, - ownerOnly: false, - cooldown: 20000 - }); - } - - async run(message, args, data) { - const status = args[0]; - if (!status) return message.error("administration/backup:MISSING_STATUS"); - - if (status === "create") { - const m = await message.sendT("misc:PLEASE_WAIT", null, { - prefixEmoji: "loading" - }); - backup.create(message.guild).then((backup) => { - m.delete(); - - message.success("administration/backup:SUCCESS_PUBLIC"); - message.author.send(message.translate("administration/backup:SUCCESS_PRIVATE", { - backupID: backup.id - })).catch(() => { - backup.remove(backup.id); - message.error("misc:CANNOT_DM"); - }); - }).catch((err) => { - console.error(err); - return message.error("misc:ERR_OCCURRED"); - }); - } else if (status === "load") { - const backupID = args[1]; - if (!backupID) return message.error("administration/backup:MISSING_BACKUP_ID"); - - backup.fetch(backupID).then(async () => { - message.sendT("administration/backup:CONFIRMATION"); - - const filter = m => m.author.id === message.author.id; - const collector = message.channel.createMessageCollector({ - filter, - time: 20000 - }); - - collector.on("collect", async msg => { - if (msg.content.toLowerCase() === message.translate("common:YES").toLowerCase()) { - message.author.send(message.translate("administration/backup:START_LOADING")); - - backup.load(backupID, message.guild).then(() => { - backup.remove(backupID); - message.author.send(message.translate("administration/backup:LOAD_SUCCESS")); - collector.stop(); - }).catch((err) => { - console.error(err); - return message.error("misc:ERR_OCCURRED"); - }); - } - }); - - collector.on("end", (_, reason) => { - if (reason === "time") return message.error("misc:TIMES_UP"); - }); - }).catch((err) => { - console.error(err); - return message.error("administration/backup:NO_BACKUP_FOUND", { - backupID - }); - }); - } else if (status === "info") { - const backupID = args[1]; - if (!backupID) return message.error("administration/backup:MISSING_BACKUP_ID"); - - backup.fetch(backupID).then(async (backupInfo) => { - const embed = new Discord.MessageEmbed() - .setAuthor({ - name: message.translate("administration/backup:TITLE_INFO") - }) - .addField(message.translate("administration/backup:TITLE_ID"), backupInfo.id, true) - .addField(message.translate("administration/backup:TITLE_SERVER_ID"), backupInfo.data.guildID.toString(), true) - .addField(message.translate("administration/backup:TITLE_SIZE"), `${backupInfo.size} kb`, true) - .addField(message.translate("administration/backup:TITLE_CREATED_AT"), this.client.printDate(new Date(backupInfo.data.createdTimestamp)), true) - .setColor(data.config.embed.color) - .setFooter({ - text: data.config.embed.footer - }); - message.reply({ - embeds: [embed] - }); - }).catch((err) => { - console.error(err); - return message.error("administration/backup:NO_BACKUP_FOUND", { - backupID - }); - }); - } else if (status === "remove") { - const backupID = args[1]; - if (!backupID) return message.error("administration/backup:MISSING_BACKUP_ID"); - - backup.fetch(backupID).then(async () => { - message.sendT("administration/backup:REMOVE_CONFIRMATION"); - - const filter = m => m.author.id === message.author.id; - const collector = message.channel.createMessageCollector({ - filter, - time: 20000 - }); - - collector.on("collect", async msg => { - if (msg.content.toLowerCase() === message.translate("common:YES").toLowerCase()) { - backup.remove(backupID).then(async () => { - message.success("administration/backup:SUCCESS_REMOVED"); - }); - collector.stop(); - } - }); - - collector.on("end", (_, reason) => { - if (reason === "time") return message.error("misc:TIMES_UP"); - }); - }).catch((err) => { - console.error(err); - return message.error("administration/backup:NO_BACKUP_FOUND", { - backupID - }); - }); - } else { - return message.error("administration/backup:MISSING_STATUS"); - } - } -} - -module.exports = Backup; \ No newline at end of file diff --git a/TO REWRITE/Administration/configuration.js b/TO REWRITE/Administration/configuration.js index e6d75ef2..2359a58f 100644 --- a/TO REWRITE/Administration/configuration.js +++ b/TO REWRITE/Administration/configuration.js @@ -20,74 +20,83 @@ class Configuration extends Command { async run(message, args, data) { const guildData = data.guild; - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.guild.name, - iconURL: message.guild.iconURL({ - dynamic: true - }) + iconURL: message.guild.iconURL() }) .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer }); - // Guild prefix - embed.addField(message.translate("administration/configuration:PREFIX_TITLE"), guildData.prefix); - - // Ignored channels - embed.addField(message.translate("administration/configuration:IGNORED_CHANNELS_TITLE"), guildData.ignoredChannels.length > 0 ? guildData.ignoredChannels.map((ch) => `<#${ch}>`).join(", ") : message.translate("administration/configuration:NO_IGNORED_CHANNELS")); - - // Autorole plugin - embed.addField(message.translate("administration/configuration:AUTOROLE_TITLE"), guildData.plugins.autorole.enabled ? message.translate("administration/configuration:AUTOROLE_CONTENT", { - roleName: `<@&${guildData.plugins.autorole.role}>` - }) : message.translate("administration/configuration:AUTOROLE_DISABLED")); - - // Welcome plugin - embed.addField(message.translate("administration/configuration:WELCOME_TITLE"), guildData.plugins.welcome.enabled ? message.translate("administration/configuration:WELCOME_CONTENT", { - channel: `<#${guildData.plugins.welcome.channel}>`, - withImage: guildData.plugins.welcome.withImage ? message.translate("common:YES") : message.translate("common:NO") - }) : message.translate("administration/configuration:WELCOME_DISABLED")); - - // Goodbye plugin - embed.addField(message.translate("administration/configuration:GOODBYE_TITLE"), guildData.plugins.goodbye.enabled ? message.translate("administration/configuration:GOODBYE_CONTENT", { - channel: `<#${guildData.plugins.goodbye.channel}>`, - withImage: guildData.plugins.goodbye.withImage ? message.translate("common:YES") : message.translate("common:NO") - }) : message.translate("administration/configuration:GOODBYE_DISABLED")); - - // Special channels - embed.addField(message.translate("administration/configuration:SPECIAL_CHANNELS"), - message.translate("administration/configuration:SUGGESTIONS", { - channel: guildData.plugins.suggestions ? `<#${guildData.plugins.suggestions}>` : message.translate("common:NOT_DEFINED") - }) + "\n" + - message.translate("administration/configuration:REPORTS", { - channel: guildData.plugins.reports ? `<#${guildData.plugins.reports}>` : message.translate("common:NOT_DEFINED") - }) + "\n" + - message.translate("administration/configuration:MODLOGS", { - channel: guildData.plugins.modlogs ? `<#${guildData.plugins.modlogs}>` : message.translate("common:NOT_DEFINED") - }) + "\n" + - message.translate("administration/configuration:BIRTHDAYS", { - channel: guildData.plugins.birthdays ? `<#${guildData.plugins.birthdays}>` : message.translate("common:NOT_DEFINED") - }) - ); - - // Auto sanctions - embed.addField(message.translate("administration/configuration:AUTO_SANCTIONS"), (guildData.plugins.warnsSanctions.kick ? message.translate("administration/configuration:KICK_CONTENT", { - count: guildData.plugins.warnsSanctions.kick - }) : message.translate("administration/configuration:KICK_NOT_DEFINED")) + "\n" + (guildData.plugins.warnsSanctions.ban ? message.translate("administration/configuration:BAN_CONTENT", { - count: guildData.plugins.warnsSanctions.ban - }) : message.translate("administration/configuration:BAN_NOT_DEFINED"))); - - // Automod plugin - embed.addField(message.translate("administration/configuration:AUTOMOD_TITLE"), guildData.plugins.automod.enabled ? message.translate("administration/configuration:AUTOMOD_CONTENT", { - channels: guildData.plugins.automod.ignored.map((ch) => `<#${ch}>`) - }) : message.translate("administration/configuration:AUTOMOD_DISABLED")); - - // Auto-delete mod commands - 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")}](${data.config.dashboard.baseURL})`); + embed.addFields([ + { // Guild prefix + name: message.translate("administration/configuration:PREFIX_TITLE"), + value: guildData.prefix + }, + { // Ignored channels + name: message.translate("administration/configuration:IGNORED_CHANNELS_TITLE"), + value: guildData.ignoredChannels.length > 0 ? guildData.ignoredChannels.map((ch) => `<#${ch}>`).join(", ") : message.translate("administration/configuration:NO_IGNORED_CHANNELS") + }, + { // Autorole plugin + name: message.translate("administration/configuration:AUTOROLE_TITLE"), + value: guildData.plugins.autorole.enabled ? message.translate("administration/configuration:AUTOROLE_CONTENT", { + roleName: `<@&${guildData.plugins.autorole.role}>` + }) : message.translate("administration/configuration:AUTOROLE_DISABLED") + }, + { // Welcome plugin + name: message.translate("administration/configuration:WELCOME_TITLE"), + value: guildData.plugins.welcome.enabled ? message.translate("administration/configuration:WELCOME_CONTENT", { + channel: `<#${guildData.plugins.welcome.channel}>`, + withImage: guildData.plugins.welcome.withImage ? message.translate("common:YES") : message.translate("common:NO") + }) : message.translate("administration/configuration:WELCOME_DISABLED") + }, + { // Goodbye plugin + name: message.translate("administration/configuration:GOODBYE_TITLE"), + value: guildData.plugins.goodbye.enabled ? message.translate("administration/configuration:GOODBYE_CONTENT", { + channel: `<#${guildData.plugins.goodbye.channel}>`, + withImage: guildData.plugins.goodbye.withImage ? message.translate("common:YES") : message.translate("common:NO") + }) : message.translate("administration/configuration:GOODBYE_DISABLED") + }, + { // Special channels + name: message.translate("administration/configuration:SPECIAL_CHANNELS"), + value: message.translate("administration/configuration:SUGGESTIONS", { + channel: guildData.plugins.suggestions ? `<#${guildData.plugins.suggestions}>` : message.translate("common:NOT_DEFINED") + }) + "\n" + + message.translate("administration/configuration:REPORTS", { + channel: guildData.plugins.reports ? `<#${guildData.plugins.reports}>` : message.translate("common:NOT_DEFINED") + }) + "\n" + + message.translate("administration/configuration:MODLOGS", { + channel: guildData.plugins.modlogs ? `<#${guildData.plugins.modlogs}>` : message.translate("common:NOT_DEFINED") + }) + "\n" + + message.translate("administration/configuration:BIRTHDAYS", { + channel: guildData.plugins.birthdays ? `<#${guildData.plugins.birthdays}>` : message.translate("common:NOT_DEFINED") + }) + }, + { // Auto sanctions + name: message.translate("administration/configuration:AUTO_SANCTIONS"), + value: (guildData.plugins.warnsSanctions.kick ? message.translate("administration/configuration:KICK_CONTENT", { + count: guildData.plugins.warnsSanctions.kick + }) : message.translate("administration/configuration:KICK_NOT_DEFINED")) + "\n" + (guildData.plugins.warnsSanctions.ban ? message.translate("administration/configuration:BAN_CONTENT", { + count: guildData.plugins.warnsSanctions.ban + }) : message.translate("administration/configuration:BAN_NOT_DEFINED")) + }, + { // Automod plugin + name: message.translate("administration/configuration:AUTOMOD_TITLE"), + value: guildData.plugins.automod.enabled ? message.translate("administration/configuration:AUTOMOD_CONTENT", { + channels: guildData.plugins.automod.ignored.map((ch) => `<#${ch}>`) + }) : message.translate("administration/configuration:AUTOMOD_DISABLED") + }, + { // Auto-delete mod commands + name: message.translate("administration/configuration:AUTODELETEMOD"), + value: guildData.autoDeleteModCommands ? message.translate("administration/configuration:AUTODELETEMOD_ENABLED") : message.translate("administration/configuration:AUTODELETEMOD_DISABLED") + }, + { // Dashboard link + name: message.translate("administration/configuration:DASHBOARD_TITLE"), + value: `[${message.translate("administration/configuration:DASHBOARD_CONTENT")}](${data.config.dashboard.baseURL})` + } + ]); message.reply({ embeds: [embed] diff --git a/TO REWRITE/Administration/stealemoji.js b/TO REWRITE/Administration/stealemoji.js index 7c7d3709..bef0eff4 100644 --- a/TO REWRITE/Administration/stealemoji.js +++ b/TO REWRITE/Administration/stealemoji.js @@ -1,5 +1,5 @@ const Command = require("../../base/Command"), - { Util } = require("discord.js"); + { parseEmoji } = require("discord.js"); class Stealemoji extends Command { constructor(client) { @@ -21,7 +21,7 @@ class Stealemoji extends Command { if (!args.length) return message.error("administration/stealemoji:MISSING_EMOJI"); for (const rawEmoji of args) { - const parsedEmoji = Util.parseEmoji(rawEmoji); + const parsedEmoji = parseEmoji(rawEmoji); const extension = parsedEmoji.animated ? "gif" : "png"; message.guild.emojis diff --git a/TO REWRITE/Economy/achievements.js b/TO REWRITE/Economy/achievements.js index ea8c6180..1ba6ba0b 100644 --- a/TO REWRITE/Economy/achievements.js +++ b/TO REWRITE/Economy/achievements.js @@ -26,7 +26,7 @@ class Achievements extends Command { id: member.id })); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("economy/achievements:TITLE") }) @@ -35,41 +35,64 @@ class Achievements extends Command { text: data.config.embed.footer }); - embed.addField(message.translate("economy/achievements:SEND_CMD"), message.translate("economy/achievements:PROGRESS", { - now: userData.achievements.firstCommand.progress.now, - total: userData.achievements.firstCommand.progress.total, - percent: Math.round(100 * (userData.achievements.firstCommand.progress.now / userData.achievements.firstCommand.progress.total)) - })); - embed.addField(message.translate("economy/achievements:CLAIM_SALARY"), message.translate("economy/achievements:PROGRESS", { - now: userData.achievements.work.progress.now, - total: userData.achievements.work.progress.total, - percent: Math.round(100 * (userData.achievements.work.progress.now / userData.achievements.work.progress.total)) - })); - embed.addField(message.translate("economy/achievements:MARRY"), message.translate("economy/achievements:PROGRESS", { - now: userData.achievements.married.progress.now, - total: userData.achievements.married.progress.total, - percent: Math.round(100 * (userData.achievements.married.progress.now / userData.achievements.married.progress.total)) - })); - embed.addField(message.translate("economy/achievements:SLOTS"), message.translate("economy/achievements:PROGRESS", { - now: userData.achievements.slots.progress.now, - total: userData.achievements.slots.progress.total, - percent: Math.round(100 * (userData.achievements.slots.progress.now / userData.achievements.slots.progress.total)) - })); - embed.addField(message.translate("economy/achievements:TIP"), message.translate("economy/achievements:PROGRESS", { - now: userData.achievements.tip.progress.now, - total: userData.achievements.tip.progress.total, - percent: Math.round(100 * (userData.achievements.tip.progress.now / userData.achievements.tip.progress.total)) - })); - embed.addField(message.translate("economy/achievements:REP"), message.translate("economy/achievements:PROGRESS", { - now: userData.achievements.rep.progress.now, - total: userData.achievements.rep.progress.total, - percent: Math.round(100 * (userData.achievements.rep.progress.now / userData.achievements.rep.progress.total)) - })); - embed.addField(message.translate("economy/achievements:INVITE"), message.translate("economy/achievements:PROGRESS", { - now: userData.achievements.invite.progress.now, - total: userData.achievements.invite.progress.total, - percent: Math.round(100 * (userData.achievements.invite.progress.now / userData.achievements.invite.progress.total)) - })); + embed.addFields([ + { + name: message.translate("economy/achievements:SEND_CMD"), + value: message.translate("economy/achievements:PROGRESS", { + now: userData.achievements.firstCommand.progress.now, + total: userData.achievements.firstCommand.progress.total, + percent: Math.round(100 * (userData.achievements.firstCommand.progress.now / userData.achievements.firstCommand.progress.total)) + }) + }, + { + name: message.translate("economy/achievements:CLAIM_SALARY"), + value: message.translate("economy/achievements:PROGRESS", { + now: userData.achievements.work.progress.now, + total: userData.achievements.work.progress.total, + percent: Math.round(100 * (userData.achievements.work.progress.now / userData.achievements.work.progress.total)) + }) + }, + { + name: message.translate("economy/achievements:MARRY"), + value: message.translate("economy/achievements:PROGRESS", { + now: userData.achievements.married.progress.now, + total: userData.achievements.married.progress.total, + percent: Math.round(100 * (userData.achievements.married.progress.now / userData.achievements.married.progress.total)) + }) + }, + { + name: message.translate("economy/achievements:SLOTS"), + value: message.translate("economy/achievements:PROGRESS", { + now: userData.achievements.slots.progress.now, + total: userData.achievements.slots.progress.total, + percent: Math.round(100 * (userData.achievements.slots.progress.now / userData.achievements.slots.progress.total)) + }) + }, + { + name: message.translate("economy/achievements:TIP"), + value: message.translate("economy/achievements:PROGRESS", { + now: userData.achievements.tip.progress.now, + total: userData.achievements.tip.progress.total, + percent: Math.round(100 * (userData.achievements.tip.progress.now / userData.achievements.tip.progress.total)) + }) + }, + { + name: message.translate("economy/achievements:REP"), + value: message.translate("economy/achievements:PROGRESS", { + now: userData.achievements.rep.progress.now, + total: userData.achievements.rep.progress.total, + percent: Math.round(100 * (userData.achievements.rep.progress.now / userData.achievements.rep.progress.total)) + }) + }, + { + name: message.translate("economy/achievements:INVITE"), + value: message.translate("economy/achievements:PROGRESS", { + now: userData.achievements.invite.progress.now, + total: userData.achievements.invite.progress.total, + percent: Math.round(100 * (userData.achievements.invite.progress.now / userData.achievements.invite.progress.total)) + }) + } + ]); message.reply({ embeds: [embed] diff --git a/TO REWRITE/Economy/leaderboard.js b/TO REWRITE/Economy/leaderboard.js index 627184bd..86a4e59c 100644 --- a/TO REWRITE/Economy/leaderboard.js +++ b/TO REWRITE/Economy/leaderboard.js @@ -45,14 +45,12 @@ class Leaderboard extends Command { money += `${data.money}\n`; } - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("economy/leaderboard:TABLE", { name: message.guild.name }), - iconURL: message.guild.iconURL({ - dynamic: true - }) + iconURL: message.guild.iconURL() }) .setColor(data.config.embed.color) .addFields({ @@ -93,14 +91,12 @@ class Leaderboard extends Command { xp += `${data.xp} / ${5 * (data.level * data.level) + 80 * data.level + 100}\n`; } - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("economy/leaderboard:TABLE", { name: message.guild.name }), - iconURL: message.guild.iconURL({ - dynamic: true - }) + iconURL: message.guild.iconURL() }) .setColor(data.config.embed.color) .addFields({ @@ -142,14 +138,12 @@ class Leaderboard extends Command { rep += `${data.rep}\n`; } - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("economy/leaderboard:TABLE", { name: message.guild.name }), - iconURL: message.guild.iconURL({ - dynamic: true - }) + iconURL: message.guild.iconURL() }) .setColor(data.config.embed.color) .addFields({ diff --git a/TO REWRITE/Economy/money.js b/TO REWRITE/Economy/money.js index d173f229..b9c3b3bb 100644 --- a/TO REWRITE/Economy/money.js +++ b/TO REWRITE/Economy/money.js @@ -48,20 +48,33 @@ class Money extends Command { globalMoney += data.bankSold; }); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("economy/money:TITLE", { username: member.user.username }), iconURL: member.user.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }) - .addField(message.translate("economy/profile:CASH"), `**${memberData.money}** ${message.getNoun(memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) - .addField(message.translate("economy/profile:BANK"), `**${memberData.bankSold}** ${message.getNoun(memberData.bankSold, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) - .addField(message.translate("economy/profile:GLOBAL"), `**${globalMoney}** ${message.getNoun(globalMoney, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) + .addFields([ + { + name: message.translate("economy/profile:CASH"), + value: `**${memberData.money}** ${message.getNoun(memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, + inline: true + }, + { + name: message.translate("economy/profile:BANK"), + value: `**${memberData.bankSold}** ${message.getNoun(memberData.bankSold, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, + inline: true + }, + { + name: message.translate("economy/profile:GLOBAL"), + value: `**${globalMoney}** ${message.getNoun(globalMoney, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, + inline: true + } + ]) .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer diff --git a/TO REWRITE/Economy/profile.js b/TO REWRITE/Economy/profile.js index 45e564b1..3600f108 100644 --- a/TO REWRITE/Economy/profile.js +++ b/TO REWRITE/Economy/profile.js @@ -51,32 +51,78 @@ class Profile extends Command { globalMoney += data.bankSold; }); - const profileEmbed = new Discord.MessageEmbed() + const profileEmbed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("economy/profile:TITLE", { username: member.user.tag }), iconURL: member.user.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }) .setImage("attachment://achievements.png") - .addField(this.client.customEmojis.link + " " + message.translate("economy/profile:LINK"), `[${message.translate("economy/profile:LINK_TEXT")}](${this.client.config.dashboard.baseURL}/user/${member.user.id}/${message.guild.id})`) - .addField(message.translate("economy/profile:BIO"), userData.bio ? userData.bio : message.translate("economy/profile:NO_BIO")) - .addField(message.translate("economy/profile:CASH"), `**${memberData.money}** ${message.getNoun(memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) - .addField(message.translate("economy/profile:BANK"), `**${memberData.bankSold}** ${message.getNoun(memberData.bankSold, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) - .addField(message.translate("economy/profile:GLOBAL"), `**${globalMoney}** ${message.getNoun(globalMoney, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, true) - .addField(message.translate("economy/profile:REPUTATION"), `**${userData.rep}** ${message.getNoun(userData.rep, message.translate("misc:NOUNS:POINTS:1"), message.translate("misc:NOUNS:POINTS:2"), message.translate("misc:NOUNS:POINTS:5"))}`, true) - .addField(message.translate("economy/profile:LEVEL"), `**${memberData.level}**`, true) - .addField(message.translate("economy/profile:EXP"), `**${memberData.exp}/${5 * (memberData.level * memberData.level) + 80 * memberData.level + 100}** xp`, true) - .addField(message.translate("economy/profile:REGISTERED"), this.client.printDate(new Date(memberData.registeredAt)), true) - .addField(message.translate("economy/profile:BIRTHDATE"), (!userData.birthdate ? message.translate("economy/profile:NO_BIRTHDATE") : this.client.printDate(new Date(userData.birthdate))), true) - .addField(message.translate("economy/profile:LOVER"), (!userData.lover ? message.translate("economy/profile:NO_LOVER") : this.client.users.cache.get(userData.lover).tag), true) - .addField(message.translate("economy/profile:ACHIEVEMENTS"), message.translate("economy/profile:ACHIEVEMENTS_CONTENT", { - prefix: data.guild.prefix - })) + .addFields([ + { + name: this.client.customEmojis.link + " " + message.translate("economy/profile:LINK"), + value: `[${message.translate("economy/profile:LINK_TEXT")}](${this.client.config.dashboard.baseURL}/user/${member.user.id}/${message.guild.id})` + }, + { + name: message.translate("economy/profile:BIO"), + value: userData.bio ? userData.bio : message.translate("economy/profile:NO_BIO") + }, + { + name: message.translate("economy/profile:CASH"), + value: `**${memberData.money}** ${message.getNoun(memberData.money, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, + inline: true + }, + { + name: message.translate("economy/profile:BANK"), + value: `**${memberData.bankSold}** ${message.getNoun(memberData.bankSold, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, + inline: true + }, + { + name: message.translate("economy/profile:GLOBAL"), + value: `**${globalMoney}** ${message.getNoun(globalMoney, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`, + inline: true + }, + { + name: message.translate("economy/profile:REPUTATION"), + value: `**${userData.rep}** ${message.getNoun(userData.rep, message.translate("misc:NOUNS:POINTS:1"), message.translate("misc:NOUNS:POINTS:2"), message.translate("misc:NOUNS:POINTS:5"))}`, + inline: true + }, + { + name: message.translate("economy/profile:LEVEL"), + value:`**${memberData.level}**`, + inline: true + }, + { + name: message.translate("economy/profile:EXP"), + value: `**${memberData.exp}/${5 * (memberData.level * memberData.level) + 80 * memberData.level + 100}** xp`, + inline: true + }, + { + name: message.translate("economy/profile:REGISTERED"), + value: this.client.printDate(new Date(memberData.registeredAt)), + inline: true + }, + { + name: message.translate("economy/profile:BIRTHDATE"), + value: (!userData.birthdate ? message.translate("economy/profile:NO_BIRTHDATE") : this.client.printDate(new Date(userData.birthdate))), + inline: true + }, + { + name: message.translate("economy/profile:LOVER"), + value: (!userData.lover ? message.translate("economy/profile:NO_LOVER") : this.client.users.cache.get(userData.lover).tag), + inline: true + }, + { + name: message.translate("economy/profile:ACHIEVEMENTS"), + value: message.translate("economy/profile:ACHIEVEMENTS_CONTENT", { + prefix: data.guild.prefix + }) + } + ]) .setColor(data.config.embed.color) // Sets the color of the embed .setFooter({ text: data.config.embed.footer diff --git a/TO REWRITE/Economy/transactions.js b/TO REWRITE/Economy/transactions.js index 426f79ec..316ac760 100644 --- a/TO REWRITE/Economy/transactions.js +++ b/TO REWRITE/Economy/transactions.js @@ -18,12 +18,11 @@ class Transactions extends Command { } async run(message, args, data) { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("economy/transactions:EMBED_TRANSACTIONS"), iconURL: message.author.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }) @@ -43,8 +42,20 @@ class Transactions extends Command { if (transactions.length < 1) { embed.setDescription(message.translate("economy/transactions:NO_TRANSACTIONS")); } else { - if (sortedTransactions[0].length > 0) embed.addField(message.translate("economy/transactions:T_GOT"), sortedTransactions[0].join("\n"), true); - if (sortedTransactions[1].length > 0) embed.addField(message.translate("economy/transactions:T_SEND"), sortedTransactions[1].join("\n"), true); + if (sortedTransactions[0].length > 0) embed.addFields([ + { + name: message.translate("economy/transactions:T_GOT"), + value: sortedTransactions[0].join("\n"), + inline: true + } + ]); + if (sortedTransactions[1].length > 0) embed.addFields([ + { + name: message.translate("economy/transactions:T_SEND"), + value: sortedTransactions[1].join("\n"), + inline: true + } + ]); } message.reply({ diff --git a/TO REWRITE/Economy/work.js b/TO REWRITE/Economy/work.js index a1ed8570..218e57cf 100644 --- a/TO REWRITE/Economy/work.js +++ b/TO REWRITE/Economy/work.js @@ -1,5 +1,5 @@ const Command = require("../../base/Command"), - Discord = require("discord.js"); + { parseEmoji, EmbedBuilder } = require("discord.js"); class Work extends Command { constructor(client) { @@ -39,12 +39,11 @@ class Work extends Command { data.memberData.workStreak = (data.memberData.workStreak || 0) + 1; await data.memberData.save(); - const embed = new Discord.MessageEmbed() + const embed = new EmbedBuilder() .setFooter({ text: message.translate("economy/work:AWARD"), iconURL: message.author.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }) @@ -61,22 +60,38 @@ class Work extends Command { if (data.memberData.workStreak >= 5) { won += 200; - embed.addField(message.translate("economy/work:SALARY"), message.translate("economy/work:SALARY_CONTENT", { - won: `${won} ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` - })) - .addField(message.translate("economy/work:STREAK"), message.translate("economy/work:STREAK_CONTENT")); + embed.addFields([ + { + name: message.translate("economy/work:SALARY"), + value: message.translate("economy/work:SALARY_CONTENT", { + won: `${won} ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` + }) + }, + { + name: message.translate("economy/work:STREAK"), + value: message.translate("economy/work:STREAK_CONTENT") + } + ]); data.memberData.workStreak = 0; } else { for (let i = 0; i < award.length; i++) { if (data.memberData.workStreak > i) { - const letter = Discord.Util.parseEmoji(award[i]).name.split("_")[1]; + const letter = parseEmoji(award[i]).name.split("_")[1]; award[i] = `:regional_indicator_${letter.toLowerCase()}:`; } } - embed.addField(message.translate("economy/work:SALARY"), message.translate("economy/work:SALARY_CONTENT", { - won: `**${won}** ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` - })) - .addField(message.translate("economy/work:STREAK"), award.join("")); + embed.addFields([ + { + name: message.translate("economy/work:SALARY"), + value: message.translate("economy/work:SALARY_CONTENT", { + won: `**${won}** ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` + }) + }, + { + name: message.translate("economy/work:STREAK"), + value: award.join("") + } + ]); } const info = { diff --git a/TO REWRITE/Examples/mention.js b/TO REWRITE/Examples/mention.js index af0fe6bf..bfcc2d9f 100644 --- a/TO REWRITE/Examples/mention.js +++ b/TO REWRITE/Examples/mention.js @@ -1,3 +1,4 @@ +const { ApplicationCommandType } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Mention extends BaseCommand { @@ -9,11 +10,11 @@ class Mention extends BaseCommand { super({ command: { name: "mention", - type: 2 // Type 2 is USER COMMAND. + type: ApplicationCommandType.User }, - aliases: ["m"], // Application command aliases. + aliases: [], dirname: __dirname, - guildOnly: true // Determines whether your command is only guild. + guildOnly: true }); } /** diff --git a/TO REWRITE/Examples/ping.js b/TO REWRITE/Examples/ping.js deleted file mode 100644 index 945c6fe1..00000000 --- a/TO REWRITE/Examples/ping.js +++ /dev/null @@ -1,35 +0,0 @@ -const { SlashCommandBuilder } = require("@discordjs/builders"); -const BaseCommand = require("../../base/BaseCommand"); - -class Ping extends BaseCommand { - /** - * - * @param {import("../../base/JaBa")} client - */ - constructor() { - super({ - command: new SlashCommandBuilder() - .setName("ping") - .setDescription("Ping command."), // This option is included in type 1. You can configure this option directly with the SlashCommandBuilder feature. - aliases: ["p"], // Application command aliases. - dirname: __dirname, - guildOnly: true // Determines whether your command is only guild. - }); - } - /** - * - * @param {import("../../base/JaBa")} client - */ - async onLoad() { - //... - } - /** - * - * @param {import("../../base/JaBa")} client - * @param {import("discord.js").CommandInteraction} interaction - */ - async execute(client, interaction) { - return interaction.reply({ content: "Pong!", ephemeral: true }); - } -} -module.exports = Ping; \ No newline at end of file diff --git a/TO REWRITE/Examples/repeat.js b/TO REWRITE/Examples/repeat.js index b7bae955..f3e4eed3 100644 --- a/TO REWRITE/Examples/repeat.js +++ b/TO REWRITE/Examples/repeat.js @@ -1,3 +1,4 @@ +const { ApplicationCommandType } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Repeat extends BaseCommand { @@ -8,12 +9,12 @@ class Repeat extends BaseCommand { constructor() { super({ command: { - name: "repeat", // Application command name. - type: 3 // Type 3 is MESSAGE COMMAND. + name: "repeat", + type: ApplicationCommandType.Message }, - aliases: ["r"], // Application command aliases. + aliases: [], dirname: __dirname, - guildOnly: true // Determines whether your command is only guild. + guildOnly: true }); } /** diff --git a/TO REWRITE/Fun/8ball.js b/TO REWRITE/Fun/8ball.js deleted file mode 100644 index e0ab1bc7..00000000 --- a/TO REWRITE/Fun/8ball.js +++ /dev/null @@ -1,31 +0,0 @@ -const Command = require("../../base/Command"); - -class Eightball extends Command { - constructor(client) { - super(client, { - name: "8ball", - dirname: __dirname, - enabled: true, - guildOnly: false, - aliases: ["8b"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 2000 - }); - } - - async run(message, args) { - if (!args[0] || !message.content.endsWith("?")) return message.error("fun/8ball:ERR_QUESTION"); - - const answerN = this.client.functions.randomNum(1, 20); - const answer = message.translate(`fun/8ball:RESPONSE_${answerN}`); - - message.reply({ - content: answer - }); - } -} - -module.exports = Eightball; \ No newline at end of file diff --git a/TO REWRITE/Fun/ascii.js b/TO REWRITE/Fun/ascii.js deleted file mode 100644 index ae70522b..00000000 --- a/TO REWRITE/Fun/ascii.js +++ /dev/null @@ -1,34 +0,0 @@ -const Command = require("../../base/Command"), - figlet = require("figlet"), - util = require("util"), - figletAsync = util.promisify(figlet); - -class Ascii extends Command { - constructor(client) { - super(client, { - name: "ascii", - dirname: __dirname, - enabled: true, - guildOnly: false, - aliases: [], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 2000 - }); - } - - async run(message, args) { - const text = args.join(" "); - if (!text || text.length > 20) return message.error("fun/ascii:TEXT_MISSING"); - - const rendered = await figletAsync(text); - - message.reply({ - content: "```" + rendered + "```" - }); - } -} - -module.exports = Ascii; \ No newline at end of file diff --git a/TO REWRITE/Fun/flip.js b/TO REWRITE/Fun/flip.js deleted file mode 100644 index 09944fe1..00000000 --- a/TO REWRITE/Fun/flip.js +++ /dev/null @@ -1,25 +0,0 @@ -const Command = require("../../base/Command"); - -class Flip extends Command { - constructor(client) { - super(client, { - name: "flip", - dirname: __dirname, - enabled: true, - guildOnly: false, - aliases: ["dice", "coin"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 2000 - }); - } - - async run(message) { - const isHeads = Math.random() > 0.5; - isHeads ? message.sendT("fun/flip:HEADS") : message.sendT("fun/flip:TAILS"); - } -} - -module.exports = Flip; \ No newline at end of file diff --git a/TO REWRITE/Fun/lmg.js b/TO REWRITE/Fun/lmg.js deleted file mode 100644 index 0742216b..00000000 --- a/TO REWRITE/Fun/lmg.js +++ /dev/null @@ -1,30 +0,0 @@ -const Command = require("../../base/Command"); - -class Lmg extends Command { - constructor(client) { - super(client, { - name: "lmg", - dirname: __dirname, - enabled: true, - guildOnly: false, - aliases: ["lmgtfy"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 1000 - }); - } - - async run(message, args) { - const question = args.join(" "); - if (!question) return message.error("fun/lmg:MISSING"); - const encodedQuestion = question.replace(/[' '_]/g, "+"); - await message.reply({ - content: `` - }); - message.delete().catch(() => {}); - } -} - -module.exports = Lmg; \ No newline at end of file diff --git a/TO REWRITE/Fun/lovecalc.js b/TO REWRITE/Fun/lovecalc.js deleted file mode 100644 index 102f4a9d..00000000 --- a/TO REWRITE/Fun/lovecalc.js +++ /dev/null @@ -1,59 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"), - md5 = require("md5"); - -class Lovecalc extends Command { - constructor(client) { - super(client, { - name: "lovecalc", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["lc"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 1000 - }); - } - - async run(message, args, data) { - const firstMember = message.mentions.members.filter(m => m.id !== message.author.id).first(); - if (!firstMember) return message.error("fun/lovecalc:MISSING"); - const secondMember = message.mentions.members - .filter(m => m.id !== firstMember.id) - .filter(m => m.id !== message.author.id) - .first() || message.member; - if (!secondMember) return message.error("fun/lovecalc:MISSING"); - - const members = [firstMember, secondMember].sort((a, b) => parseInt(a.id, 10) - parseInt(b.id, 10)); - const hash = md5(`${members[0].id}${members[1].user.username}${members[0].user.username}${members[1].id}`); - - const string = hash - .split("") - .filter(e => !isNaN(e)) - .join(""); - const percent = parseInt(string.substr(0, 2), 10); - - const embed = new Discord.MessageEmbed() - .setAuthor({ - name: `❤️ ${message.translate("fun/lovecalc:DESCRIPTION")}` - }) - .setDescription(message.translate("fun/lovecalc:CONTENT", { - percent, - firstUsername: firstMember.user.username, - secondUsername: secondMember.user.username - })) - .setColor(data.config.embed.color) - .setFooter({ - text: data.config.embed.footer - }); - - message.reply({ - embeds: [embed] - }); - } -} - -module.exports = Lovecalc; \ No newline at end of file diff --git a/TO REWRITE/Fun/memes.js b/TO REWRITE/Fun/memes.js deleted file mode 100644 index 5026f94c..00000000 --- a/TO REWRITE/Fun/memes.js +++ /dev/null @@ -1,78 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"), - fetch = require("node-fetch"); - -class Memes extends Command { - constructor(client) { - super(client, { - name: "memes", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["mem"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"], - nsfw: false, - ownerOnly: false, - cooldown: 2000 - }); - } - - async run(message, args, data) { - const tag = args[0]; - const subs = ["memes", "dankmemes", "me_irl", "wholesomememes"]; - - if (tag === "list") { - const embed = new Discord.MessageEmbed() - .setColor(data.config.embed.color) - .setFooter({ - text: data.config.embed.footer - }) - .setTitle(message.translate("fun/memes:EMBED_TITLE")) - .setDescription(subs.join("\n")) - .setTimestamp(); - - message.reply({ - embeds: [embed] - }); - } else if (!tag) { - const m = await message.sendT("fun/memes:SEARCHING_RANDOM"); - - const res = await fetch("https://meme-api.herokuapp.com/gimme/").then(response => response.json()); - const embed = new Discord.MessageEmbed() - .setColor(data.config.embed.color) - .setFooter({ - text: data.config.embed.footer - }) - .setTitle(`${res.title}\n${message.translate("fun/memes:SUBREDDIT")}: ${res.subreddit}\n${message.translate("common:AUTHOR")}: ${res.author}\n${message.translate("fun/memes:UPS")}: ${res.ups}`) - .setImage(res.url) - .setTimestamp(); - - m.edit({ - content: null, - embeds: [embed] - }); - } else if (subs.includes(tag)) { - const m = await message.sendT("fun/memes:SEARCHING", { - tag - }); - - const res = await fetch(`https://meme-api.herokuapp.com/gimme/${tag}`).then(response => response.json()); - const embed = new Discord.MessageEmbed() - .setColor(data.config.embed.color) - .setFooter({ - text: data.config.embed.footer - }) - .setTitle(`${res.title}\n${message.translate("fun/memes:SUBREDDIT")}: ${res.subreddit}\n${message.translate("common:AUTHOR")}: ${res.author}\n${message.translate("fun/memes:UPS")}: ${res.ups}`) - .setImage(res.url) - .setTimestamp(); - - m.edit({ - content: null, - embeds: [embed] - }); - } else return message.error("fun/memes:NOT_FOUND"); - } -} - -module.exports = Memes; \ No newline at end of file diff --git a/TO REWRITE/General/activity.js b/TO REWRITE/General/activity.js index aa8d852f..1ddeb9b4 100644 --- a/TO REWRITE/General/activity.js +++ b/TO REWRITE/General/activity.js @@ -1,5 +1,5 @@ const Command = require("../../base/Command"), - Discord = require("discord.js"); + { PermissionsBitField } = require("discord.js"); class Activity extends Command { constructor(client) { @@ -22,7 +22,7 @@ class Activity extends Command { if (!voice) return message.error("music/play:NO_VOICE_CHANNEL"); const perms = voice.permissionsFor(this.client.user); - if (!perms.has(Discord.Permissions.FLAGS.CONNECT) || !perms.has(Discord.Permissions.FLAGS.SPEAK)) return message.error("music/play:VOICE_CHANNEL_CONNECT"); + if (!perms.has(PermissionsBitField.Flags.Connect) || !perms.has(PermissionsBitField.Flags.Speak)) return message.error("music/play:VOICE_CHANNEL_CONNECT"); const activities = [ "betrayal", @@ -43,7 +43,7 @@ class Activity extends Command { switch (activity) { case "betrayal": this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "betrayal").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Betrayal.io") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Betrayal.io", channel: voice.name })}](${invite.code})**`) @@ -61,7 +61,7 @@ class Activity extends Command { if (message.guild.premiumTier === "NONE") return message.error("general/activity:NO_BOOST"); this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "checkers").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Checkers In The Park") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Checkers In The Park", channel: voice.name })}](${invite.code})**`) @@ -79,7 +79,7 @@ class Activity extends Command { if (message.guild.premiumTier === "NONE") return message.error("general/activity:NO_BOOST"); this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "chess").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Chess In The Park") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Chess In The Park", channel: voice.name })}](${invite.code})**`) @@ -95,7 +95,7 @@ class Activity extends Command { case "sketchheads": this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "sketchheads").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Sketch Heads") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Sketch Heads", channel: voice.name })}](${invite.code})**`) @@ -113,7 +113,7 @@ class Activity extends Command { if (message.guild.premiumTier === "NONE") return message.error("general/activity:NO_BOOST"); this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "ocho").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Ocho") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Ocho", channel: voice.name })}](${invite.code})**`) @@ -129,7 +129,7 @@ class Activity extends Command { case "fishing": this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "fishing").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Fishington.io") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Fishington.io", channel: voice.name })}](${invite.code})**`) @@ -145,7 +145,7 @@ class Activity extends Command { case "lettertile": this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "lettertile").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Letter Tile") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Letter Tile", channel: voice.name })}](${invite.code})**`) @@ -163,7 +163,7 @@ class Activity extends Command { if (message.guild.premiumTier === "NONE") return message.error("general/activity:NO_BOOST"); this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "poker").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Poker Night") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Poker Night", channel: voice.name })}](${invite.code})**`) @@ -181,7 +181,7 @@ class Activity extends Command { if (message.guild.premiumTier === "NONE") return message.error("general/activity:NO_BOOST"); this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "spellcast").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Spell Cast") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Spell Cast", channel: voice.name })}](${invite.code})**`) @@ -197,7 +197,7 @@ class Activity extends Command { case "wordsnack": this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "wordsnack").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Words Snack") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Words Snack", channel: voice.name })}](${invite.code})**`) @@ -213,7 +213,7 @@ class Activity extends Command { case "puttparty": this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "puttparty").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Puttparty") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Puttparty", channel: voice.name })}](${invite.code})**`) @@ -229,7 +229,7 @@ class Activity extends Command { case "youtube": this.client.discordTogether.createTogetherCode(message.member.voice.channelId, "youtube").then(async invite => { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle("Youtube Together") .setColor(data.config.embed.color) .setDescription(`**[${message.translate("misc:CLICK_HERE", { activity: "Youtube Together", channel: voice.name })}](${invite.code})**`) @@ -244,7 +244,7 @@ class Activity extends Command { break; default: { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle(message.translate("general/activity:TITLE")) .setDescription(activities.join("\n")) .setColor(data.config.embed.color) diff --git a/TO REWRITE/General/avatar.js b/TO REWRITE/General/avatar.js index f875f72a..ddaefd85 100644 --- a/TO REWRITE/General/avatar.js +++ b/TO REWRITE/General/avatar.js @@ -20,7 +20,6 @@ class Avatar extends Command { let user = await this.client.resolveUser(args[0]); if (!user) user = message.author; const avatarURL = user.displayAvatarURL({ - dynamic: true, size: 512 }); diff --git a/TO REWRITE/General/emoji.js b/TO REWRITE/General/emoji.js index bfbfd5bf..7d3f9da5 100644 --- a/TO REWRITE/General/emoji.js +++ b/TO REWRITE/General/emoji.js @@ -1,5 +1,5 @@ const Command = require("../../base/Command"), - Discord = require("discord.js"); + { EmbedBuilder, parseEmoji } = require("discord.js"); class EmojiInfo extends Command { constructor(client) { @@ -21,9 +21,9 @@ class EmojiInfo extends Command { const rawEmoji = args[0]; if (!rawEmoji) return message.error("administration/stealemoji:MISSING_EMOJI"); - const parsedEmoji = Discord.Util.parseEmoji(rawEmoji); + const parsedEmoji = parseEmoji(rawEmoji); - const embed = new Discord.MessageEmbed() + const embed = new EmbedBuilder() .setAuthor({ name: message.translate("general/emoji:TITLE", { emoji: parsedEmoji.name @@ -33,9 +33,20 @@ class EmojiInfo extends Command { .setFooter({ text: data.config.embed.footer }) - .addField(message.translate("general/emoji:NAME"), parsedEmoji.name) - .addField(message.translate("general/emoji:ANIMATED"), parsedEmoji.animated ? message.translate("common:YES") : message.translate("common:NO")) - .addField(message.translate("general/emoji:ID"), parsedEmoji.id ? parsedEmoji.id.toString() : message.translate("general/emoji:STANDART")); + .addFields([ + { + name: message.translate("general/emoji:NAME"), + value: parsedEmoji.name + }, + { + name: message.translate("general/emoji:ANIMATED"), + value: parsedEmoji.animated ? message.translate("common:YES") : message.translate("common:NO") + }, + { + name: message.translate("general/emoji:ID"), + value: parsedEmoji.id ? parsedEmoji.id.toString() : message.translate("general/emoji:STANDART") + } + ]); message.reply({ embeds: [embed] diff --git a/TO REWRITE/General/help.js b/TO REWRITE/General/help.js index 882c3d08..aae84a44 100644 --- a/TO REWRITE/General/help.js +++ b/TO REWRITE/General/help.js @@ -1,5 +1,5 @@ const Command = require("../../base/Command"), - Discord = require("discord.js"); + { PermissionsBitField, EmbedBuilder } = require("discord.js"); class Help extends Command { constructor(client) { @@ -40,17 +40,34 @@ class Help extends Command { prefix: message.guild ? data.guild.prefix : "" }); - const groupEmbed = new Discord.MessageEmbed() + const groupEmbed = new EmbedBuilder() .setAuthor({ name: message.translate("general/help:CMD_TITLE", { cmd: cmd.help.name }) }) - .addField(message.translate("general/help:FIELD_DESCRIPTION"), description) - .addField(message.translate("general/help:FIELD_USAGE"), usage) - .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")) + .addFields([ + { + name: message.translate("general/help:FIELD_DESCRIPTION"), + value: description + }, + { + name: message.translate("general/help:FIELD_USAGE"), + value: usage + }, + { + name: message.translate("general/help:FIELD_EXAMPLES"), + value: examples + }, + { + name: message.translate("general/help:FIELD_ALIASES"), + value: cmd.help.aliases.length > 0 ? cmd.help.aliases.map(a => "`" + a + "`").join("\n") : message.translate("general/help:NO_ALIAS") + }, + { + name: message.translate("general/help:FIELD_PERMISSIONS"), + value: cmd.conf.memberPermissions.length > 0 ? cmd.conf.memberPermissions.map((p) => `\`${p}\``).join("\n") : message.translate("general/help:NO_REQUIRED_PERMISSION") + } + ]) .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer @@ -73,7 +90,7 @@ class Help extends Command { const emojis = this.client.customEmojis; - const embed = new Discord.MessageEmbed() + const embed = new EmbedBuilder() .setDescription(message.translate("general/help:INFO", { prefix: message.guild ? data.guild.prefix : "" })) @@ -83,27 +100,32 @@ class Help extends Command { }); categories.sort().forEach((cat) => { const tCommands = commands.filter((cmd) => cmd.help.category === cat); - embed.addField(`${emojis.categories[cat.toLowerCase()]} ${cat} - (${tCommands.size})`, `${tCommands.map((cmd) => `\`${cmd.help.name}\``).join(", ")}`); + embed.addFields([ + { + name: `${emojis.categories[cat.toLowerCase()]} ${cat} - (${tCommands.size})`, + value: `${tCommands.map((cmd) => `\`${cmd.help.name}\``).join(", ")}` + } + ]); }); - if (message.guild) { - if (data.guild.customCommands.length > 0) embed.addField(`${emojis.categories.custom} ${message.guild.name} | ${message.translate("general/help:CUSTOM_COMMANDS")} - (${data.guild.customCommands.length})`, data.guild.customCommands.map((cmd) => `\`${cmd.name}\``).join(", ")); - } - - embed.addField("\u200B", message.translate("misc:STATS_FOOTER", { - dashboardLink: this.client.config.dashboard.baseURL, - docsLink: `${this.client.config.dashboard.baseURL}/docs/`, - inviteLink: this.client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR] }), - donateLink: "https://qiwi.com/n/JONNYBRO/", - owner: data.config.owner.id - })); + embed.addFields([ + { + name: "\u200B", + value: message.translate("misc:STATS_FOOTER", { + dashboardLink: this.client.config.dashboard.baseURL, + docsLink: `${this.client.config.dashboard.baseURL}/docs/`, + inviteLink: this.client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [ PermissionsBitField.Flags.Administrator] }), + donateLink: "https://qiwi.com/n/JONNYBRO/", + owner: data.config.owner.id + }) + } + ]); embed.setAuthor({ name: message.translate("general/help:TITLE", { name: this.client.user.username }), iconURL: this.client.user.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }); diff --git a/TO REWRITE/General/invite.js b/TO REWRITE/General/invite.js deleted file mode 100644 index e7e08a95..00000000 --- a/TO REWRITE/General/invite.js +++ /dev/null @@ -1,55 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"); - -class Invite extends Command { - constructor(client) { - super(client, { - name: "invite", - dirname: __dirname, - enabled: true, - guildOnly: false, - aliases: ["i"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 1000 - }); - } - - async run(message, args, data) { - const inviteLink = this.client.generateInvite({ - scopes: ["bot", "applications.commands"], - permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR] - }); - const donateLink = "https://qiwi.com/n/JONNYBRO/"; - - if (args[0] && args[0] === "copy") return message.reply({ - content: inviteLink - }); - - const embed = new Discord.MessageEmbed() - .setAuthor({ - name: message.translate("general/invite:LINKS") - }) - .setDescription(message.translate("general/invite:TIP", { - prefix: data.guild.prefix || "" - })) - .addField(message.translate("general/invite:ADD"), message.translate("general/invite:CLICK", { - link: inviteLink - })) - .addField(message.translate("general/invite:SUPPORT"), message.translate("general/invite:CLICK", { - link: donateLink - }) + `\n*для других способов пишите в ЛС <@${data.config.owner.id}> (указывайте ваш Discord тэг чтобы я мог выдать вам ачивку)*`) - .setColor(data.config.embed.color) - .setFooter({ - text: data.config.embed.footer - }); - - message.reply({ - embeds: [embed] - }); - } -} - -module.exports = Invite; \ No newline at end of file diff --git a/TO REWRITE/General/invites.js b/TO REWRITE/General/invites.js deleted file mode 100644 index 64621010..00000000 --- a/TO REWRITE/General/invites.js +++ /dev/null @@ -1,72 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"); - -class Invites extends Command { - constructor(client) { - super(client, { - name: "invites", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["invs"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "MANAGE_GUILD"], - nsfw: false, - ownerOnly: false, - cooldown: 1000 - }); - } - - async run(message, args, data) { - let member = await this.client.resolveMember(args[0], message.guild); - if (!member) member = message.member; - - const invites = await message.guild.invites.fetch().catch(() => {}); - if (!invites) return message.error("misc:ERR_OCCURRED"); - - const memberInvites = invites.filter((i) => i.inviter && i.inviter.id === member.user.id); - - if (memberInvites.size <= 0) { - if (member === message.member) { - return message.error("general/invites:NOBODY_AUTHOR"); - } else { - return message.error("general/invites:NOBODY_MEMBER", { - member: member.user.tag - }); - } - } - - const content = memberInvites.map((i) => { - return message.translate("general/invites:CODE", { - uses: i.uses, - code: i.code, - channel: i.channel.toString() - }); - }).join("\n"); - let index = 0; - memberInvites.forEach((invite) => index += invite.uses); - - const embed = new Discord.MessageEmbed() - .setColor(data.config.embed.color) - .setFooter({ - text: data.config.embed.footer - }) - .setAuthor({ - name: message.translate("general/invites:TRACKER") - }) - .setDescription(message.translate("general/invites:TITLE", { - member: member.user.tag, - guild: message.guild.name - })) - .addField(message.translate("general/invites:FIELD_INVITED"), message.translate("general/invites:FIELD_MEMBERS", { - total: index - })) - .addField(message.translate("general/invites:FIELD_CODES"), content); - - message.reply({ - embeds: [embed] - }); - } -} - -module.exports = Invites; \ No newline at end of file diff --git a/TO REWRITE/General/minecraft.js b/TO REWRITE/General/minecraft.js index 22679cf7..30e44e67 100644 --- a/TO REWRITE/General/minecraft.js +++ b/TO REWRITE/General/minecraft.js @@ -60,15 +60,35 @@ class Minecraft extends Command { if (!json) return m.error("general/minecraft:FAILED", null, { edit: true }); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: json.name }) - .addField(message.translate("general/minecraft:FIELD_STATUS"), message.translate("general/minecraft:ONLINE")) - .addField(message.translate("general/minecraft:FIELD_CONNECTED"), `**${(json.raw.players ? json.raw.players.online : json.players.length)}** ${message.getNoun((json.raw.players ? json.raw.players.online : json.players.length), message.translate("misc:NOUNS:PLAYERS:1"), message.translate("misc:NOUNS:PLAYERS:2"), message.translate("misc:NOUNS:PLAYERS:5"))} / **${(json.raw.players ? json.raw.players.max : json.maxplayers)}** ${message.getNoun((json.raw.players ? json.raw.players.max : json.maxplayers), message.translate("misc:NOUNS:PLAYERS:1"), message.translate("misc:NOUNS:PLAYERS:2"), message.translate("misc:NOUNS:PLAYERS:5"))}`) - .addField(message.translate("general/minecraft:FIELD_IP"), json.connect, true) - .addField(message.translate("general/minecraft:FIELD_VERSION"), json.raw.vanilla.raw.version.name, true) - .addField(message.translate("general/minecraft:FIELD_PING"), json.raw.vanilla.ping.toString()) + .addFields([ + { + name: message.translate("general/minecraft:FIELD_STATUS"), + value: message.translate("general/minecraft:ONLINE") + }, + { + name: message.translate("general/minecraft:FIELD_CONNECTED"), + value: `**${(json.raw.players ? json.raw.players.online : json.players.length)}** ${message.getNoun((json.raw.players ? json.raw.players.online : json.players.length), message.translate("misc:NOUNS:PLAYERS:1"), message.translate("misc:NOUNS:PLAYERS:2"), message.translate("misc:NOUNS:PLAYERS:5"))} / **${(json.raw.players ? json.raw.players.max : json.maxplayers)}** ${message.getNoun((json.raw.players ? json.raw.players.max : json.maxplayers), message.translate("misc:NOUNS:PLAYERS:1"), message.translate("misc:NOUNS:PLAYERS:2"), message.translate("misc:NOUNS:PLAYERS:5"))}` + }, + { + name: message.translate("general/minecraft:FIELD_IP"), + value: json.connect, + inline: true + }, + { + name: message.translate("general/minecraft:FIELD_VERSION"), + value: json.raw.vanilla.raw.version.name, + inline: true + + }, + { + name: message.translate("general/minecraft:FIELD_PING"), + value: json.raw.vanilla.ping.toString() + } + ]) .setColor(data.config.embed.color) .setThumbnail(favicon) .setFooter({ diff --git a/TO REWRITE/General/permissions.js b/TO REWRITE/General/permissions.js deleted file mode 100644 index de3c1ef0..00000000 --- a/TO REWRITE/General/permissions.js +++ /dev/null @@ -1,50 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"); - -const permissions = Object.keys(Discord.Permissions.FLAGS); - -class Permissions extends Command { - constructor(client) { - super(client, { - name: "permissions", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["perms"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 1000 - }); - } - - async run(message) { - const member = message.mentions.members.first() || message.member; - const mPermissions = message.channel.permissionsFor(member); - const total = { - denied: 0, - allowed: 0 - }; - - let text = `**${message.translate("general/permissions:TITLE", { user: member.user.username, channel: message.channel.name })}**\n`; - permissions.forEach((perm) => { - if (perm === "REQUEST_TO_SPEAK") return; - - if (!mPermissions.has(perm)) { - text += `${message.translate(`misc:PERMISSIONS:${perm}`)} ❌\n`; - total.denied++; - } else { - text += `${message.translate(`misc:PERMISSIONS:${perm}`)} ✅\n`; - total.allowed++; - } - }); - text += `\n${total.allowed} ✅ | ${total.denied} ❌`; - - message.reply({ - content: text - }); - } -} - -module.exports = Permissions; \ No newline at end of file diff --git a/TO REWRITE/General/quote.js b/TO REWRITE/General/quote.js deleted file mode 100644 index f464a03f..00000000 --- a/TO REWRITE/General/quote.js +++ /dev/null @@ -1,88 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"); - -class Quote extends Command { - constructor(client) { - super(client, { - name: "quote", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["qu"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 1000 - }); - } - - async run(message, args, data) { - function embed(m) { - const embed = new Discord.MessageEmbed() - .setAuthor({ - name: m.author.tag, - iconURL: m.author.displayAvatarURL({ - size: 512, - dynamic: true, - format: "png" - }) - }) - .setDescription(m.content) - .setColor(m.member ? m.member.roles.highest ? m.member.roles.highest.color : data.config.embed.color : data.config.embed.color) - .setFooter({ - text: m.guild.name + " | #" + m.channel.name - }) - .setTimestamp(m.createdTimestamp); - if (m.attachments.size > 0) embed.setImage(m.attachments.first().url); - return embed; - } - - const msgID = args[0]; - if (isNaN(msgID)) { - message.error("general/quote:MISSING_ID").then(() => { - if (message.deletable) message.delete(); - }); - return; - } - - let channel = args[1]; - if (args[1]) { - channel = this.client.channels.cache.get(args[1]); - if (!channel) { - message.error("general/quote:NO_MESSAGE_ID").then(() => { - if (message.deletable) message.delete(); - }); - return; - } - } - - if (!channel) { - message.channel.messages.fetch(msgID).catch(() => { - message.error("general/quote:NO_MESSAGE_ID").then(() => { - if (message.deletable) message.delete(); - }); - return; - }).then((msg) => { - if (message.deletable) message.delete(); - message.reply({ - embeds: [embed(msg)] - }); - }); - } else { - channel.messages.fetch(msgID).then((msg) => { - if (message.deletable) message.delete(); - message.reply({ - embeds: [embed(msg)] - }); - }).catch(() => { - message.error("general/quote:NO_MESSAGE_ID").then(() => { - if (message.deletable) message.delete(); - }); - return; - }); - } - } -} - -module.exports = Quote; \ No newline at end of file diff --git a/TO REWRITE/General/report.js b/TO REWRITE/General/report.js index b63c239e..e616953f 100644 --- a/TO REWRITE/General/report.js +++ b/TO REWRITE/General/report.js @@ -1,5 +1,5 @@ const Command = require("../../base/Command"), - Discord = require("discord.js"); + { EmbedBuilder, parseEmoji} = require("discord.js"); class Report extends Command { constructor(client) { @@ -30,28 +30,45 @@ class Report extends Command { const rep = args.slice(1).join(" "); if (!rep) return message.error("general/report:MISSING_REASON"); - const embed = new Discord.MessageEmbed() + const embed = new EmbedBuilder() .setAuthor({ name: message.translate("general/report:TITLE", { user: member.user.tag }), iconURL: message.author.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }) - .addField(message.translate("common:AUTHOR"), message.author.tag, true) - .addField(message.translate("common:DATE"), this.client.printDate(new Date(Date.now())), true) - .addField(message.translate("common:REASON"), rep, true) - .addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) + .addFields([ + { + name: message.translate("common:AUTHOR"), + value: message.author.tag, + inline: true + }, + { + name: message.translate("common:DATE"), + value: this.client.printDate(new Date(Date.now())), + inline: true + }, + { + name: message.translate("common:REASON"), + value: rep, + inline: true + }, + { + name: message.translate("common:USER"), + value: `\`${member.user.tag}\` (${member.user.toString()})`, + inline: true + } + ]) .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer }); - const success = Discord.Util.parseEmoji(this.client.customEmojis.success).id; - const error = Discord.Util.parseEmoji(this.client.customEmojis.error).id; + const success = parseEmoji(this.client.customEmojis.cool).id; + const error = parseEmoji(this.client.customEmojis.notcool).id; repChannel.send({ embeds: [embed] diff --git a/TO REWRITE/General/serverinfo.js b/TO REWRITE/General/serverinfo.js index 4124ee3e..bb386b0b 100644 --- a/TO REWRITE/General/serverinfo.js +++ b/TO REWRITE/General/serverinfo.js @@ -31,32 +31,62 @@ class Serverinfo extends Command { await guild.members.fetch(); const owner = await guild.fetchOwner(); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: guild.name, - iconURL: guild.iconURL({ - dynamic: true - }) + iconURL: guild.iconURL() }) - .setThumbnail(guild.iconURL({ - dynamic: true - })) - .addField(this.client.customEmojis.link + " " + message.translate("general/serverinfo:LINK"), `[${message.translate("general/serverinfo:LINK_TEXT")}](${this.client.config.dashboard.baseURL}/stats/${guild.id})`) - .addField(this.client.customEmojis.title + message.translate("common:NAME"), guild.name, true) - .addField(this.client.customEmojis.calendar + message.translate("common:CREATION"), this.client.printDate(guild.createdAt), true) - .addField(this.client.customEmojis.users + message.translate("common:MEMBERS"), - `${guild.members.cache.filter(m => !m.user.bot).size} ${message.getNoun(guild.members.cache.filter(m => !m.user.bot).size, message.translate("misc:NOUNS:MEMBERS:1"), message.translate("misc:NOUNS:MEMBERS:2"), message.translate("misc:NOUNS:MEMBERS:5"))}` + - "\n" + `${guild.members.cache.filter(m => m.user.bot).size} ${message.getNoun(guild.members.cache.filter(m => m.user.bot).size, message.translate("misc:NOUNS:BOTS:1"), message.translate("misc:NOUNS:BOTS:2"), message.translate("misc:NOUNS:BOTS:5"))}`, true - ) - .addField(this.client.customEmojis.afk + message.translate("general/serverinfo:AFK_CHANNEL"), guild.afkChannel ? guild.afkChannel.toString() : message.translate("general/serverinfo:NO_AFK_CHANNEL"), true) - .addField(this.client.customEmojis.id + message.translate("common:ID"), guild.id, true) - .addField(this.client.customEmojis.crown + message.translate("common:OWNER"), owner.toString(), true) - .addField(this.client.customEmojis.boost + message.translate("general/serverinfo:BOOSTS"), guild.premiumSubscriptionCount.toString() || "0", true) - .addField(this.client.customEmojis.channels + message.translate("common:CHANNELS"), - `${guild.channels.cache.filter(c => c.type === "GUILD_TEXT").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "GUILD_TEXT").size, message.translate("misc:NOUNS:TEXT:1"), message.translate("misc:NOUNS:TEXT:2"), message.translate("misc:NOUNS:TEXT:5"))}` + - "\n" + `${guild.channels.cache.filter(c => c.type === "GUILD_VOICE").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "GUILD_VOICE").size, message.translate("misc:NOUNS:VOICE:1"), message.translate("misc:NOUNS:VOICE:2"), message.translate("misc:NOUNS:VOICE:5"))}` + - "\n" + `${guild.channels.cache.filter(c => c.type === "GUILD_CATEGORY").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "GUILD_CATEGORY").size, message.translate("misc:NOUNS:CATEGORY:1"), message.translate("misc:NOUNS:CATEGORY:2"), message.translate("misc:NOUNS:CATEGORY:5"))}`, true - ) + .setThumbnail(guild.iconURL()) + .addFields([ + { + name: this.client.customEmojis.link + " " + message.translate("general/serverinfo:LINK"), + value: `[${message.translate("general/serverinfo:LINK_TEXT")}](${this.client.config.dashboard.baseURL}/stats/${guild.id})` + }, + { + name: this.client.customEmojis.title + message.translate("common:NAME"), + value: guild.name, + inline: true + }, + { + name: this.client.customEmojis.calendar + message.translate("common:CREATION"), + value: this.client.printDate(guild.createdAt), + inline: true + }, + { + name: this.client.customEmojis.users + message.translate("common:MEMBERS"), + value: `${guild.members.cache.filter(m => !m.user.bot).size} ${message.getNoun(guild.members.cache.filter(m => !m.user.bot).size, message.translate("misc:NOUNS:MEMBERS:1"), message.translate("misc:NOUNS:MEMBERS:2"), message.translate("misc:NOUNS:MEMBERS:5"))}` + + "\n" + `${guild.members.cache.filter(m => m.user.bot).size} ${message.getNoun(guild.members.cache.filter(m => m.user.bot).size, message.translate("misc:NOUNS:BOTS:1"), message.translate("misc:NOUNS:BOTS:2"), message.translate("misc:NOUNS:BOTS:5"))}`, + inline: true + }, + { + name: this.client.customEmojis.afk + message.translate("general/serverinfo:AFK_CHANNEL"), + value: guild.afkChannel ? guild.afkChannel.toString() : message.translate("general/serverinfo:NO_AFK_CHANNEL"), + inline: true + }, + { + name: this.client.customEmojis.id + message.translate("common:ID"), + value: guild.id, + inline: true + }, + { + name: this.client.customEmojis.crown + message.translate("common:OWNER"), + value: owner.toString(), + inline: true + }, + { + name: this.client.customEmojis.boost + message.translate("general/serverinfo:BOOSTS"), + value: guild.premiumSubscriptionCount.toString() || "0", + inline: true + }, + { + name: this.client.customEmojis.channels + message.translate("common:CHANNELS"), + value: `${guild.channels.cache.filter(c => c.type === "GUILD_TEXT").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "GUILD_TEXT").size, message.translate("misc:NOUNS:TEXT:1"), message.translate("misc:NOUNS:TEXT:2"), message.translate("misc:NOUNS:TEXT:5"))}` + + "\n" + `${guild.channels.cache.filter(c => c.type === "GUILD_VOICE").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "GUILD_VOICE").size, message.translate("misc:NOUNS:VOICE:1"), message.translate("misc:NOUNS:VOICE:2"), message.translate("misc:NOUNS:VOICE:5"))}` + + "\n" + `${guild.channels.cache.filter(c => c.type === "GUILD_CATEGORY").size} ${message.getNoun(guild.channels.cache.filter(c => c.type === "GUILD_CATEGORY").size, message.translate("misc:NOUNS:CATEGORY:1"), message.translate("misc:NOUNS:CATEGORY:2"), message.translate("misc:NOUNS:CATEGORY:5"))}`, + inline: true + } + ]) + .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer diff --git a/TO REWRITE/General/shorturl.js b/TO REWRITE/General/shorturl.js index d353f77a..df49351d 100644 --- a/TO REWRITE/General/shorturl.js +++ b/TO REWRITE/General/shorturl.js @@ -27,7 +27,7 @@ class ShortURL extends Command { if (body === "Error: Please enter a valid URL to shorten") return message.error("general/shorturl:MISSING_URL"); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer diff --git a/TO REWRITE/General/staff.js b/TO REWRITE/General/staff.js index e05204ae..61e45dd5 100644 --- a/TO REWRITE/General/staff.js +++ b/TO REWRITE/General/staff.js @@ -1,5 +1,5 @@ const Command = require("../../base/Command"), - Discord = require("discord.js"); + { PermissionsBitField, EmbedBuilder } = require("discord.js"); class Staff extends Command { constructor(client) { @@ -19,16 +19,24 @@ class Staff extends Command { async run(message, args, data) { await message.guild.members.fetch(); - const administrators = message.guild.members.cache.filter((m) => m.permissions.has(Discord.Permissions.FLAGS.ADMINISTRATOR) && !m.user.bot); - const moderators = message.guild.members.cache.filter((m) => !administrators.has(m.id) && m.permissions.has(Discord.Permissions.FLAGS.MANAGE_MESSAGES) && !m.user.bot); - const embed = new Discord.MessageEmbed() + const administrators = message.guild.members.cache.filter((m) => m.permissions.has(PermissionsBitField.Flags.Administrator) && !m.user.bot); + const moderators = message.guild.members.cache.filter((m) => !administrators.has(m.id) && m.permissions.has(PermissionsBitField.Flags.ManageMessages) && !m.user.bot); + const embed = new EmbedBuilder() .setAuthor({ name: message.translate("general/staff:TITLE", { guild: message.guild.name }) }) - .addField(message.translate("general/staff:ADMINS"), (administrators.size > 0 ? administrators.map((a) => `${a.presence ? this.client.customEmojis.status[a.presence.status] : this.client.customEmojis.status.offline} | <@${a.user.id}>`).join("\n") : message.translate("general/staff:NO_ADMINS"))) - .addField(message.translate("general/staff:MODS"), (moderators.size > 0 ? moderators.map((m) => `${m.presence ? this.client.customEmojis.status[m.presence.status] : this.client.customEmojis.status.offline} | <@${m.user.id}>`).join("\n") : message.translate("general/staff:NO_MODS"))) + .addFields([ + { + name: message.translate("general/staff:ADMINS"), + value: (administrators.size > 0 ? administrators.map((a) => `${a.presence ? this.client.customEmojis.status[a.presence.status] : this.client.customEmojis.status.offline} | <@${a.user.id}>`).join("\n") : message.translate("general/staff:NO_ADMINS")) + }, + { + name: message.translate("general/staff:MODS"), + value: (moderators.size > 0 ? moderators.map((m) => `${m.presence ? this.client.customEmojis.status[m.presence.status] : this.client.customEmojis.status.offline} | <@${m.user.id}>`).join("\n") : message.translate("general/staff:NO_MODS")) + } + ]) .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer diff --git a/TO REWRITE/General/stats.js b/TO REWRITE/General/stats.js index 4164aa37..f2b96444 100644 --- a/TO REWRITE/General/stats.js +++ b/TO REWRITE/General/stats.js @@ -1,5 +1,5 @@ const Command = require("../../base/Command"), - Discord = require("discord.js"); + { PermissionsBitField, EmbedBuilder, version } = require("discord.js"); class Stats extends Command { constructor(client) { @@ -22,7 +22,7 @@ class Stats extends Command { const users = this.client.users.cache.size - hiddenGuild.memberCount; const servers = this.client.guilds.cache.size - 1; - const statsEmbed = new Discord.MessageEmbed() + const statsEmbed = new EmbedBuilder() .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer @@ -31,29 +31,56 @@ class Stats extends Command { name: message.translate("common:STATS") }) .setDescription(message.translate("general/stats:MADE")) - .addField(this.client.customEmojis.stats + " " + message.translate("general/stats:COUNTS_TITLE"), message.translate("general/stats:COUNTS_CONTENT", { - servers: servers, - users: users - }), true) - .addField(this.client.customEmojis.version + " " + message.translate("general/stats:VERSIONS_TITLE"), `\`Discord.js : v${Discord.version}\`\n\`Nodejs : v${process.versions.node}\``, true) - .addField(this.client.customEmojis.ram + " " + message.translate("general/stats:RAM_TITLE"), `\`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB\``, true) - .addField(this.client.customEmojis.status.online + " " + message.translate("general/stats:ONLINE_TITLE"), message.translate("general/stats:ONLINE_CONTENT", { - time: this.client.convertTime(Date.now() + this.client.uptime, "from", true) - })) - .addField(this.client.customEmojis.voice + " " + message.translate("general/stats:MUSIC_TITLE"), message.translate("general/stats:MUSIC_CONTENT", { - count: `${this.client.player.voices.collection.size} ${message.getNoun(this.client.player.voices.collection.size, message.translate("misc:NOUNS:SERVERS:1"), message.translate("misc:NOUNS:SERVERS:2"), message.translate("misc:NOUNS:SERVERS:5"))}` - })) - .addField(message.translate("general/stats:CREDITS_TITLE"), message.translate("general/stats:CREDITS_CONTENT", { - donators: ["**`Добрый Спецназ#8801`** - Тестер, генератор идей"].join("\n"), - translators: ["**`Jonny_Bro#4226`** - :flag_ru:", "**`[ДАННЫЕ УДАЛЕНЫ]#4507`** - :flag_ua:"].join("\n") - })) - .addField(this.client.customEmojis.link + " " + message.translate("general/stats:LINKS_TITLE"), message.translate("misc:STATS_FOOTER", { - dashboardLink: this.client.config.dashboard.baseURL, - docsLink: `${this.client.config.dashboard.baseURL}/docs/`, - inviteLink: this.client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [Discord.Permissions.FLAGS.ADMINISTRATOR] }), - donateLink: "https://qiwi.com/n/JONNYBRO/", - owner: data.config.owner.id - })); + .addFields([ + { + name: this.client.customEmojis.stats + " " + message.translate("general/stats:COUNTS_TITLE"), + value: message.translate("general/stats:COUNTS_CONTENT", { + servers: servers, + users: users + }), + inline: true + }, + { + name: this.client.customEmojis.version + " " + message.translate("general/stats:VERSIONS_TITLE"), + value: `\`Discord.js: v${version}\`\n\`Nodejs: v${process.versions.node}\``, + inline: true + }, + { + name: this.client.customEmojis.ram + " " + message.translate("general/stats:RAM_TITLE"), + value: `\`${(process.memoryUsage().heapUsed / 1024 / 1024).toFixed(2)}MB\``, + inline: true + }, + { + name: this.client.customEmojis.status.online + " " + message.translate("general/stats:ONLINE_TITLE"), + value: message.translate("general/stats:ONLINE_CONTENT", { + time: this.client.convertTime(Date.now() + this.client.uptime, true, true) + }) + }, + { + name: this.client.customEmojis.voice + " " + message.translate("general/stats:MUSIC_TITLE"), + value: message.translate("general/stats:MUSIC_CONTENT", { + count: `${this.client.player.voices.collection.size} ${message.getNoun(this.client.player.voices.collection.size, message.translate("misc:NOUNS:SERVERS:1"), message.translate("misc:NOUNS:SERVERS:2"), message.translate("misc:NOUNS:SERVERS:5"))}` + }) + }, + { + name: message.translate("general/stats:CREDITS_TITLE"), + value: message.translate("general/stats:CREDITS_CONTENT", { + donators: ["**`Добрый Спецназ#8801`** - Тестер, генератор идей"].join("\n"), + translators: ["**`Jonny_Bro#4226`** - :flag_ru:", "**`[ДАННЫЕ УДАЛЕНЫ]#4507`** - :flag_ua: (НЕ ОБНОВЛЕН!)"].join("\n") + }) + }, + { + name: this.client.customEmojis.link + " " + message.translate("general/stats:LINKS_TITLE"), + value: message.translate("misc:STATS_FOOTER", { + dashboardLink: this.client.config.dashboard.baseURL, + docsLink: `${this.client.config.dashboard.baseURL}/docs/`, + inviteLink: this.client.generateInvite({ scopes: ["bot", "applications.commands"], permissions: [ PermissionsBitField.Flags.Administrator ] }), + donateLink: "https://qiwi.com/n/JONNYBRO/", + owner: data.config.owner.id + }) + } + ]); + message.reply({ embeds: [statsEmbed] }); diff --git a/TO REWRITE/General/suggest.js b/TO REWRITE/General/suggest.js index e4fd01f6..c7a3eabb 100644 --- a/TO REWRITE/General/suggest.js +++ b/TO REWRITE/General/suggest.js @@ -1,5 +1,5 @@ const Command = require("../../base/Command"), - Discord = require("discord.js"); + { EmbedBuilder, parseEmoji } = require("discord.js"); class Suggest extends Command { constructor(client) { @@ -26,27 +26,39 @@ class Suggest extends Command { const sugg = args.join(" "); if (!sugg) return message.error("general/suggest:MISSING_CONTENT"); - const embed = new Discord.MessageEmbed() + const embed = new EmbedBuilder() .setAuthor({ name: message.translate("general/suggest:TITLE", { user: message.author.username }), iconURL: message.author.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }) - .addField(message.translate("common:AUTHOR"), `\`${message.author.username}#${message.author.discriminator}\``, true) - .addField(message.translate("common:DATE"), this.client.printDate(new Date(Date.now())), true) - .addField(message.translate("common:CONTENT"), sugg) + .addFields([ + { + name: message.translate("common:AUTHOR"), + value: `\`${message.author.username}#${message.author.discriminator}\``, + inline: true + }, + { + name: message.translate("common:DATE"), + value: this.client.printDate(new Date(Date.now())), + inline: true + }, + { + name: message.translate("common:CONTENT"), + value: sugg + } + ]) .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer }); - const success = Discord.Util.parseEmoji(this.client.customEmojis.cool).id; - const error = Discord.Util.parseEmoji(this.client.customEmojis.notcool).id; + const success = parseEmoji(this.client.customEmojis.cool).id; + const error = parseEmoji(this.client.customEmojis.notcool).id; suggChannel.send({ embeds: [embed] diff --git a/TO REWRITE/General/translate.js b/TO REWRITE/General/translate.js deleted file mode 100644 index b5bb2219..00000000 --- a/TO REWRITE/General/translate.js +++ /dev/null @@ -1,72 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"), - translate = require("@k3rn31p4nic/google-translate-api"); - -const langs = ["afrikaans", "albanian", "amharic", "arabic", "armenian", "azerbaijani", "bangla", "basque", "belarusian", "bengali", "bosnian", "bulgarian", "burmese", "catalan", "cebuano", "chichewa", "corsican", "croatian", "czech", "danish", "dutch", "english", "esperanto", "estonian", "filipino", "finnish", "french", "frisian", "galician", "georgian", "german", "greek", "gujarati", "haitian creole", "hausa", "hawaiian", "hebrew", "hindi", "hmong", "hungarian", "icelandic", "igbo", "indonesian", "irish", "italian", "japanese", "javanese", "kannada", "kazakh", "khmer", "korean", "kurdish (kurmanji)", "kyrgyz", "lao", "latin", "latvian", "lithuanian", "luxembourgish", "macedonian", "malagasy", "malay", "malayalam", "maltese", "maori", "marathi", "mongolian", "myanmar (burmese)", "nepali", "norwegian", "nyanja", "pashto", "persian", "polish", "portugese", "punjabi", "romanian", "russian", "samoan", "scottish gaelic", "serbian", "sesotho", "shona", "sindhi", "sinhala", "slovak", "slovenian", "somali", "spanish", "sundanese", "swahili", "swedish", "tajik", "tamil", "telugu", "thai", "turkish", "ukrainian", "urdu", "uzbek", "vietnamese", "welsh", "xhosa", "yiddish", "yoruba", "zulu"]; - -class Translate extends Command { - constructor(client) { - super(client, { - name: "translate", - dirname: __dirname, - enabled: true, - guildOnly: false, - aliases: ["tran"], - memberPermissions: [], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], - nsfw: false, - ownerOnly: false, - cooldown: 3000 - }); - } - - async run(message, args, data) { - if (args[0] === "langs-list") { - const langsList = "```css\n" + (langs.map((lang, i) => `${i + 1} - ${lang}`).join("\n")) + "```"; - message.author.send(langsList).then(() => { - message.success("general/translate:LIST_SENT"); - }).catch(() => { - message.error("misc:CANNOT_DM"); - }); - return; - } - - const pWait = await message.sendT("misc:PLEASE_WAIT", null, { - prefixEmoji: "loading" - }); - - if (!args[0]) return pWait.error("general/translate:MISSING_LANGUAGE", { prefix: data.guild.prefix }, { edit: true }); - if (!args[1]) return pWait.error("general/translate:MISSING_CONTENT", null, { edit: true }); - - // Gets different args - const language = args[0].toLowerCase(); - const toTranslate = args.slice(1).join(" "); - - if (!langs.includes(language)) return pWait.error("general/translate:INVALID_LANGUAGE", { prefix: data.guild.prefix, search: language }, { edit: true }); - - const translated = await translate(toTranslate, { to: language }); - - const resEmbed = new Discord.MessageEmbed() - .setAuthor({ - name: "Переводчик", - iconURL: this.client.user.displayAvatarURL({ - size: 512, - dynamic: true, - format: "png" - }) - }) - .addField(translated.from.language.iso, "```" + toTranslate + "```") - .addField(language, "```" + translated.text + "```") - .setColor(data.config.embed.color) - .setFooter({ - text: data.config.embed.footer - }); - - return pWait.edit({ - content: null, - embeds: [resEmbed] - }); - } -} - -module.exports = Translate; \ No newline at end of file diff --git a/TO REWRITE/General/userinfo.js b/TO REWRITE/General/userinfo.js index 32d57873..5f292485 100644 --- a/TO REWRITE/General/userinfo.js +++ b/TO REWRITE/General/userinfo.js @@ -39,27 +39,44 @@ class Userinfo extends Command { let member = null; if (message.guild) member = await message.guild.members.fetch(user).catch(() => {}); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: `${user.tag} (${user.id})`, iconURL: user.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }) - .setThumbnail(user.displayAvatarURL({ - dynamic: true - })) - .addField(":man: " + message.translate("common:USERNAME"), user.username, true) - .addField(this.client.customEmojis.discriminator + " " + message.translate("common:DISCRIMINATOR"), user.discriminator, true) - .addField(this.client.customEmojis.bot + " " + message.translate("common:ROBOT"), (user.bot ? message.translate("common:YES") : message.translate("common:NO")), true) - .addField(this.client.customEmojis.calendar + " " + message.translate("common:CREATION"), this.client.printDate(user.createdAt), true) - .addField(this.client.customEmojis.avatar + " " + message.translate("common:AVATAR"), user.displayAvatarURL({ - size: 512, - dynamic: true, - format: "png" - })) + .setThumbnail(user.displayAvatarURL()) + .addFields([ + { + name: ":man: " + message.translate("common:USERNAME"), + value: member.nickname || user.username, + inline: true + }, + { + name: this.client.customEmojis.discriminator + " " + message.translate("common:DISCRIMINATOR"), + value: user.discriminator, + inline: true + }, + { + name: this.client.customEmojis.bot + " " + message.translate("common:ROBOT"), + value: (user.bot ? message.translate("common:YES") : message.translate("common:NO")), + inlinee: true + }, + { + name: this.client.customEmojis.calendar + " " + message.translate("common:CREATION"), + value: this.client.printDate(user.createdAt), + inline: true + }, + { + name: this.client.customEmojis.avatar + " " + message.translate("common:AVATAR"), + value: member.displayAvatarURL({ + size: 512, + format: "png" + }) + } + ]) .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer @@ -67,22 +84,58 @@ class Userinfo extends Command { if (displayPresence) { if (member.presence.activities[0].name === "Custom Status") { - embed.addField(this.client.customEmojis.games + " " + message.translate("common:GAME"), (member.presence.activities[0] ? `Пользовательский статус\n${member.presence.activities[0].state || message.translate("common:NOT_DEFINED")}` : message.translate("general/userinfo:NO_GAME")), true); - embed.addField(this.client.customEmojis.status[member.presence.status] + " " + message.translate("common:STATUS"), message.translate("common:STATUS_" + (member.presence.status.toUpperCase())), true); + embed.addFields([ + { + name: this.client.customEmojis.games + " " + message.translate("common:GAME"), + value: (member.presence.activities[0] ? `Пользовательский статус\n${member.presence.activities[0].state || message.translate("common:NOT_DEFINED")}` : message.translate("general/userinfo:NO_GAME")), + inline: true + }, + { + name: this.client.customEmojis.status[member.presence.status] + " " + message.translate("common:STATUS"), + value: message.translate("common:STATUS_" + (member.presence.status.toUpperCase())), + inline: true + } + ]); } else { - embed.addField(this.client.customEmojis.games + " " + message.translate("common:GAME"), (member.presence.activities[0] ? `${member.presence.activities[0].name}\n${member.presence.activities[0].details}\n${member.presence.activities[0].state}` : message.translate("general/userinfo:NO_GAME")), true); - embed.addField(this.client.customEmojis.status[member.presence.status] + " " + message.translate("common:STATUS"), message.translate("common:STATUS_" + (member.presence.status.toUpperCase())), true); + embed.addFields([ + { + name: this.client.customEmojis.games + " " + message.translate("common:GAME"), + value: (member.presence.activities[0] ? `${member.presence.activities[0].name}\n${member.presence.activities[0].details}\n${member.presence.activities[0].state}` : message.translate("general/userinfo:NO_GAME")), + inline: true + }, + { + name: this.client.customEmojis.status[member.presence.status] + " " + message.translate("common:STATUS"), + value: message.translate("common:STATUS_" + (member.presence.status.toUpperCase())), + inline: true + } + ]); } } if (member) { - // embed.addField(this.client.customEmojis.up + " " + message.translate("general/userinfo:ROLE"), (member.roles.highest ? member.roles.highest : message.translate("general/userinfo:NO_ROLE")), true) - embed.addField(this.client.customEmojis.calendar2 + " " + message.translate("common:JOIN"), this.client.printDate(member.joinedAt), true); - embed.addField(this.client.customEmojis.color + " " + message.translate("common:COLOR"), member.displayHexColor, true); - embed.addField(this.client.customEmojis.pencil + " " + message.translate("common:NICKNAME"), (member.nickname ? member.nickname : message.translate("general/userinfo:NO_NICKNAME")), true); - embed.addField(this.client.customEmojis.roles + " " + message.translate("common:ROLES"), (member.roles.size > 10 ? member.roles.cache.map((r) => r).slice(0, 9).join(", ") + " " + message.translate("general/userinfo:MORE_ROLES", { - count: member.roles.cache.size - 10 - }) : (member.roles.cache.size < 1) ? message.translate("general/userinfo:NO_ROLE") : member.roles.cache.map((r) => r).join(", "))); + embed.addFields([ + { + name: this.client.customEmojis.calendar2 + " " + message.translate("common:JOIN"), + value: this.client.printDate(member.joinedAt), + inline: true + }, + { + name: this.client.customEmojis.color + " " + message.translate("common:COLOR"), + value: member.displayHexColor, + inline: true + }, + { + name: this.client.customEmojis.pencil + " " + message.translate("common:NICKNAME"), + value: (member.nickname ? member.nickname : message.translate("general/userinfo:NO_NICKNAME")), + inline: true + }, + { + name: this.client.customEmojis.roles + " " + message.translate("common:ROLES"), + value: (member.roles.size > 10 ? member.roles.cache.map((r) => r).slice(0, 9).join(", ") + " " + message.translate("general/userinfo:MORE_ROLES", { + count: member.roles.cache.size - 10 + }) : (member.roles.cache.size < 1) ? message.translate("general/userinfo:NO_ROLE") : member.roles.cache.map((r) => r).join(", ")) + } + ]); } message.reply({ diff --git a/TO REWRITE/General/whois.js b/TO REWRITE/General/whois.js index 93c741c4..adbb996f 100644 --- a/TO REWRITE/General/whois.js +++ b/TO REWRITE/General/whois.js @@ -24,7 +24,7 @@ class Whois extends Command { const whois = await fetch(`http://ip-api.com/json/${args[0]}?fields=status,message,continent,continentCode,country,countryCode,region,regionName,city,zip,timezone,currency,isp,org,as,mobile,proxy,hosting,query`).then(response => response.json()); if (whois.status === "fail") { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setDescription(whois.message) .setTitle(message.translate("general/whois:ERROR", { ip: args[0] @@ -39,7 +39,7 @@ class Whois extends Command { }); } - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle(message.translate("general/whois:INFO_ABOUT", { ip: args[0] })) @@ -49,14 +49,14 @@ class Whois extends Command { .setColor(data.config.embed.color) .addFields( { name: "IP", value: whois.query, inline: true }, - { name: message.translate("general/whois:COUNTRY"), value: `${whois.country || "Неизвестно"} (${whois.countryCode || "Неизвестно"})`, inline: true }, - { name: message.translate("general/whois:REGION"), value: `${whois.regionName || "Неизвестно"} (${whois.region || "Неизвестно"})`, inline: true }, - { name: message.translate("general/whois:CITY"), value: `${whois.city || "Неизвестно"}`, inline: true }, - { name: message.translate("general/whois:ZIP"), value: `${whois.zip || "Неизвестно"}`, inline: true }, - { name: message.translate("general/whois:TIMEZONE"), value: `${whois.timezone || "Неизвестно"}`, inline: true }, - { name: message.translate("general/whois:CONTINENT"), value: `${whois.continent || "Неизвестно"} (${whois.continentCode || "Неизвестно"})`, inline: true }, - { name: message.translate("general/whois:CURRENCY"), value: `${whois.currency || "Неизвестно"}`, inline: true }, - { name: message.translate("general/whois:ISP"), value: `${whois.isp || "Неизвестно"}`, inline: true } + { name: message.translate("general/whois:COUNTRY"), value: `${whois.country || message.translate("common:UNKNOWN")} (${whois.countryCode || message.translate("common:UNKNOWN")})`, inline: true }, + { name: message.translate("general/whois:REGION"), value: `${whois.regionName || message.translate("common:UNKNOWN")} (${whois.region || message.translate("common:UNKNOWN")})`, inline: true }, + { name: message.translate("general/whois:CITY"), value: `${whois.city || message.translate("common:UNKNOWN")}`, inline: true }, + { name: message.translate("general/whois:ZIP"), value: `${whois.zip || message.translate("common:UNKNOWN")}`, inline: true }, + { name: message.translate("general/whois:TIMEZONE"), value: `${whois.timezone || message.translate("common:UNKNOWN")}`, inline: true }, + { name: message.translate("general/whois:CONTINENT"), value: `${whois.continent || message.translate("common:UNKNOWN")} (${whois.continentCode || message.translate("common:UNKNOWN")})`, inline: true }, + { name: message.translate("general/whois:CURRENCY"), value: `${whois.currency || message.translate("common:UNKNOWN")}`, inline: true }, + { name: message.translate("general/whois:ISP"), value: `${whois.isp || message.translate("common:UNKNOWN")}`, inline: true } ) .setTimestamp(); diff --git a/TO REWRITE/Moderation/announcement.js b/TO REWRITE/Moderation/announcement.js index e6a604bc..35508fd4 100644 --- a/TO REWRITE/Moderation/announcement.js +++ b/TO REWRITE/Moderation/announcement.js @@ -77,7 +77,7 @@ class Announcement extends Command { collector.on("end", (collected, reason) => { if (reason === "time") return message.error("misc:TIMES_UP"); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("moderation/announcement:TITLE") }) diff --git a/TO REWRITE/Moderation/ban.js b/TO REWRITE/Moderation/ban.js deleted file mode 100644 index 16090e9c..00000000 --- a/TO REWRITE/Moderation/ban.js +++ /dev/null @@ -1,112 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"); - -class Ban extends Command { - constructor(client) { - super(client, { - name: "ban", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["b"], - memberPermissions: ["BAN_MEMBERS"], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "BAN_MEMBERS"], - nsfw: false, - ownerOnly: false, - cooldown: 1000 - }); - } - - async run(message, args, data) { - const user = await this.client.resolveUser(args[0]); - if (!user) return message.error("moderation/ban:MISSING_MEMBER"); - - const memberData = message.guild.members.cache.get(user.id) ? await this.client.findOrCreateMember({ - id: user.id, - guildID: message.guild.id - }) : null; - - if (user.id === message.author.id) return message.error("moderation/ban:YOURSELF"); - - // If the user is already banned - const banned = await message.guild.bans.fetch(); - if (banned.some((m) => m.user.id === user.id)) return message.error("moderation/ban:ALREADY_BANNED", { - username: user.tag - }); - - // Gets the ban reason - let reason = args.slice(1).join(" "); - if (!reason) reason = message.translate("misc:NO_REASON_PROVIDED"); - - const member = await message.guild.members.fetch(user.id).catch(() => {}); - if (member) { - const memberPosition = member.roles.highest.position; - const moderationPosition = message.member.roles.highest.position; - if (message.member.ownerId !== message.author.id && !(moderationPosition > memberPosition)) return message.error("moderation/ban:SUPERIOR"); - if (!member.bannable) return message.error("moderation/ban:MISSING_PERM"); - } - - await user.send(message.translate("moderation/ban:BANNED_DM", { - username: user.tag, - server: message.guild.name, - moderator: message.author.tag, - reason - })).catch(() => {}); - - // Ban the user - message.guild.members.ban(user, { - reason - }).then(() => { - // Send a success message in the current channel - message.reply({ - content: message.translate("moderation/ban:BANNED", { - username: user.tag, - server: message.guild.name, - moderator: message.author.tag, - reason - }) - }); - - const caseInfo = { - channel: message.channel.id, - moderator: message.author.id, - date: Date.now(), - type: "ban", - case: data.guild.casesCount, - reason - }; - - if (memberData) { - memberData.sanctions.push(caseInfo); - memberData.save(); - } - - data.guild.casesCount++; - data.guild.save(); - - if (data.guild.plugins.modlogs) { - const channel = message.guild.channels.cache.get(data.guild.plugins.modlogs); - if (!channel) return; - const embed = new Discord.MessageEmbed() - .setAuthor({ - name: message.translate("moderation/ban:CASE", { - count: data.guild.casesCount - }) - }) - .addField(message.translate("common:USER"), `\`${user.tag}\` (${user.toString()})`, true) - .addField(message.translate("common:MODERATOR"), `\`${message.author.tag}\` (${message.author.toString()})`, true) - .addField(message.translate("common:REASON"), reason, true) - .setColor("#e02316"); - channel.send({ - embeds: [embed] - }); - } - - }).catch((err) => { - console.log(err); - return message.error("moderation/ban:MISSING_PERM"); - }); - } -} - -module.exports = Ban; \ No newline at end of file diff --git a/TO REWRITE/Moderation/kick.js b/TO REWRITE/Moderation/kick.js deleted file mode 100644 index c2fbee21..00000000 --- a/TO REWRITE/Moderation/kick.js +++ /dev/null @@ -1,100 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"); - -class Kick extends Command { - constructor(client) { - super(client, { - name: "kick", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["k"], - memberPermissions: ["KICK_MEMBERS"], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "KICK_MEMBERS"], - nsfw: false, - ownerOnly: false, - cooldown: 1000 - }); - } - - async run(message, args, data) { - const member = await this.client.resolveMember(args[0], message.guild); - if (!member) return message.error("moderation/kick:MISSING_MEMBER"); - - if (member.id === message.author.id) return message.error("moderation/kick:YOURSELF"); - - const memberData = await this.client.findOrCreateMember({ - id: member.id, - guildID: message.guild.id - }); - - // Gets the kcik reason - let reason = args.slice(1).join(" "); - if (!reason) reason = message.translate("misc:NO_REASON_PROVIDED"); - - const memberPosition = member.roles.highest.position; - const moderationPosition = message.member.roles.highest.position; - if (message.member.ownerId !== message.author.id && !(moderationPosition > memberPosition)) return message.error("moderation/ban:SUPERIOR"); - if (!member.kickable) return message.error("moderation/kick:MISSING_PERM"); - - await member.send({ - content: message.translate("moderation/kick:KICKED_DM", { - username: member.user.tag, - server: message.guild.name, - moderator: message.author.tag, - reason - }) - }); - - // Kick the user - member.kick(reason).then(() => { - // Send a success message in the current channel - message.reply({ - content: message.translate("moderation/kick:KICKED", { - username: member.user.tag, - server: message.guild.name, - moderator: message.author.tag, - reason - }) - }); - - data.guild.casesCount++; - data.guild.save(); - - const caseInfo = { - channel: message.channel.id, - moderator: message.author.id, - date: Date.now(), - type: "kick", - case: data.guild.casesCount, - reason, - }; - - memberData.sanctions.push(caseInfo); - memberData.save(); - - if (data.guild.plugins.modlogs) { - const channel = message.guild.channels.cache.get(data.guild.plugins.modlogs); - if (!channel) return; - const embed = new Discord.MessageEmbed() - .setAuthor({ - name: message.translate("moderation/kick:CASE", { - count: data.guild.casesCount - }) - }) - .addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) - .addField(message.translate("common:MODERATOR"), `\`${message.author.tag}\` (${message.author.toString()})`, true) - .addField(message.translate("common:REASON"), reason, true) - .setColor("#e88709"); - channel.send({ - embeds: [embed] - }); - } - - }).catch(() => { - return message.error("moderation/kick:MISSING_PERM"); - }); - } -} - -module.exports = Kick; \ No newline at end of file diff --git a/TO REWRITE/Moderation/mute.js b/TO REWRITE/Moderation/mute.js deleted file mode 100644 index 4d07030b..00000000 --- a/TO REWRITE/Moderation/mute.js +++ /dev/null @@ -1,113 +0,0 @@ -const Command = require("../../base/Command"), - Discord = require("discord.js"), - ms = require("ms"); - -class Mute extends Command { - constructor(client) { - super(client, { - name: "mute", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["m"], - memberPermissions: ["MANAGE_MESSAGES"], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "MANAGE_CHANNELS"], - nsfw: false, - ownerOnly: false, - cooldown: 1000 - }); - } - - async run(message, args, data) { - const member = await this.client.resolveMember(args[0], message.guild); - if (!member) return message.error("moderation/mute:MISSING_MEMBER"); - if (member.id === message.author.id) return message.error("moderation/mute:YOURSELF"); - - const memberPosition = member.roles.highest.position; - const moderationPosition = message.member.roles.highest.position; - if (message.member.ownerId !== message.author.id && !(moderationPosition > memberPosition)) return message.error("moderation/ban:SUPERIOR"); - - const memberData = await this.client.findOrCreateMember({ - id: member.id, - guildID: message.guild.id - }); - - const time = args[1]; - if (!time || isNaN(ms(time))) return message.error("misc:INVALID_TIME"); - let reason = args.slice(2).join(" "); - if (!reason) reason = message.translate("misc:NO_REASON_PROVIDED"); - - message.guild.channels.cache.forEach((channel) => { - channel.permissionOverwrites.edit(member.id, { - SEND_MESSAGES: false, - ADD_REACTIONS: false, - CONNECT: false - }).catch(() => {}); - }); - - member.send({ - content: message.translate("moderation/mute:MUTED_DM", { - username: member.user.username, - server: message.guild.name, - moderator: message.author.tag, - time, - reason - }) - }); - - message.success("moderation/mute:MUTED", { - username: member.user.tag, - server: message.guild.name, - moderator: message.author.tag, - time, - reason - }); - - data.guild.casesCount++; - - const caseInfo = { - channel: message.channel.id, - moderator: message.author.id, - date: Date.now(), - type: "mute", - case: data.guild.casesCount, - reason, - time - }; - - memberData.mute.muted = true; - memberData.mute.endDate = Date.now() + ms(time); - memberData.mute.case = data.guild.casesCount; - memberData.sanctions.push(caseInfo); - - memberData.markModified("sanctions"); - memberData.markModified("mute"); - - await memberData.save(); - await data.guild.save(); - - this.client.databaseCache.mutedUsers.set(`${member.id}${message.guild.id}`, memberData); - - if (data.guild.plugins.modlogs) { - const channel = message.guild.channels.cache.get(data.guild.plugins.modlogs); - if (!channel) return; - const embed = new Discord.MessageEmbed() - .setAuthor({ - name: message.translate("moderation/mute:CASE", { - count: data.guild.casesCount - }) - }) - .addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`, true) - .addField(message.translate("common:MODERATOR"), `\`${message.author.tag}\` (${message.author.toString()})`, true) - .addField(message.translate("common:REASON"), reason, true) - .addField(message.translate("common:DURATION"), time, true) - .addField(message.translate("common:EXPIRY"), this.client.printDate(new Date(Date.now() + ms(time))), true) - .setColor("#f44271"); - channel.send({ - embeds: [embed] - }); - } - } -} - -module.exports = Mute; \ No newline at end of file diff --git a/TO REWRITE/Moderation/poll.js b/TO REWRITE/Moderation/poll.js index 070c607e..79edc8f2 100644 --- a/TO REWRITE/Moderation/poll.js +++ b/TO REWRITE/Moderation/poll.js @@ -85,15 +85,20 @@ class Poll extends Command { this.client.emojis.cache.find(e => e.name === error) ]; - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("moderation/poll:TITLE") }) .setColor(data.config.embed.color) - .addField(question, message.translate("moderation/poll:REACT", { - success: emojis[0].toString(), - error: emojis[1].toString() - })); + .addFields([ + { + name: question, + value: message.translate("moderation/poll:REACT", { + success: emojis[0].toString(), + error: emojis[1].toString() + }) + } + ]); message.channel.send({ content: mention, diff --git a/TO REWRITE/Moderation/unmute.js b/TO REWRITE/Moderation/unmute.js deleted file mode 100644 index 6a8fb313..00000000 --- a/TO REWRITE/Moderation/unmute.js +++ /dev/null @@ -1,47 +0,0 @@ -const Command = require("../../base/Command"); - -class Unmute extends Command { - constructor(client) { - super(client, { - name: "unmute", - dirname: __dirname, - enabled: true, - guildOnly: true, - aliases: ["um"], - memberPermissions: ["MANAGE_MESSAGES"], - botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "MANAGE_CHANNELS"], - nsfw: false, - ownerOnly: false, - cooldown: 1000 - }); - } - - async run(message, args) { - const member = await this.client.resolveMember(args[0], message.guild); - if (!member) return message.success("moderation/unmute:MISSING_MEMBER"); - - const memberPosition = member.roles.highest.position; - const moderationPosition = message.member.roles.highest.position; - if (message.member.ownerId !== message.author.id && !(moderationPosition > memberPosition)) return message.error("moderation/ban:SUPERIOR"); - - const memberData = await this.client.findOrCreateMember({ - id: member.id, - guildID: message.guild.id - }); - - if (memberData.mute.muted) { - memberData.mute.endDate = Date.now(); - memberData.markModified("mute"); - memberData.save(); - message.success("moderation/unmute:SUCCESS", { - username: member.user.tag - }); - } else { - message.error("moderation/unmute:NOT_MUTED", { - username: member.user.tag - }); - } - } -} - -module.exports = Unmute; \ No newline at end of file diff --git a/TO REWRITE/Moderation/untimeout.js b/TO REWRITE/Moderation/untimeout.js new file mode 100644 index 00000000..3c0747b9 --- /dev/null +++ b/TO REWRITE/Moderation/untimeout.js @@ -0,0 +1,60 @@ +const Command = require("../../base/Command"); + +class Untimeout extends Command { + constructor(client) { + super(client, { + name: "untimeout", + dirname: __dirname, + enabled: true, + guildOnly: true, + aliases: ["untimeout"], + memberPermissions: ["BAN_MEMBERS"], + botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "BAN_MEMBERS"], + nsfw: false, + ownerOnly: false, + cooldown: 1000 + }); + } + + async run(message, args) { + let user = null; + + if (!args[0]) return message.error("moderation/unban:MISSING_ID"); + + // Check if the arg is an ID or a username + const isId = !isNaN(args[0]); + + if (isId) { + // Try to find a user with that ID + await this.client.users.fetch(args[0]).then((u) => { + // if a user was found + user = u; + }).catch(() => {}); + } else if (!isId) { + const arr = args[0].split("#"); + if (arr.length < 2) { + return message.error("misc:NO_USER_FOUND_ID", { + id: args[0] + }); + } + user = this.client.users.filter((u) => u.username === arr[0]).find((u) => u.discriminator === arr[1]); + } + + if (!user) return message.error("misc:NO_USER_FOUND_ID", { id: args[0] }); + + // check if the user is banned + const banned = await message.guild.bans.fetch(); + if (!banned.some((e) => e.user.id === user.id)) return message.success("moderation/unban:NOT_BANNED", { username: user.tag }); + + // Unban user + message.guild.members.unban(user).catch(() => {}); + + // Send a success message in the current channel + message.success("moderation/unban:UNBANNED", { + username: user.tag, + server: message.guild.name + }); + } +} + +module.exports = Untimeout; \ No newline at end of file diff --git a/TO REWRITE/Moderation/warn.js b/TO REWRITE/Moderation/warn.js index 698978fc..a586d7bf 100644 --- a/TO REWRITE/Moderation/warn.js +++ b/TO REWRITE/Moderation/warn.js @@ -53,10 +53,22 @@ class Warn extends Command { reason }; - const embed = new Discord.MessageEmbed() - .addField(message.translate("common:USER"), `\`${member.user.tag}\` (${member.user.toString()})`) - .addField(message.translate("common:MODERATOR"), `\`${message.author.tag}\` (${message.author.toString()})`) - .addField(message.translate("common:REASON"), reason, true); + const embed = new Discord.EmbedBuilder() + .addFields([ + { + name: message.translate("common:USER"), + value: `\`${member.user.tag}\` (${member.user.toString()})` + }, + { + name: message.translate("common:MODERATOR"), + value: `\`${message.author.tag}\` (${message.author.toString()})` + }, + { + name: message.translate("common:REASON"), + value: reason, + inline: true + } + ]); if (banCount) { if (sanctions >= banCount) { diff --git a/TO REWRITE/Moderation/sanctions.js b/TO REWRITE/Moderation/warns.js similarity index 81% rename from TO REWRITE/Moderation/sanctions.js rename to TO REWRITE/Moderation/warns.js index 794267f3..60d5d19d 100644 --- a/TO REWRITE/Moderation/sanctions.js +++ b/TO REWRITE/Moderation/warns.js @@ -26,12 +26,11 @@ class Warns extends Command { guildID: message.guild.id }); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: user.tag, iconURL: user.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }) @@ -49,7 +48,13 @@ class Warns extends Command { }); } else { memberData.sanctions.forEach((s) => { - embed.addField(s.type + " | #" + s.case, `${message.translate("common:MODERATOR")}: <@${s.moderator}>\n${message.translate("common:REASON")}: ${s.reason}`, true); + embed.addFields([ + { + name: s.type + " | #" + s.case, + value: `${message.translate("common:MODERATOR")}: <@${s.moderator}>\n${message.translate("common:REASON")}: ${s.reason}`, + inline: true + } + ]); }); } message.reply({ diff --git a/TO REWRITE/Music/back.js b/TO REWRITE/Music/back.js index e5fac879..5340b1c5 100644 --- a/TO REWRITE/Music/back.js +++ b/TO REWRITE/Music/back.js @@ -25,7 +25,7 @@ class Back extends Command { if (!queue) return message.error("music/play:NOT_PLAYING"); if (!queue.previousSongs[0]) return message.error("music/back:NO_PREV_SONG"); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("music/back:DESCRIPTION") }) diff --git a/TO REWRITE/Music/clips.js b/TO REWRITE/Music/clips.js index e687a05a..ab7cec01 100644 --- a/TO REWRITE/Music/clips.js +++ b/TO REWRITE/Music/clips.js @@ -28,7 +28,7 @@ class Clips extends Command { clips.push(file.substring(0, file.length - 4)); }); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setTitle(message.translate("music/clips:EMBED_TITLE")) .setDescription(clips.join("\n")) .setColor(data.config.embed.color) diff --git a/TO REWRITE/Music/jump.js b/TO REWRITE/Music/jump.js index 0006e4fa..dbbb5a1a 100644 --- a/TO REWRITE/Music/jump.js +++ b/TO REWRITE/Music/jump.js @@ -26,7 +26,7 @@ class Jump extends Command { if (!queue) return message.error("music/play:NOT_PLAYING"); if (number < 0) return message.error("music/jump:NO_PREV_SONG", { prefix: data.guild.prefix }); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("music/jump:SUCCESS") }) diff --git a/TO REWRITE/Music/np.js b/TO REWRITE/Music/np.js index 08a5d85a..eab34af0 100644 --- a/TO REWRITE/Music/np.js +++ b/TO REWRITE/Music/np.js @@ -1,14 +1,14 @@ const Command = require("../../base/Command"), Discord = require("discord.js"); -class Np extends Command { +class Nowplaying extends Command { constructor(client) { super(client, { - name: "np", + name: "nowplaying", dirname: __dirname, enabled: true, guildOnly: true, - aliases: ["nowplaying"], + aliases: [], memberPermissions: [], botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"], nsfw: false, @@ -39,15 +39,29 @@ class Np extends Command { : message.translate("music/np:DISABLED") }\``; - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("music/queue:TITLE") }) .setThumbnail(track.thumbnail) - .addField(message.translate("music/np:T_TITLE"), `[${track.name}](${track.url})`) - .addField(message.translate("music/np:T_CHANNEL"), track.uploader.name ? track.uploader.name : "Отсутствует") - .addField(message.translate("music/np:T_DURATION"), `${queue.formattedCurrentTime} / ${track.duration > 1 ? track.formattedDuration : message.translate("music/play:LIVE")}`) - .addField(message.translate("music/np:T_CONF"), status(queue)) + .addFields([ + { + name: message.translate("music/np:T_TITLE"), + value: `[${track.name}](${track.url})` + }, + { + name: message.translate("music/np:T_CHANNEL"), + value: track.uploader.name || message.translate("common:UNKNOWN") + }, + { + name: message.translate("music/np:T_DURATION"), + value: `${queue.formattedCurrentTime} / ${track.duration > 1 ? track.formattedDuration : message.translate("music/play:LIVE")}` + }, + { + name: message.translate("music/np:T_CONF"), + value: status(queue) + } + ]) .setColor(data.config.embed.color) .setFooter({ text: data.config.embed.footer @@ -60,4 +74,4 @@ class Np extends Command { } } -module.exports = Np; \ No newline at end of file +module.exports = Nowplaying; \ No newline at end of file diff --git a/TO REWRITE/Music/play.js b/TO REWRITE/Music/play.js index 8ae57349..6f0ddb00 100644 --- a/TO REWRITE/Music/play.js +++ b/TO REWRITE/Music/play.js @@ -1,5 +1,5 @@ const Command = require("../../base/Command"), - { Permissions } = require("discord.js"); + { PermissionsBitField } = require("discord.js"); class Play extends Command { constructor(client) { @@ -25,7 +25,7 @@ class Play extends Command { // Check my permissions const perms = voice.permissionsFor(this.client.user); - if (!perms.has(Permissions.FLAGS.CONNECT) || !perms.has(Permissions.FLAGS.SPEAK)) return message.error("music/play:VOICE_CHANNEL_CONNECT"); + if (!perms.has(PermissionsBitField.Flags.Connect) || !perms.has(PermissionsBitField.Flags.Speak)) return message.error("music/play:VOICE_CHANNEL_CONNECT"); try { this.client.player.play(message.member.voice.channel, args.join(" "), { diff --git a/TO REWRITE/Music/queue.js b/TO REWRITE/Music/queue.js index 972f0768..5aac7b8a 100644 --- a/TO REWRITE/Music/queue.js +++ b/TO REWRITE/Music/queue.js @@ -1,6 +1,6 @@ const Command = require("../../base/Command"), Discord = require("discord.js"), - Pagination = require("discord-paginationembed"); + Pagination = require("customizable-discordjs-pagination"); class Queue extends Command { constructor(client) { @@ -26,14 +26,17 @@ class Queue extends Command { if (!queue) return message.error("music/play:NOT_PLAYING"); if (queue.songs.length === 1) { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("music/queue:TITLE"), - iconURL: message.guild.iconURL({ - dynamic: true - }) + iconURL: message.guild.iconURL() }) - .addField(message.translate("music/np:CURRENTLY_PLAYING"), `[${queue.songs[0].name}](${queue.songs[0].url})\n*${message.translate("music/queue:ADDED")} ${queue.songs[0].member}*\n`) + .addFields([ + { + name: message.translate("music/np:CURRENTLY_PLAYING"), + value: `[${queue.songs[0].name}](${queue.songs[0].url})\n*${message.translate("music/queue:ADDED")} ${queue.songs[0].member}*\n` + } + ]) .setColor(data.config.embed.color); return message.reply({ embeds: [embed] @@ -46,11 +49,14 @@ class Queue extends Command { .setColor(data.config.embed.color) .setAuthor({ name: message.translate("music/queue:TITLE"), - iconURL: message.guild.iconURL({ - dynamic: true - }) + iconURL: message.guild.iconURL() }) - .addField(message.translate("music/np:CURRENTLY_PLAYING"), `[${queue.songs[0].name}](${queue.songs[0].url})\n*${message.translate("music/queue:ADDED")} ${queue.songs[0].member}*\n`); + .addFields([ + { + name: message.translate("music/np:CURRENTLY_PLAYING"), + value: `[${queue.songs[0].name}](${queue.songs[0].url})\n*${message.translate("music/queue:ADDED")} ${queue.songs[0].member}*\n` + } + ]); FieldsEmbed .setArray(queue.songs[1] ? queue.songs.slice(1, queue.songs.length) : []) .setAuthorizedUsers([message.author.id]) diff --git a/TO REWRITE/Music/skip.js b/TO REWRITE/Music/skip.js index ff403bc5..4afd4b1e 100644 --- a/TO REWRITE/Music/skip.js +++ b/TO REWRITE/Music/skip.js @@ -25,7 +25,7 @@ class Skip extends Command { if (!queue) return message.error("music/play:NOT_PLAYING"); if (!queue.songs[1]) return message.error("music/skip:NO_NEXT_SONG"); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("music/skip:SUCCESS") }) diff --git a/TO REWRITE/Music/stop.js b/TO REWRITE/Music/stop.js index 6607bf89..d312d8cf 100644 --- a/TO REWRITE/Music/stop.js +++ b/TO REWRITE/Music/stop.js @@ -24,7 +24,7 @@ class Stop extends Command { if (!voice) return message.error("music/play:NO_VOICE_CHANNEL"); if (!queue) return message.error("music/play:NOT_PLAYING"); - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: message.translate("music/stop:DESCRIPTION") }) diff --git a/base/BaseCommand.js b/base/BaseCommand.js index 03d8df3d..1bfc0513 100644 --- a/base/BaseCommand.js +++ b/base/BaseCommand.js @@ -4,7 +4,7 @@ const path = require("path"); class BaseCommand { constructor(options, client) { /** - * @type {import("@discordjs/builders").SlashCommandBuilder | import("discord.js").ApplicationCommandData} + * @type {import("discord.js").SlashCommandBuilder | import("discord.js").ApplicationCommandData} */ this.command = options.command; /** diff --git a/base/JaBa.js b/base/JaBa.js index fb025bba..7212b7f1 100644 --- a/base/JaBa.js +++ b/base/JaBa.js @@ -1,14 +1,13 @@ -const { MessageEmbed, Client, Collection } = require("discord.js"), +const { EmbedBuilder, Client, Collection } = require("discord.js"), { GiveawaysManager } = require("discord-giveaways"), { SoundCloudPlugin } = require("@distube/soundcloud"), { SpotifyPlugin } = require("@distube/spotify"), { YtDlpPlugin } = require("@distube/yt-dlp"), - { SlashCommandBuilder } = require("@discordjs/builders"), + { SlashCommandBuilder } = require("discord.js"), { REST } = require("@discordjs/rest"), - { Routes } = require("discord-api-types/v9"); + { Routes } = require("discord-api-types/v10"); -const util = require("util"), - BaseEvent = require("./BaseEvent.js"), +const BaseEvent = require("./BaseEvent.js"), BaseCommand = require("./BaseCommand.js"), AmeClient = require("amethyste-api"), path = require("path"), @@ -33,7 +32,7 @@ class JaBa extends Client { this.languages = require("../languages/language-meta"); // Load the bot's languages this.commands = new Collection(); // Creates new commands collection this.logger = require("../helpers/logger"); // Load the logger file - this.wait = util.promisify(setTimeout); // client.wait(1000) - Wait 1 second + this.wait = require("node:timers/promises").setTimeout; // client.wait(1000) - Wait 1 second this.functions = require("../helpers/functions"); // Load the functions file this.guildsData = require("../base/Guild"); // Guild mongoose model this.usersData = require("../base/User"); // User mongoose model @@ -59,7 +58,7 @@ class JaBa extends Client { new SoundCloudPlugin(), new YtDlpPlugin() ], - youtubeDL: false, + directLink: true, emitNewSongOnly: true, leaveOnEmpty: true, leaveOnFinish: true, @@ -88,7 +87,7 @@ class JaBa extends Client { .on("addList", (queue, playlist) => queue.textChannel.send({ content: this.translate("music/play:ADDED_QUEUE_COUNT", { songCount: `**${playlist.songs.length}** ${this.getNoun(playlist.songs.length, this.translate("misc:NOUNS:TRACKS:1"), this.translate("misc:NOUNS:TRACKS:1"), this.translate("misc:NOUNS:TRACKS:2"), this.translate("misc:NOUNS:TRACKS:5"))}` }, queue.textChannel.guild.data.language) })) .on("searchResult", (message, result) => { let i = 0; - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setDescription(result.map(song => `**${++i} -** ${song.name}`).join("\n")) .setFooter({ text: this.translate("music/play:RESULTS_FOOTER", null, message.guild.data.language) }) .setColor(this.config.embed.color); @@ -126,7 +125,7 @@ class JaBa extends Client { async loadCommands(dir) { const filePath = path.join(__dirname, dir); var folders = await fs.readdir(filePath); folders = folders.map(file => path.join(filePath, file)).filter(async (path) => { path = await fs.lstat(path); path.isDirectory(); }); - const rest = new REST({ version: "9" }).setToken(this.config.token); + const rest = new REST().setToken(this.config.token); const commands = []; for (let index = 0; index < folders.length; index++) { const folder = folders[index]; diff --git a/commands/Fun/8ball.js b/commands/Fun/8ball.js new file mode 100644 index 00000000..a996b944 --- /dev/null +++ b/commands/Fun/8ball.js @@ -0,0 +1,53 @@ +const { SlashCommandBuilder } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"); + +class Eightball extends BaseCommand { + /** + * + * @param {import("../base/JaBa")} client + */ + constructor(client) { + super({ + command: new SlashCommandBuilder() + .setName("8ball") + .setDescription(client.translate("fun/8ball:DESCRIPTION")) + .addStringOption(option => + option.setName("question") + .setDescription(client.translate("fun/8ball:QUESTION")) + .setRequired(true)), + aliases: [], + dirname: __dirname, + guildOnly: true, + ownerOnly: false + }); + } + /** + * + * @param {import("../../base/JaBa")} client + */ + async onLoad() { + //... + } + /** + * + * @param {import("../../base/JaBa")} client + * @param {import("discord.js").CommandInteraction} interaction + * @param {Array} data + */ + async execute(client, interaction) { + await interaction.deferReply(); + const question = interaction.options.getString("question"); + + if (!question.endsWith("?")) return interaction.replyT("fun/8ball:ERR_QUESTION", null, { ephemeral: true }); + + const answerN = client.functions.randomNum(1, 20); + const answer = interaction.translate(`fun/8ball:RESPONSE_${answerN}`); + await client.wait(2000); + + interaction.editReply({ + content: answer + }); + } +} + +module.exports = Eightball; \ No newline at end of file diff --git a/commands/Fun/lmgtfy.js b/commands/Fun/lmgtfy.js new file mode 100644 index 00000000..742ac26b --- /dev/null +++ b/commands/Fun/lmgtfy.js @@ -0,0 +1,47 @@ +const { SlashCommandBuilder } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"); + +class LMGTFY extends BaseCommand { + /** + * + * @param {import("../base/JaBa")} client + */ + constructor(client) { + super({ + command: new SlashCommandBuilder() + .setName("lmgtfy") + .setDescription(client.translate("fun/lmgtfy:DESCRIPTION")) + .addStringOption(option => + option.setName("question") + .setDescription(client.translate("fun/8ball:QUESTION")) + .setRequired(true)), + aliases: [], + dirname: __dirname, + guildOnly: true, + ownerOnly: false + }); + } + /** + * + * @param {import("../../base/JaBa")} client + */ + async onLoad() { + //... + } + /** + * + * @param {import("../../base/JaBa")} client + * @param {import("discord.js").CommandInteraction} interaction + * @param {Array} data + */ + async execute(client, interaction) { + const question = interaction.options.getString("question").replace(/[' '_]/g, "+"); + + interaction.reply({ + content: ``, + ephemeral: true + }); + } +} + +module.exports = LMGTFY; \ No newline at end of file diff --git a/commands/Fun/lovecalc.js b/commands/Fun/lovecalc.js new file mode 100644 index 00000000..65d3f626 --- /dev/null +++ b/commands/Fun/lovecalc.js @@ -0,0 +1,74 @@ +const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"), + md5 = require("md5"); + +class Lovecalc extends BaseCommand { + /** + * + * @param {import("../base/JaBa")} client + */ + constructor(client) { + super({ + command: new SlashCommandBuilder() + .setName("lovecalc") + .setDescription(client.translate("fun/lovecalc:DESCRIPTION")) + .addUserOption(option => + option.setName("first_member") + .setDescription(client.translate("common:USER")) + .setRequired(true)) + .addUserOption(option => + option.setName("second_member") + .setDescription(client.translate("common:USER"))), + aliases: [], + dirname: __dirname, + guildOnly: true, + ownerOnly: false + }); + } + /** + * + * @param {import("../../base/JaBa")} client + */ + async onLoad() { + //... + } + /** + * + * @param {import("../../base/JaBa")} client + * @param {import("discord.js").CommandInteraction} interaction + * @param {Array} data + */ + async execute(client, interaction) { + const firstMember = interaction.options.getMember("first_member"); + const secondMember = interaction.options.getMember("second_member") || interaction.user; + + const members = [firstMember, secondMember].sort((a, b) => parseInt(a.id, 10) - parseInt(b.id, 10)); + const hash = md5(`${members[0].id}${members[1].user.username}${members[0].user.username}${members[1].id}`); + + const string = hash + .split("") + .filter(e => !isNaN(e)) + .join(""); + const percent = parseInt(string.substr(0, 2), 10); + + const embed = new EmbedBuilder() + .setAuthor({ + name: `❤️ ${interaction.translate("fun/lovecalc:DESCRIPTION")}` + }) + .setDescription(interaction.translate("fun/lovecalc:CONTENT", { + percent, + firstMember: firstMember, + secondMember: secondMember + })) + .setColor(client.config.embed.color) + .setFooter({ + text: client.config.embed.footer + }); + + interaction.reply({ + embeds: [embed] + }); + } +} + +module.exports = Lovecalc; \ No newline at end of file diff --git a/commands/Fun/memes.js b/commands/Fun/memes.js new file mode 100644 index 00000000..ea635ec8 --- /dev/null +++ b/commands/Fun/memes.js @@ -0,0 +1,81 @@ +const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, SelectMenuBuilder, InteractionCollector } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"), + fetch = require("node-fetch"); + +class Memes extends BaseCommand { + /** + * + * @param {import("../base/JaBa")} client + */ + constructor(client) { + super({ + command: new SlashCommandBuilder() + .setName("memes") + .setDescription(client.translate("fun/memes:DESCRIPTION")), + aliases: [], + dirname: __dirname, + guildOnly: true, + ownerOnly: false + }); + } + /** + * + * @param {import("../../base/JaBa")} client + */ + async onLoad() { + //... + } + /** + * + * @param {import("../../base/JaBa")} client + * @param {import("discord.js").CommandInteraction} interaction + * @param {Array} data + */ + async execute(client, interaction) { + const tags = ["memes", "dankmemes", "me_irl", "wholesomememes"].map(tag => + JSON.parse(JSON.stringify({ + label: tag, + value: tag + })) + ); + + const row = new ActionRowBuilder() + .addComponents( + new SelectMenuBuilder() + .setCustomId("memes_select") + .setPlaceholder(client.translate("common:NOTHING_SELECTED")) + .addOptions(tags) + ); + + const msg = await interaction.reply({ + content: interaction.translate("common:AVAILABLE_CATEGORIES"), + components: [row], + fetchReply: true + }); + + const collector = new InteractionCollector(client, { + message: msg, + idle: 60 * 1000 + }); + + collector.on("collect", async (msg) => { + const tag = msg?.values[0]; + const res = await fetch(`https://meme-api.herokuapp.com/gimme/${tag}`).then(response => response.json()); + + const embed = new EmbedBuilder() + .setColor(client.config.embed.color) + .setFooter({ + text: client.config.embed.footer + }) + .setTitle(`${res.title}\n${interaction.translate("fun/memes:SUBREDDIT")}: ${res.subreddit}\n${interaction.translate("common:AUTHOR")}: ${res.author}\n${interaction.translate("fun/memes:UPS")}: ${res.ups}`) + .setImage(res.url) + .setTimestamp(); + + msg.update({ + embeds: [embed] + }); + }); + } +} + +module.exports = Memes; \ No newline at end of file diff --git a/commands/General/ping.js b/commands/General/ping.js index 470d6fd7..778f16c5 100644 --- a/commands/General/ping.js +++ b/commands/General/ping.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder } = require("@discordjs/builders"); +const { SlashCommandBuilder } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Ping extends BaseCommand { diff --git a/commands/NSFW/nsfw.js b/commands/NSFW/nsfw.js index 2191d2ec..7fed0963 100644 --- a/commands/NSFW/nsfw.js +++ b/commands/NSFW/nsfw.js @@ -1,6 +1,4 @@ - -const { SlashCommandBuilder } = require("@discordjs/builders"), - { MessageEmbed, MessageActionRow, MessageSelectMenu, InteractionCollector } = require("discord.js"); +const { SlashCommandBuilder, EmbedBuilder, ActionRowBuilder, SelectMenuBuilder, InteractionCollector } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"), fetch = require("node-fetch"); @@ -39,35 +37,35 @@ class NSFW extends BaseCommand { const tags = ["hentai", "ecchi", "lewdanimegirls", "hentaifemdom", "animefeets", "animebooty", "biganimetiddies", "sideoppai", "ahegao"].map(tag => JSON.parse(JSON.stringify({ label: tag, - description: "", value: tag })) ); - const row = new MessageActionRow() + const row = new ActionRowBuilder() .addComponents( - new MessageSelectMenu() + new SelectMenuBuilder() .setCustomId("nsfw_select") - .setPlaceholder(client.translate("nsfw/nsfw:NOTHING_SELECTED")) + .setPlaceholder(client.translate("common:NOTHING_SELECTED")) .addOptions(tags) ); const msg = await interaction.reply({ - content: interaction.translate("nsfw/nsfw:AVAILABLE_CATEGORIES"), + content: interaction.translate("common:AVAILABLE_CATEGORIES"), ephemeral: true, - components: [row] + components: [row], + fetchReply: true }); const collector = new InteractionCollector(client, { message: msg, - time: 60 * 1000 + idle: 60 * 1000 }); collector.on("collect", async (msg) => { const tag = msg?.values[0]; const res = await fetch(`https://meme-api.herokuapp.com/gimme/${tag}`).then(response => response.json()); - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setColor(client.config.embed.color) .setFooter({ text: client.config.embed.footer diff --git a/commands/Owner/debug.js b/commands/Owner/debug.js index 4cdc1085..4b9ef9e7 100644 --- a/commands/Owner/debug.js +++ b/commands/Owner/debug.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder } = require("@discordjs/builders"); +const { SlashCommandBuilder } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Debug extends BaseCommand { diff --git a/commands/Owner/eval.js b/commands/Owner/eval.js index 0e1ff34b..d219584b 100644 --- a/commands/Owner/eval.js +++ b/commands/Owner/eval.js @@ -1,5 +1,5 @@ /* eslint-disable no-unused-vars */ -const { SlashCommandBuilder } = require("@discordjs/builders"); +const { SlashCommandBuilder } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Eval extends BaseCommand { @@ -14,7 +14,7 @@ class Eval extends BaseCommand { .setDescription(client.translate("owner/eval:DESCRIPTION")) .addStringOption(option => option.setName("code") - .setDescription(client.translate("owner/eval:USAGE")) + .setDescription(client.translate("owner/eval:CODE")) .setRequired(true)), aliases: [], dirname: __dirname, diff --git a/commands/Owner/reload.js b/commands/Owner/reload.js index 10e48a3c..c04aa4c4 100644 --- a/commands/Owner/reload.js +++ b/commands/Owner/reload.js @@ -1,5 +1,5 @@ -const { SlashCommandBuilder } = require("@discordjs/builders"), - BaseCommand = require("../../base/BaseCommand"), +const { SlashCommandBuilder } = require("discord.js"); +const BaseCommand = require("../../base/BaseCommand"), i18next = require("i18next"), autoUpdateDocs = require("../../helpers/autoUpdateDocs"); @@ -15,7 +15,7 @@ class Reload extends BaseCommand { .setDescription(client.translate("owner/reload:DESCRIPTION")) .addStringOption(option => option.setName("command") - .setDescription(client.translate("owner/reload:USAGE")) + .setDescription(client.translate("owner/reload:COMMAND")) .setRequired(true)), aliases: [], dirname: __dirname, diff --git a/commands/Owner/say.js b/commands/Owner/say.js index e13243bf..536e8399 100644 --- a/commands/Owner/say.js +++ b/commands/Owner/say.js @@ -1,4 +1,4 @@ -const { SlashCommandBuilder } = require("@discordjs/builders"); +const { SlashCommandBuilder } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Say extends BaseCommand { @@ -38,7 +38,7 @@ class Say extends BaseCommand { * @param {Array} data */ async execute(client, interaction) { - interaction.deferReply({ ephemeral: true }); + await interaction.deferReply({ ephemeral: true }); const message = interaction.options.getString("message"); const channel = interaction.options.getChannel("channel"); diff --git a/commands/Owner/servers.js b/commands/Owner/servers.js index 7039000d..26b52970 100644 --- a/commands/Owner/servers.js +++ b/commands/Owner/servers.js @@ -1,5 +1,4 @@ -const { SlashCommandBuilder } = require("@discordjs/builders"), - { MessageEmbed } = require("discord.js"); +const { SlashCommandBuilder, EmbedBuilder } = require("discord.js"); const BaseCommand = require("../../base/BaseCommand"); class Servers extends BaseCommand { @@ -44,12 +43,11 @@ class Servers extends BaseCommand { .slice(0, 10) .join("\n"); - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setAuthor({ name: interaction.user.tag, iconURL: interaction.user.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }) diff --git a/dashboard/routes/discord.js b/dashboard/routes/discord.js index c8d3c344..3d5f606d 100644 --- a/dashboard/routes/discord.js +++ b/dashboard/routes/discord.js @@ -80,7 +80,7 @@ router.get("/callback", async (req, res) => { const userDB = await req.client.findOrCreateUser(req.session.user.id); const logsChannel = req.client.channels.cache.get(req.client.config.dashboard.logs); if (!userDB.logged && logsChannel && user) { - const embed = new Discord.MessageEmbed() + const embed = new Discord.EmbedBuilder() .setAuthor({ name: user.username, iconURL: user.displayAvatarURL() }) .setColor(req.client.config.embed.color) .setDescription(req.client.translate("dashboard:FIRST_LOGIN", { user: user.tag })); diff --git a/dashboard/utils.js b/dashboard/utils.js index 12a75c73..e89d8922 100644 --- a/dashboard/utils.js +++ b/dashboard/utils.js @@ -1,4 +1,4 @@ -const { Permissions } = require("discord.js"); +const { PermissionsBitField } = require("discord.js"); /** * Fetch user informations (stats, guilds, etc...) @@ -12,8 +12,8 @@ async function fetchUser(userData, client, query) { userData.guilds.forEach((guild) => { if (!client.guilds.cache.get(guild.id)) return; // eslint-disable-next-line no-undef - const perms = new Permissions(BigInt(guild.permissions)); - if (perms.has(Permissions.FLAGS.MANAGE_GUILD)) guild.admin = true; + const perms = new PermissionsBitField(BigInt(guild.permissions)); + if (perms.has(PermissionsBitField.Flags.ManageGuild)) guild.admin = true; guild.settingsUrl = (client.guilds.cache.get(guild.id) ? `/manage/${guild.id}/` : `https://discordapp.com/oauth2/authorize?client_id=${client.user.id}&scope=bot&permissions=8&guild_id=${guild.id}`); guild.statsUrl = (client.guilds.cache.get(guild.id) ? `/stats/${guild.id}/` : `https://discordapp.com/oauth2/authorize?client_id=${client.user.id}&scope=bot&permissions=8&guild_id=${guild.id}`); diff --git a/events/CommandHandler.js b/events/CommandHandler.js index fc41f735..21daf30c 100644 --- a/events/CommandHandler.js +++ b/events/CommandHandler.js @@ -1,4 +1,5 @@ const BaseEvent = require("../base/BaseEvent"); +const { InteractionType } = require("discord.js"); class CommandHandler extends BaseEvent { constructor() { @@ -14,7 +15,7 @@ class CommandHandler extends BaseEvent { * @param {import("discord.js").Interaction} interaction */ async execute(client, interaction) { - if (interaction.type !== "APPLICATION_COMMAND" && !interaction.isCommand()) return; + if (interaction.type !== InteractionType.ApplicationCommand && !interaction.isCommand()) return; const command = client.commands.get(interaction.commandName); const data = []; diff --git a/events/Guild/guildCreate.js b/events/Guild/guildCreate.js index 5f8b33f9..d112575a 100644 --- a/events/Guild/guildCreate.js +++ b/events/Guild/guildCreate.js @@ -1,4 +1,4 @@ -const { MessageEmbed } = require("discord.js"), +const { EmbedBuilder } = require("discord.js"), BaseEvent = require("../../base/BaseEvent"); class GuildCreate extends BaseEvent { @@ -31,7 +31,7 @@ class GuildCreate extends BaseEvent { await userData.save(); } - const thanksEmbed = new MessageEmbed() + const thanksEmbed = new EmbedBuilder() .setAuthor({ name: "Спасибо что добавили меня на свой сервер!" }) @@ -49,12 +49,10 @@ class GuildCreate extends BaseEvent { const users = guild.members.cache.filter((m) => !m.user.bot).size; const bots = guild.members.cache.filter((m) => m.user.bot).size; - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setAuthor({ name: guild.name, - iconURL: guild.iconURL({ - dynamic: true - }) + iconURL: guild.iconURL() }) .setColor("#32CD32") .setDescription(`Зашёл на сервер **${guild.name}**. На нём **${users}** ${this.client.getNoun(users, this.client.translate("misc:NOUNS:USERS:1"), this.client.translate("misc:NOUNS:USERS:2"), this.client.translate("misc:NOUNS:USERS:5"))} (из них **${bots}** ${this.client.getNoun(bots, this.client.translate("misc:NOUNS:BOTS:1"), this.client.translate("misc:NOUNS:BOTS:2"), this.client.translate("misc:NOUNS:BOTS:5"))})`); diff --git a/events/Guild/guildDelete.js b/events/Guild/guildDelete.js index 1cca1466..13ff80bd 100644 --- a/events/Guild/guildDelete.js +++ b/events/Guild/guildDelete.js @@ -1,4 +1,4 @@ -const { MessageEmbed } = require("discord.js"), +const { EmbedBuilder } = require("discord.js"), BaseEvent = require("../../base/BaseEvent"); class GuildDelete extends BaseEvent { @@ -13,12 +13,10 @@ class GuildDelete extends BaseEvent { * @param {import("discord.js").Guild} guild */ async execute(guild) { - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setAuthor({ name: guild.name, - iconURL: guild.iconURL({ - dynamic: true - }) + iconURL: guild.iconURL() }) .setColor("#B22222") .setDescription(`Вышел с сервера **${guild.name}**.`); diff --git a/events/Guild/guildMemberAdd.js b/events/Guild/guildMemberAdd.js index a227de96..d257cd3e 100644 --- a/events/Guild/guildMemberAdd.js +++ b/events/Guild/guildMemberAdd.js @@ -1,6 +1,6 @@ const Canvas = require("canvas"), BaseEvent = require("../../base/BaseEvent"), - { MessageAttachment } = require("discord.js"), + { AttachmentBuilder } = require("discord.js"), { resolve } = require("path"); // Register assets fonts @@ -139,7 +139,7 @@ class GuildMemberAdd extends BaseEvent { })); ctx.drawImage(avatar, 45, 90, 270, 270); - const attachment = new MessageAttachment(canvas.toBuffer(), "welcome-image.png"); + const attachment = new AttachmentBuilder(canvas.toBuffer(), { name: "welcome-image.png" }); channel.send({ content: message, files: [attachment] diff --git a/events/Guild/guildMemberRemove.js b/events/Guild/guildMemberRemove.js index 45eae983..e0b3427b 100644 --- a/events/Guild/guildMemberRemove.js +++ b/events/Guild/guildMemberRemove.js @@ -1,6 +1,6 @@ const Canvas = require("canvas"), BaseEvent = require("../../base/BaseEvent"), - { MessageAttachment } = require("discord.js"), + { AttachmentBuilder } = require("discord.js"), { resolve } = require("path"); // Register assets fonts @@ -122,7 +122,7 @@ class GuildMemberRemove extends BaseEvent { })); ctx.drawImage(avatar, 45, 90, 270, 270); - const attachment = new MessageAttachment(canvas.toBuffer(), "goodbye-image.png"); + const attachment = new AttachmentBuilder(canvas.toBuffer(), { name: "goodbye-image.png" }); channel.send({ content: message, files: [attachment] diff --git a/events/messageCreate.js b/events/messageCreate.js index e4b709c9..d2bbc708 100644 --- a/events/messageCreate.js +++ b/events/messageCreate.js @@ -1,4 +1,4 @@ -const { Permissions } = require("discord.js"), +const { PermissionsBitField } = require("discord.js"), xpCooldown = {}, BaseEvent = require("../base/BaseEvent"); @@ -54,7 +54,7 @@ class MessageCreate extends BaseEvent { if (data.guild.plugins.automod.enabled && !data.guild.plugins.automod.ignored.includes(message.channel.id)) { if (/(discord\.(gg|io|me|li)\/.+|discordapp\.com\/invite\/.+)/i.test(message.content)) { - if (!message.channel.permissionsFor(message.member).has(Permissions.FLAGS.MANAGE_MESSAGES)) { + if (!message.channel.permissionsFor(message.member).has(PermissionsBitField.Flags.ManageMessages)) { message.delete(); message.author.send("```" + message.content + "```"); return message.error("administration/automod:DELETED", { diff --git a/events/ready.js b/events/ready.js index 754d4b97..2e767ced 100644 --- a/events/ready.js +++ b/events/ready.js @@ -1,5 +1,5 @@ const BaseEvent = require("../base/BaseEvent"), - { Permissions } = require("discord.js"); + { PermissionsBitField } = require("discord.js"); class Ready extends BaseEvent { constructor() { @@ -21,7 +21,7 @@ class Ready extends BaseEvent { // Logs some informations using logger client.logger.log(`Loaded a total of ${commands.length} command(s).`, "ready"); client.logger.log(`${client.user.tag}, ready to serve ${tUsers} users in ${tServers} servers.`, "ready"); - client.logger.log(`Invite Link: ${client.generateInvite({ scopes: ["bot", "applications.commands"] , permissions: [Permissions.FLAGS.ADMINISTRATOR] })}`, "ready"); + client.logger.log(`Invite Link: ${client.generateInvite({ scopes: ["bot", "applications.commands"] , permissions: [ PermissionsBitField.Flags.Administrator ] })}`, "ready"); // Discord Together const discordtogether = require("../helpers/discordTogether"); @@ -56,7 +56,6 @@ class Ready extends BaseEvent { ]; let i = 0; - setTimeout setInterval(async function () { hiddenGuild = await client.guilds.fetch("568120814776614924"); tUsers = client.users.cache.size - hiddenGuild.memberCount; diff --git a/helpers/birthdays.js b/helpers/birthdays.js index 69a95685..0e288e78 100644 --- a/helpers/birthdays.js +++ b/helpers/birthdays.js @@ -1,5 +1,5 @@ const { CronJob } = require("cron"), - { MessageEmbed } = require("discord.js"); + { EmbedBuilder } = require("discord.js"); module.exports.init = async function (client) { new CronJob("0 5 * * *", async function () { @@ -26,12 +26,11 @@ module.exports.init = async function (client) { const age = currentYear - year; if (currentMonth === month && currentDay === day) { - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setAuthor({ name: client.user.username, iconURL: client.user.displayAvatarURL({ size: 512, - dynamic: true, format: "png" }) }) @@ -39,11 +38,16 @@ module.exports.init = async function (client) { .setFooter({ text: client.config.embed.footer }) - .addField(client.translate("economy/birthdate:HAPPY_BIRTHDAY"), client.translate("economy/birthdate:HAPPY_BIRTHDAY_MESSAGE", { - name: user.username, - user: user.id, - age: `**${age}** ${client.getNoun(age, client.translate("misc:NOUNS:AGE:1"), client.translate("misc:NOUNS:AGE:2"), client.translate("misc:NOUNS:AGE:5"))}` - })); + .addFields([ + { + name: client.translate("economy/birthdate:HAPPY_BIRTHDAY"), + value: client.translate("economy/birthdate:HAPPY_BIRTHDAY_MESSAGE", { + name: user.username, + user: user.id, + age: `**${age}** ${client.getNoun(age, client.translate("misc:NOUNS:AGE:1"), client.translate("misc:NOUNS:AGE:2"), client.translate("misc:NOUNS:AGE:5"))}` + }) + } + ]); const msg = await channel.send({ embeds: [embed] }); diff --git a/helpers/checkReminds.js b/helpers/checkReminds.js index bdc111a7..34f3743c 100644 --- a/helpers/checkReminds.js +++ b/helpers/checkReminds.js @@ -1,4 +1,4 @@ -const { MessageEmbed } = require("discord.js"); +const { EmbedBuilder } = require("discord.js"); module.exports.init = function (client) { client.usersData @@ -18,14 +18,22 @@ module.exports.init = function (client) { const mustSent = reminds.filter((r) => r.sendAt < dateNow); if (mustSent.length > 0) { mustSent.forEach((r) => { - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setAuthor({ name: client.translate("general/remindme:TITLE") }) - .addField(client.translate("common:CREATION"), client.translate("general/remindme:CREATED", { - time: client.convertTime(r.createdAt, "from") - })) - .addField(client.translate("common:MESSAGE"), r.message) + .addFields([ + { + name: client.translate("common:CREATION"), + value: client.translate("general/remindme:CREATED", { + time: client.convertTime(r.createdAt, "from") + }) + }, + { + name: client.translate("common:MESSAGE"), + value: r.message + } + ]) .setColor(client.config.embed.color) .setFooter({ text: client.config.embed.footer diff --git a/helpers/checkUnmutes.js b/helpers/checkUnmutes.js index 9fac0be0..ff48d52a 100644 --- a/helpers/checkUnmutes.js +++ b/helpers/checkUnmutes.js @@ -1,4 +1,4 @@ -const { MessageEmbed } = require("discord.js"); +const { EmbedBuilder } = require("discord.js"); module.exports.init = async function (client) { client.membersData @@ -33,7 +33,7 @@ module.exports.init = async function (client) { }); } const user = member ? member.user : await client.users.fetch(memberData.id); - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setDescription(guild.translate("moderation/unmute:SUCCESS_CASE", { user: user.toString(), usertag: user.tag, diff --git a/helpers/extenders.js b/helpers/extenders.js index 8e061c84..73bfcb2f 100644 --- a/helpers/extenders.js +++ b/helpers/extenders.js @@ -1,4 +1,31 @@ -const { Message, Interaction } = require("discord.js"); +const { Message, CommandInteraction } = require("discord.js"); + +CommandInteraction.prototype.translate = function (key, args) { + const language = this.client.translations.get(this.guild ? this.guild.data.language : "ru-RU"); + if (!language) throw "Message: Invalid language set in data."; + + return language(key, args); +}; + +CommandInteraction.prototype.replyT = function (key, args, options = {}) { + let string = this.translate(key, args, this.guild ? this.guild.data.language : "ru-RU"); + if (options.prefixEmoji) string = `${this.client.customEmojis[options.prefixEmoji]} | ${string}`; + + if (options.edit) return this.editReply({ content: string, ephemeral: options.ephemeral || false }); + else return this.reply({ content: string, ephemeral: options.ephemeral || false }); +}; + +CommandInteraction.prototype.error = function (key, args, options = {}) { + options.prefixEmoji = "error"; + + return this.replyT(key, args, options); +}; + +CommandInteraction.prototype.success = function (key, args, options = {}) { + options.prefixEmoji = "success"; + + return this.replyT(key, args, options); +}; Message.prototype.translate = function (key, args) { const language = this.client.translations.get(this.guild ? this.guild.data.language : "ru-RU"); @@ -24,32 +51,5 @@ Message.prototype.error = function (key, args, options = {}) { Message.prototype.success = function (key, args, options = {}) { options.prefixEmoji = "success"; - return this.replyT(key, args, options); -}; - -Interaction.prototype.translate = function (key, args) { - const language = this.client.translations.get(this.guild ? this.guild.data.language : "ru-RU"); - if (!language) throw "Message: Invalid language set in data."; - - return language(key, args); -}; - -Interaction.prototype.replyT = function (key, args, options = {}) { - let string = this.translate(key, args, this.guild ? this.guild.data.language : "ru-RU"); - if (options.prefixEmoji) string = `${this.client.customEmojis[options.prefixEmoji]} | ${string}`; - - if (options.edit) return this.editReply({ content: string, ephemeral: options.ephemeral || false }); - else return this.reply({ content: string, ephemeral: options.ephemeral || false }); -}; - -Interaction.prototype.error = function (key, args, options = {}) { - options.prefixEmoji = "error"; - - return this.replyT(key, args, options); -}; - -Interaction.prototype.success = function (key, args, options = {}) { - options.prefixEmoji = "success"; - return this.replyT(key, args, options); }; \ No newline at end of file diff --git a/helpers/functions.js b/helpers/functions.js index 54717c05..738d328f 100644 --- a/helpers/functions.js +++ b/helpers/functions.js @@ -1,4 +1,4 @@ -const { Permissions } = require("discord.js"), +const { PermissionsBitField } = require("discord.js"), langs = require("../languages/language-meta.json").map((l) => l.moment).filter((l) => l !== "en"); langs.forEach((lang) => { require(`moment/locale/${lang}.js`); @@ -7,8 +7,8 @@ langs.forEach((lang) => { module.exports = { async createInvite(client, guildId) { const guild = client.guilds.cache.get(guildId); - const member = guild.me; - const channel = guild.channels.cache.find((ch) => ch.permissionsFor(member.id).has(Permissions.FLAGS.CREATE_INSTANT_INVITE) && ch.type === "GUILD_TEXT" || ch.type === "GUILD_VOICE"); + const member = guild.members.me; + const channel = guild.channels.cache.find((ch) => ch.permissionsFor(member.id).has(PermissionsBitField.Flags.CreateInstantInvite) && ch.type === "GUILD_TEXT" || ch.type === "GUILD_VOICE"); if (channel) { const invite = await channel.createInvite(); diff --git a/helpers/tictactoe.js b/helpers/tictactoe.js index 92ac9f1a..44b80f5d 100644 --- a/helpers/tictactoe.js +++ b/helpers/tictactoe.js @@ -1,6 +1,6 @@ // Thanks to simply-djs for this =) -const { MessageEmbed, MessageButton, MessageActionRow } = require("discord.js"); +const { EmbedBuilder, ButtonBuilder, ActionRowBuilder, ButtonStyle } = require("discord.js"); /** * @param {require("discord.js").Message} message @@ -66,7 +66,7 @@ async function tictactoe(interaction, options = {}) { const foot = options.embedFoot ? { text: options.embedFoot } : { text: "Удачи =)" }; - const acceptEmbed = new MessageEmbed() + const acceptEmbed = new EmbedBuilder() .setTitle(interaction.translate("economy/tictactoe:REQUEST_WAIT", { user: opponent.tag })) @@ -78,17 +78,17 @@ async function tictactoe(interaction, options = {}) { .setFooter(foot) .setTimestamp(); - const accept = new MessageButton() + const accept = new ButtonBuilder() .setLabel(interaction.translate("economy/tictactoe:ACCEPT")) .setStyle("SUCCESS") .setCustomId("acceptttt"); - const decline = new MessageButton() + const decline = new ButtonBuilder() .setLabel(interaction.translate("economy/tictactoe:DECLINE")) .setStyle("DANGER") .setCustomId("declinettt"); - const accep = new MessageActionRow().addComponents([ + const accep = new ActionRowBuilder().addComponents([ accept, decline ]); @@ -145,54 +145,54 @@ async function tictactoe(interaction, options = {}) { const Args = { user: 0, a1: { - style: "SECONDARY", + style: ButtonStyle.Secondary, emoji: dashmoji, disabled: false }, a2: { - style: "SECONDARY", + style: ButtonStyle.Secondary, emoji: dashmoji, disabled: false }, a3: { - style: "SECONDARY", + style: ButtonStyle.Secondary, emoji: dashmoji, disabled: false }, b1: { - style: "SECONDARY", + style: ButtonStyle.Secondary, emoji: dashmoji, disabled: false }, b2: { - style: "SECONDARY", + style: ButtonStyle.Secondary, emoji: dashmoji, disabled: false }, b3: { - style: "SECONDARY", + style: ButtonStyle.Secondary, emoji: dashmoji, disabled: false }, c1: { - style: "SECONDARY", + style: ButtonStyle.Secondary, emoji: dashmoji, disabled: false }, c2: { - style: "SECONDARY", + style: ButtonStyle.Secondary, emoji: dashmoji, disabled: false }, c3: { - style: "SECONDARY", + style: ButtonStyle.Secondary, emoji: dashmoji, disabled: false } }; - const { MessageActionRow, MessageButton } = require("discord.js"); + const { ActionRowBuilder, ButtonBuilder } = require("discord.js"); - const epm = new MessageEmbed() + const epm = new EmbedBuilder() .setTitle(interaction.translate("economy/tictactoe:DESCRIPTION")) .setColor(options.embedColor || "#075FFF") .setFooter(foot) @@ -233,54 +233,54 @@ async function tictactoe(interaction, options = {}) { "<:X_:863314044781723668>": false }; - const a1 = new MessageButton() + const a1 = new ButtonBuilder() .setStyle(Args.a1.style) .setEmoji(Args.a1.emoji) .setCustomId("a1") .setDisabled(Args.a1.disabled); - const a2 = new MessageButton() + const a2 = new ButtonBuilder() .setStyle(Args.a2.style) .setEmoji(Args.a2.emoji) .setCustomId("a2") .setDisabled(Args.a2.disabled); - const a3 = new MessageButton() + const a3 = new ButtonBuilder() .setStyle(Args.a3.style) .setEmoji(Args.a3.emoji) .setCustomId("a3") .setDisabled(Args.a3.disabled); - const b1 = new MessageButton() + const b1 = new ButtonBuilder() .setStyle(Args.b1.style) .setEmoji(Args.b1.emoji) .setCustomId("b1") .setDisabled(Args.b1.disabled); - const b2 = new MessageButton() + const b2 = new ButtonBuilder() .setStyle(Args.b2.style) .setEmoji(Args.b2.emoji) .setCustomId("b2") .setDisabled(Args.b2.disabled); - const b3 = new MessageButton() + const b3 = new ButtonBuilder() .setStyle(Args.b3.style) .setEmoji(Args.b3.emoji) .setCustomId("b3") .setDisabled(Args.b3.disabled); - const c1 = new MessageButton() + const c1 = new ButtonBuilder() .setStyle(Args.c1.style) .setEmoji(Args.c1.emoji) .setCustomId("c1") .setDisabled(Args.c1.disabled); - const c2 = new MessageButton() + const c2 = new ButtonBuilder() .setStyle(Args.c2.style) .setEmoji(Args.c2.emoji) .setCustomId("c2") .setDisabled(Args.c2.disabled); - const c3 = new MessageButton() + const c3 = new ButtonBuilder() .setStyle(Args.c3.style) .setEmoji(Args.c3.emoji) .setCustomId("c3") .setDisabled(Args.c3.disabled); - const a = new MessageActionRow().addComponents([a1, a2, a3]); - const b = new MessageActionRow().addComponents([b1, b2, b3]); - const c = new MessageActionRow().addComponents([c1, c2, c3]); + const a = new ActionRowBuilder().addComponents([a1, a2, a3]); + const b = new ActionRowBuilder().addComponents([b1, b2, b3]); + const c = new ActionRowBuilder().addComponents([c1, c2, c3]); const buttons = [a, b, c]; if ( @@ -688,14 +688,14 @@ async function tictactoe(interaction, options = {}) { if (Args.user == 0) { Args.user = 1; Args[b.customId] = { - style: "SUCCESS", + style: ButtonStyle.Success, emoji: o_emoji, disabled: true }; } else { Args.user = 0; Args[b.customId] = { - style: "DANGER", + style: ButtonStyle.Danger, emoji: x_emoji, disabled: true }; @@ -838,7 +838,7 @@ async function tictactoe(interaction, options = {}) { collector.on("end", (collected, reason) => { if (reason == "time") { - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setTitle(interaction.translate("economy/tictactoe:NO_ANSWER_TITLE")) .setAuthor({ name: (interaction.user ? interaction.user : interaction.author).tag, @@ -857,7 +857,7 @@ async function tictactoe(interaction, options = {}) { }); } if (reason == "decline") { - const embed = new MessageEmbed() + const embed = new EmbedBuilder() .setTitle(interaction.translate("economy/tictactoe:CANCELED")) .setAuthor({ name: (interaction.user ? interaction.user : interaction.author).tag, diff --git a/index.js b/index.js index 129185de..7a4095c7 100644 --- a/index.js +++ b/index.js @@ -1,10 +1,10 @@ require("./helpers/extenders"); -const { Intents } = require("discord.js"), +const { GatewayIntentBits } = require("discord.js"), JaBa = require("./base/JaBa"); const client = new JaBa({ - intents: Object.keys(Intents.FLAGS), + intents: [ GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildBans, GatewayIntentBits.GuildEmojisAndStickers, GatewayIntentBits.GuildIntegrations, GatewayIntentBits.GuildInvites, GatewayIntentBits.GuildVoiceStates, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessages, GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.GuildMessageTyping, GatewayIntentBits.MessageContent ], allowedMentions: { parse: ["everyone", "roles", "users"] } }); @@ -17,7 +17,7 @@ const client = new JaBa({ })(); client.on("disconnect", () => client.logger.log("Bot is disconnecting...", "warn")) - .on("reconnecting", () => client.logger.log("Bot reconnecting...", "log")) + .on("reconnecting", () => client.logger.log("Bot reconnecting...", "warn")) .on("error", (e) => client.logger.log(e, "error")) .on("warn", (info) => client.logger.log(info, "warn")); process.on("unhandledRejection", (err) => console.error(err)); \ No newline at end of file diff --git a/languages/ru-RU/administration/backup.json b/languages/ru-RU/administration/backup.json deleted file mode 100644 index 7fdedb7f..00000000 --- a/languages/ru-RU/administration/backup.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "DESCRIPTION": "Управление резервными копиями сервера!", - "USAGE": "backup [create/load/info/remove]", - "EXAMPLES": "backup create\nbackup load 123456789098765432\nbackup info 123456789098765432", - "MISSING_STATUS": "Выберите действие: `create`, `load`, `info` или `remove`!", - "MISSING_BACKUP_ID": "Укажите ID резервной копии!", - "NO_BACKUP_FOUND": "Резервных копий с ID `{{backupID}}` не найдено", - "SUCCESS_PUBLIC": "Резервная копия успешно создана! ID резервной копии был отправлен вам в ЛС!", - "SUCCESS_PRIVATE": "Вот ID вашей резервной копии: **`{{backupID}}`**, используйте его для восстановления на другом сервере!", - "CONFIRMATION": ":warning: | **Загрузка резервной копии заменит настройки текущего сервера.**\n\n:arrow_right_hook: *Отправьте `да` для подтверждения!*", - "REMOVE_CONFIRMATION": ":warning: | **Вы уверены что хотите удалить резервную копию? Это действие необратимо**\n\n:arrow_right_hook: *Отправьте `да` для подтверждения!*", - "SUCCESS_REMOVED": "Резервная копия успешно удалена!", - "START_LOADING": "Загрузка резервной копии начата, подождите!", - "LOAD_SUCCESS": "Резервная копия загружена!", - "TITLE_INFO": "Информация о резервной копии", - "TITLE_ID": "ID", - "TITLE_SERVER_ID": "ID сервера", - "TITLE_SIZE": "Размер", - "TITLE_CREATED_AT": "Создана" -} \ No newline at end of file diff --git a/languages/ru-RU/common.json b/languages/ru-RU/common.json index 615024c2..c0660f92 100644 --- a/languages/ru-RU/common.json +++ b/languages/ru-RU/common.json @@ -58,6 +58,8 @@ "MODLOGS": "Логи модерации", "NO_CHANNEL": "Канал не выбран", "REPORTS": "Жалобы", - "BIRTHDAYS": "Поздравления с днём рождения", - "DISCONNECT": "Отключить" + "UNKNOWN": "Неизвестно", + "NOTHING_SELECTED": "Ничего не выбрано", + "AVAILABLE_CATEGORIES": "Доступные категории:", + "BIRTHDAYS": "Поздравления с днём рождения" } \ No newline at end of file diff --git a/languages/ru-RU/fun/8ball.json b/languages/ru-RU/fun/8ball.json index 3da81eb7..a743f73d 100644 --- a/languages/ru-RU/fun/8ball.json +++ b/languages/ru-RU/fun/8ball.json @@ -1,8 +1,8 @@ { - "DESCRIPTION": "Я говорю правду!", - "USAGE": "8ball [вопрос?]", + "DESCRIPTION": "Я говорю правду", + "QUESTION": "Вопрос", "EXAMPLES": "8ball JaBa крутой?", - "ERR_QUESTION": "Введите вопрос!", + "ERR_QUESTION": "Вопрос должен оканчиваться на `?`.", "RESPONSE_1": "Бесспорно", "RESPONSE_2": "Предрешено", "RESPONSE_3": "Никаких сомнений", diff --git a/languages/ru-RU/fun/flip.json b/languages/ru-RU/fun/flip.json deleted file mode 100644 index fb837aed..00000000 --- a/languages/ru-RU/fun/flip.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "DESCRIPTION": "Подкинуть монетку!", - "USAGE": "flip", - "EXAMPLES": "flip", - "HEADS": ":coin: | Орёл!", - "TAILS": ":coin: | Решка!" -} \ No newline at end of file diff --git a/languages/ru-RU/fun/lmg.json b/languages/ru-RU/fun/lmgtfy.json similarity index 61% rename from languages/ru-RU/fun/lmg.json rename to languages/ru-RU/fun/lmgtfy.json index 2be474b4..2a337bab 100644 --- a/languages/ru-RU/fun/lmg.json +++ b/languages/ru-RU/fun/lmgtfy.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Создать LMGTFY (давай я загуглю это для тебя) ссылку", - "USAGE": "lmg [запрос]", - "EXAMPLES": "lmg Как создать Discord бота?", + "USAGE": "lmgtfy [запрос]", + "EXAMPLES": "lmgtfy Как создать Discord бота?", "MISSING": "Укажите запрос!" } \ No newline at end of file diff --git a/languages/ru-RU/fun/lovecalc.json b/languages/ru-RU/fun/lovecalc.json index 2b3deda6..a68808bd 100644 --- a/languages/ru-RU/fun/lovecalc.json +++ b/languages/ru-RU/fun/lovecalc.json @@ -2,6 +2,5 @@ "DESCRIPTION": "Калькулятор любви", "USAGE": "lovecalc [@пользователь1] (@пользователь2)", "EXAMPLES": "lovecalc @Jonny_Bro#4226\nlovecalc @Jonny_Bro#4226 @JaBa#9042", - "MISSING": "Вы должны упомянуть одного или двух пользователей!", - "CONTENT": "Я думаю, что **{{firstUsername}}** на **{{percent}}%** любит **{{secondUsername}}**!" + "CONTENT": "**{{firstMember}}** любит **{{secondMember}}** на **{{percent}}%**!" } \ No newline at end of file diff --git a/languages/ru-RU/fun/memes.json b/languages/ru-RU/fun/memes.json index 347ddfbf..167d8112 100644 --- a/languages/ru-RU/fun/memes.json +++ b/languages/ru-RU/fun/memes.json @@ -1,5 +1,5 @@ { - "DESCRIPTION": "Получить мем с выбранного или случайного сабреддита", + "DESCRIPTION": "Получить мем с выбранного сабреддита", "USAGE": "memes (тег)", "EXAMPLES": "memes\nmemes me_irl", "SEARCHING": "Ищу мем по тегу `{{tag}}`...", diff --git a/languages/ru-RU/general/invite.json b/languages/ru-RU/general/invite.json deleted file mode 100644 index 135c88c2..00000000 --- a/languages/ru-RU/general/invite.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "DESCRIPTION": "Получить ссылку на приглашение JaBa!", - "USAGE": "invite (copy)", - "EXAMPLES": "invite\ninvite copy", - "LINKS": "Ссылки JaBa", - "CLICK": "[**Тык**]({{link}})", - "TIP": "Отправьте `invite copy`, чтобы получить ссылку для копирования!", - "ADD": "Пригласить JaBa", - "SUPPORT": "Поддержать разработчика" -} \ No newline at end of file diff --git a/languages/ru-RU/general/invites.json b/languages/ru-RU/general/invites.json deleted file mode 100644 index bda3b9a2..00000000 --- a/languages/ru-RU/general/invites.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "DESCRIPTION": "Показать кол-во пользователей которых пользователь пригласил на сервер!", - "USAGE": "invites (@пользователь)", - "EXAMPLES": "invites\ninvites @Jonny_Bro#4226", - "NOBODY_AUTHOR": "Вы никого не пригласили на сервер!", - "NOBODY_MEMBER": "{{member}} никого не приглашал(а) на сервер!", - "CODE": "**{{code}}** ({{uses}} использований) | {{channel}}", - "TITLE": "Информация о {{member}} на сервере {{guild}}", - "FIELD_INVITED": "👥 Приглашённых участников", - "FIELD_CODES": "🔑 Коды", - "FIELD_MEMBERS": "{{total}} участников", - "TRACKER": "Отслеживание приглашений" -} \ No newline at end of file diff --git a/languages/ru-RU/general/translate.json b/languages/ru-RU/general/translate.json deleted file mode 100644 index 02d82c7d..00000000 --- a/languages/ru-RU/general/translate.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "DESCRIPTION": "Перевести текст!", - "USAGE": "translate [язык] [текст]", - "EXAMPLES": "translate english Как дела?", - "LIST_SENT": "Список языков отправлен вам в ЛС!", - "MISSING_LANGUAGE": "Укажите язык! Чтобы получить список языков, введите `translate langs-list`!", - "INVALID_LANGUAGE": "Язык `{{search}}` не найден! Чтобы получить список языков, введите `translate langs-list`!", - "MISSING_CONTENT": "Введите текст!" -} \ No newline at end of file diff --git a/languages/ru-RU/misc.json b/languages/ru-RU/misc.json index 60f9138c..c99c8b93 100644 --- a/languages/ru-RU/misc.json +++ b/languages/ru-RU/misc.json @@ -1,6 +1,5 @@ { "ERR_OCCURRED": "Что-то пошло не так... Попробуйте позже!", - "PLEASE_WAIT": "Подождите...", "COMMAND_DISABLED": "Эта команда на данный момент отключена!", "CLICK_HERE": "Нажмите сюда, чтобы начать {{activity}} в {{channel}}", "TIMES_UP": "Время вышло! Используйте команду снова!", @@ -26,51 +25,6 @@ "COOLDOWNED": "Подождите **{{seconds}}**, чтобы снова использовать эту команду!", "CANNOT_DM": "Я не могу отправить вам личное сообщение... Проверьте свои настройки конфиденциальности!", - "PERMISSIONS": { - "CREATE_INSTANT_INVITE": "Создание приглашения", - "KICK_MEMBERS": "Выгонять участников", - "BAN_MEMBERS": "Банить участников", - "ADMINISTRATOR": "Администратор", - "MANAGE_CHANNELS": "Управлять каналами", - "MANAGE_GUILD": "Управлять сервером", - "ADD_REACTIONS": "Добавлять реакции", - "VIEW_AUDIT_LOG": "Просматривать журнал аудита", - "PRIORITY_SPEAKER": "Приоритетный режим", - "STREAM": "Видео", - "VIEW_CHANNEL": "Просматривать каналы", - "SEND_MESSAGES": "Отправлять сообщения", - "SEND_TTS_MESSAGES": "Отправка сообщений text-to-speech", - "MANAGE_MESSAGES": "Управлять сообщениями", - "EMBED_LINKS": "Встраивать ссылки", - "ATTACH_FILES": "Прикреплять файлы", - "READ_MESSAGE_HISTORY": "Читать историю сообщений", - "MENTION_EVERYONE": "Упоминание *@*everyone, *@*here и всех ролей", - "USE_EXTERNAL_EMOJIS": "Использовать внешние эмодзи", - "VIEW_GUILD_INSIGHTS": "Просматривать статистику сервера", - "CONNECT": "Подключаться", - "SPEAK": "Говорить", - "MUTE_MEMBERS": "Отключать участникам микрофон", - "DEAFEN_MEMBERS": "Отключать участникам звук", - "MOVE_MEMBERS": "Перемещать участников", - "USE_VAD": "Использовать режим активации по голосу", - "CHANGE_NICKNAME": "Изменить никнейм", - "MANAGE_NICKNAMES": "Управлять никнеймами", - "MANAGE_ROLES": "Управлять ролями", - "MANAGE_WEBHOOKS": "Управлять вебхуками (webhooks)", - "MANAGE_EMOJIS_AND_STICKERS": "Управлять эмодзи и стикерами", - "USE_APPLICATION_COMMANDS": "Использовать команды приложения", - "MANAGE_EVENTS": "Управление событиями", - "MANAGE_THREADS": "Управление ветками", - "USE_PUBLIC_THREADS": "Использовать публичные ветки", - "CREATE_PUBLIC_THREADS": "Создать публичные ветки", - "USE_PRIVATE_THREADS": "Использование приватных веток", - "CREATE_PRIVATE_THREADS": "Создание приватных веток", - "USE_EXTERNAL_STICKERS": "Использовать внешние стикеры", - "SEND_MESSAGES_IN_THREADS": "Отправлять сообщения в ветках", - "START_EMBEDDED_ACTIVITIES": "Начать активность", - "MODERATE_MEMBERS": "Отправить участников подумать о своём поведении" - }, - "NOUNS": { "CREDIT": { "1": "кредит", diff --git a/languages/ru-RU/moderation/ban.json b/languages/ru-RU/moderation/ban.json deleted file mode 100644 index b99fc6f9..00000000 --- a/languages/ru-RU/moderation/ban.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "DESCRIPTION": "Забанить пользователя на сервере!", - "USAGE": "ban [@пользователь] (причина)", - "EXAMPLES": "ban @Jonny_Bro#4226 Спам", - "MISSING_MEMBER": "Вы должны упомянуть пользователя!", - "YOURSELF": "Вы не можете забанить себя!", - "SUPERIOR": "Вы не можете сделать это, т.к. пользователь стоит выше вас по роли!", - "ALREADY_BANNED": "**{{username}}** уже в бане!", - "MISSING_PERM": "Произошла ошибка... Проверьте, есть ли у вас право банить пользователей и попробуйте снова!", - "BANNED_DM": "Привет {{username}},\nвы были забанены на сервере **{{server}}** пользователем **{{moderator}}** по причине **{{reason}}**!", - "BANNED": "**{{username}}** был забанен на сервере **{{server}}** пользователем **{{moderator}}** по причине **{{reason}}**!", - "CASE": "Бан | Номер #{{count}}" -} \ No newline at end of file diff --git a/languages/ru-RU/moderation/kick.json b/languages/ru-RU/moderation/kick.json deleted file mode 100644 index 9c0b9769..00000000 --- a/languages/ru-RU/moderation/kick.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "DESCRIPTION": "Кикнуть пользователя!", - "USAGE": "kick [@пользователь] (причина)", - "EXAMPLES": "kick @Jonny_Bro#4226 Спам", - "MISSING_MEMBER": "Вы должны упомянуть пользователя!", - "YOURSELF": "Вы не можете кикнуть себя!", - "MISSING_PERM": "Произошла ошибка... Проверьте, есть ли у вас право кикать пользователей и попробуйте снова!", - "KICKED_DM": "Привет {{username}},\nвы были кикнуты с сервера **{{server}}** пользователем **{{moderator}}** по причине **{{reason}}**!", - "KICKED": "**{{username}}** был кикнут с сервера **{{server}}** пользователем **{{moderator}}** по причине **{{reason}}**!", - "CASE": "Кик | Номер #{{count}}" -} \ No newline at end of file diff --git a/languages/ru-RU/moderation/mute.json b/languages/ru-RU/moderation/mute.json deleted file mode 100644 index 4b9e55a7..00000000 --- a/languages/ru-RU/moderation/mute.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "DESCRIPTION": "Запретить пользователю писать сообщения и заходить в голосовые каналы!", - "USAGE": "mute [@пользователь] [время] (причина)", - "EXAMPLES": "mute @Jonny_Bro#4226 24h Спам", - "MISSING_MEMBER": "Вы должны упомянуть пользователя!", - "YOURSELF": "Вы не можете замутить себя!", - "MUTED_DM": "Привет {{username}},\nвы были замучены на сервере **{{server}}** пользователем **{{moderator}}** на **{{time}}** по причине **{{reason}}**!", - "MUTED": "**{{username}}** замучен на **{{time}}** по причине **{{reason}}**!", - "CASE": "Мут | Номер #{{count}}" -} \ No newline at end of file diff --git a/languages/ru-RU/moderation/unmute.json b/languages/ru-RU/moderation/unmute.json deleted file mode 100644 index 9c7a2477..00000000 --- a/languages/ru-RU/moderation/unmute.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "DESCRIPTION": "Размутить пользователя!", - "USAGE": "unmute [@пользователь]", - "EXAMPLES": "unmute @Jonny_Bro#4226", - "MISSING_MEMBER": "Вы должны упомянуть пользователя!", - "NOT_MUTED": "**{{username}}** не замучен на данном сервере!", - "SUCCESS": "**{{username}}** был размучен на данном сервере!", - "SUCCESS_CASE": "{{user}} (`{{usertag}}`) размучен! (Номер #{{count}})" -} \ No newline at end of file diff --git a/languages/ru-RU/nsfw/nsfw.json b/languages/ru-RU/nsfw/nsfw.json index 711d8c6d..ded013b6 100644 --- a/languages/ru-RU/nsfw/nsfw.json +++ b/languages/ru-RU/nsfw/nsfw.json @@ -2,7 +2,5 @@ "DESCRIPTION": "Найти NSFW изображение по тэгу", "USAGE": "nsfw", "EXAMPLES": "nsfw", - "AVAILABLE_CATEGORIES": "Доступные категории:", - "NOTHING_SELECTED": "Ничего не выбрано", "TAG": "Тэг" } \ No newline at end of file diff --git a/languages/ru-RU/owner/eval.json b/languages/ru-RU/owner/eval.json index 42dd44a8..55beb91b 100644 --- a/languages/ru-RU/owner/eval.json +++ b/languages/ru-RU/owner/eval.json @@ -1,5 +1,5 @@ { "DESCRIPTION": "Выполнить код", - "USAGE": "[код]", + "CODE": "Выполняемый код", "EXAMPLES": "eval interaction.channel.send({ content: \"Hello World!\" })" } \ No newline at end of file diff --git a/languages/ru-RU/owner/reload.json b/languages/ru-RU/owner/reload.json index 879868c0..47d5aba5 100644 --- a/languages/ru-RU/owner/reload.json +++ b/languages/ru-RU/owner/reload.json @@ -1,6 +1,6 @@ { "DESCRIPTION": "Перезагрузить команду!", - "USAGE": "reload", + "COMMAND": "Команда", "EXAMPLES": "reload help", "NOT_FOUND": "Команды `{{search}}` не существует!", "SUCCESS": "Команда `{{command}}` успешно перезагружена!" diff --git a/languages/uk-UA/misc.json b/languages/uk-UA/misc.json index e4194d45..d1107569 100644 --- a/languages/uk-UA/misc.json +++ b/languages/uk-UA/misc.json @@ -27,51 +27,6 @@ "COOLDOWNED": "Зачекайте **{{seconds}}**, щоб знову використати цю команду!", "CANNOT_DM": "Я не можу надіслати вам особисте повідомлення... Перевірте налаштування конфіденційності!", - "PERMISSIONS": { - "CREATE_INSTANT_INVITE": "Створення запрошення", - "KICK_MEMBERS": "Виганяти учасників", - "BAN_MEMBERS": "Банити учасників", - "ADMINISTRATOR": "Адміністратор", - "MANAGE_CHANNELS": "Керувати каналами", - "MANAGE_GUILD": "Керувати сервером", - "ADD_REACTIONS": "Додавати реакції", - "VIEW_AUDIT_LOG": "Перегляд журналу аудиту", - "PRIORITY_SPEAKER": "Пріоритетний режим", - "STREAM": "Відео", - "VIEW_CHANNEL": "Перегляд каналів", - "SEND_MESSAGES": "Надсилати повідомлення", - "SEND_TTS_MESSAGES": "Надсилання повідомлень text-to-speech", - "MANAGE_MESSAGES": "Керувати повідомленнями", - "EMBED_LINKS": "Вбудовувати посилання", - "ATTACH_FILES": "Прикріплювати файли", - "READ_MESSAGE_HISTORY": "Читати історію повідомлень", - "MENTION_EVERYONE": "Згадка *@*everyone, *@*here та всіх ролей", - "USE_EXTERNAL_EMOJIS": "Використовувати зовнішні емодзі", - "VIEW_GUILD_INSIGHTS": "Перегляд статистики сервера", - "CONNECT": "Підключатися", - "SPEAK": "Говорити", - "MUTE_MEMBERS": "Вимкнути учасникам мікрофон", - "DEAFEN_MEMBERS": "Вимкнути учасникам звук", - "MOVE_MEMBERS": "Переміщувати учасників", - "USE_VAD": "Використовувати режим активації за голосом", - "CHANGE_NICKNAME": "Змінити нікнейм", - "MANAGE_NICKNAMES": "Керувати нікнеймами", - "MANAGE_ROLES": "Керувати ролями", - "MANAGE_WEBHOOKS": "Керувати вебхуками (webhooks)", - "MANAGE_EMOJIS_AND_STICKERS": "Керувати емодзі та стікерами", - "USE_APPLICATION_COMMANDS": "Використовувати команди програми", - "MANAGE_EVENTS": "Управління подіями", - "MANAGE_THREADS": "Керування гілками", - "USE_PUBLIC_THREADS": "Використовувати публічні гілки", - "CREATE_PUBLIC_THREADS": "Створити публічні гілки", - "USE_PRIVATE_THREADS": "Використання приватних гілок", - "CREATE_PRIVATE_THREADS": "Створення приватних гілок", - "USE_EXTERNAL_STICKERS": "Використовувати зовнішні стікери", - "SEND_MESSAGES_IN_THREADS": "Надсилати повідомлення у гілках", - "START_EMBEDDED_ACTIVITIES": "Почати активність", - "MODERATE_MEMBERS": "Надіслати учасників подумати про свою поведінку" - }, - "NOUNS": { "CREDIT": { "1": "кредит", diff --git a/package-lock.json b/package-lock.json index beeda0de..a4d2dcb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,15 +9,13 @@ "version": "TEST", "license": "ISC", "dependencies": { - "@discordjs/builders": "^1.0.0", - "@discordjs/opus": "^0.7.0", + "@discordjs/opus": "^0.8.0", "@discordjs/rest": "^1.0.0", - "@discordjs/voice": "^0.10.0", + "@discordjs/voice": "^0.11.0", "@distube/soundcloud": "^1.2.1", "@distube/spotify": "^1.3.2", "@distube/yt-dlp": "^1.1.3", "@distube/ytdl-core": "^4.11.3", - "@k3rn31p4nic/google-translate-api": "github:k3rn31p4nic/google-translate-api", "@sindresorhus/slugify": "^1.1.0", "amethyste-api": "github:Androz2091/amethyste-api", "btoa": "^1.2.1", @@ -26,31 +24,25 @@ "chalk": "^4.1.0", "colors-generator": "^0.3.4", "cron": "^1.7.2", - "dblapi.js": "^2.3.0", - "discord-api-types": "^0.36.3", - "discord-backup": "^3.2.1", - "discord-giveaways": "github:Androz2091/discord-giveaways#develop", - "discord-paginationembed": "github:gazmull/discord-paginationembed#v3", + "customizable-discordjs-pagination": "^1.3.1", + "discord-api-types": "^0.37.0", + "discord-giveaways": "^6.0.0", "discord-together": "^1.3.3", - "discord.js": "^13.8.1", - "distube": "^3.3.4", + "discord.js": "^14.1.1", + "distube": "^4.0.3", "ejs": "^3.1.3", "express": "^4.17.1", "express-session": "^1.17.0", "ffmpeg-static": "^4.4.0", - "figlet": "^1.5.0", "gamedig": "^4.0.2", "i18next": "^20.2.2", "i18next-node-fs-backend": "^2.1.3", - "js-string-cleaner": "^1.0.3", - "libsodium-wrappers": "^0.7.9", "markdown-table": "2.0.0", "mathjs": "^9.0.0", "md5": "^2.2.1", "moment": "^2.26.0", "mongoose": "^5.13.14", - "ms": "^2.1.3", - "string-sanitizer": "^1.1.1" + "ms": "^2.1.3" }, "devDependencies": { "eslint": "^7.5.0" @@ -198,12 +190,12 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.0.0.tgz", - "integrity": "sha512-8y91ZfpOHubiGJu5tVyGI9tQCEyHZDTeqUWVcJd0dq7B96xIf84S0L4fwmD1k9zTe1eqEFSk0gc7BpY+FKn7Ww==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", + "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", "dependencies": { "@sapphire/shapeshift": "^3.5.1", - "discord-api-types": "^0.36.2", + "discord-api-types": "^0.36.3", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" @@ -212,23 +204,28 @@ "node": ">=16.9.0" } }, + "node_modules/@discordjs/builders/node_modules/discord-api-types": { + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" + }, "node_modules/@discordjs/collection": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz", - "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", + "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==", "engines": { "node": ">=16.9.0" } }, "node_modules/@discordjs/node-pre-gyp": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@discordjs/node-pre-gyp/-/node-pre-gyp-0.4.2.tgz", - "integrity": "sha512-V239Czn+DXFGLhhuccwEDBoTdgMGrRu30dOlzm1GzrSIjwFj01ZJerNX7x+CEX1NG1Q/1gGfOOkeZFNHjycrRA==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@discordjs/node-pre-gyp/-/node-pre-gyp-0.4.4.tgz", + "integrity": "sha512-x569MMtdk6jdGo2S58iiZoyv4p/N2Ju8Nh6vvzZb1wyouV7IE3VuU0hg2kqUmTfD0z6r4uD6acvMTuc+iA3f8g==", "dependencies": { - "detect-libc": "^1.0.3", + "detect-libc": "^2.0.0", "https-proxy-agent": "^5.0.0", "make-dir": "^3.1.0", - "node-fetch": "^2.6.5", + "node-fetch": "^2.6.7", "nopt": "^5.0.0", "npmlog": "^5.0.1", "rimraf": "^3.0.2", @@ -239,64 +236,93 @@ "node-pre-gyp": "bin/node-pre-gyp" } }, + "node_modules/@discordjs/node-pre-gyp/node_modules/detect-libc": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", + "engines": { + "node": ">=8" + } + }, "node_modules/@discordjs/opus": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@discordjs/opus/-/opus-0.7.0.tgz", - "integrity": "sha512-3Xxa3dh7taSDwBAR5fLALZ/KTxvbMmHCMxYLYve6NlPO7Ms1CLmKqp/R4ZoVzkRGQVUVWEhaB1s0v9jfa2tfDg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@discordjs/opus/-/opus-0.8.0.tgz", + "integrity": "sha512-uHE7OmHEmP8YM0yvsH3iSdacdeghO0qTkF0CIkV07Tg0qdyOLUVkoZHj5Zcpge9rC4qb/JvTS2xRgttSZLM43Q==", "hasInstallScript": true, "dependencies": { - "@discordjs/node-pre-gyp": "^0.4.2", - "node-addon-api": "^4.2.0" + "@discordjs/node-pre-gyp": "^0.4.4", + "node-addon-api": "^5.0.0" }, "engines": { "node": ">=12.0.0" } }, "node_modules/@discordjs/rest": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.0.tgz", - "integrity": "sha512-uDAvnE0P2a8axMdD4C51EGjvCRQ2HZk2Yxf6vHWZgIqG87D8DGKMPwmquIxrrB07MjV+rwci2ObU+mGhGP+bJg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", + "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", "dependencies": { - "@discordjs/collection": "^1.0.0", + "@discordjs/collection": "^1.0.1", "@sapphire/async-queue": "^1.3.2", "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.36.2", - "file-type": "^17.1.2", + "discord-api-types": "^0.36.3", + "file-type": "^17.1.4", "tslib": "^2.4.0", - "undici": "^5.7.0" + "undici": "^5.8.0" }, "engines": { "node": ">=16.9.0" } }, - "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.0.tgz", - "integrity": "sha512-nAxDQYE5dNAzEGQ7HU20sujDsG5vLowUKCEqZkKUIlrXERZFTt/60zKUj/g4+AVCGeq+pXC5hivMaNtiC+PY5Q==", - "engines": { - "node": ">=16.9.0" - } + "node_modules/@discordjs/rest/node_modules/discord-api-types": { + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" }, "node_modules/@discordjs/voice": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.10.0.tgz", - "integrity": "sha512-tChDKRRbKwWHcyq1dSEzrnuCMJyLtKXcFhgQpqcS2YjZ1TLlXboc/mhrR8jA1Yb1rB81u8dgj/lPkkHsk0ItEg==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.11.0.tgz", + "integrity": "sha512-6+9cj1dxzBJm7WJ9qyG2XZZQ8rcLl6x2caW0C0OxuTtMLAaEDntpb6lqMTFiBg/rDc4Rd59g1w0gJmib33CuHw==", "dependencies": { "@types/ws": "^8.5.3", - "discord-api-types": "^0.33.3", - "prism-media": "^1.3.2", - "tiny-typed-emitter": "^2.1.0", + "discord-api-types": "^0.36.2", + "prism-media": "^1.3.4", "tslib": "^2.4.0", - "ws": "^8.7.0" + "ws": "^8.8.1" }, "engines": { "node": ">=16.9.0" } }, "node_modules/@discordjs/voice/node_modules/discord-api-types": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz", - "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" + }, + "node_modules/@discordjs/voice/node_modules/prism-media": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.4.tgz", + "integrity": "sha512-eW7LXORkTCQznZs+eqe9VjGOrLBxcBPXgNyHXMTSRVhphvd/RrxgIR7WaWt4fkLuhshcdT5KHL88LAfcvS3f5g==", + "peerDependencies": { + "@discordjs/opus": "^0.8.0", + "ffmpeg-static": "^5.0.2 || ^4.2.7 || ^3.0.0 || ^2.4.0", + "node-opus": "^0.3.3", + "opusscript": "^0.0.8" + }, + "peerDependenciesMeta": { + "@discordjs/opus": { + "optional": true + }, + "ffmpeg-static": { + "optional": true + }, + "node-opus": { + "optional": true + }, + "opusscript": { + "optional": true + } + } }, "node_modules/@distube/soundcloud": { "version": "1.2.1", @@ -323,25 +349,6 @@ "distube": "^3.3.1||4" } }, - "node_modules/@distube/youtube-dl": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@distube/youtube-dl/-/youtube-dl-2.2.4.tgz", - "integrity": "sha512-rGmnVqNF6LjGb5zpSLicLgeK9MbIJ/wOJ6Zl5g9V44Cnfkxfk76VNtzd9wNp3JPdWPa9aD9HUsMA4H72Z9ZoiQ==", - "hasInstallScript": true, - "dependencies": { - "dargs": "~7.0.0", - "execa": "~5.1.1", - "get-stream": "~6.0.1", - "got": "~11.8.2", - "is-unix": "~1.0.0", - "mkdirp": "~1.0.4", - "p-event": "~4.2.0", - "p-reflect": "~2.1.0" - }, - "engines": { - "node": ">= 12" - } - }, "node_modules/@distube/yt-dlp": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@distube/yt-dlp/-/yt-dlp-1.1.3.tgz", @@ -385,11 +392,11 @@ } }, "node_modules/@distube/ytsr": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@distube/ytsr/-/ytsr-1.1.5.tgz", - "integrity": "sha512-nSYsB+UYw0FXSivJ49MGkES41Gfg5rgavil9nOHra0yCsGiY4qsDzpoFVjCmbpKQ6GDUq4Z/8LOwZakgpH3N1A==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@distube/ytsr/-/ytsr-1.1.8.tgz", + "integrity": "sha512-/6pVd9Hiu6EbjPbbC4PKckse957LMiCYYwULWH7Ctovbc/mdPz9pT7hsFIBqx1vLXOYj6osbcfkCCbhhegSBDg==", "dependencies": { - "miniget": "^4.2.1" + "miniget": "^4.2.2" }, "engines": { "node": ">=8" @@ -435,18 +442,6 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, - "node_modules/@k3rn31p4nic/google-translate-api": { - "name": "@iamtraction/google-translate", - "version": "1.1.3", - "resolved": "git+ssh://git@github.com/k3rn31p4nic/google-translate-api.git#363662416a4f33238c8dcb4e89bba5c4baae9df9", - "license": "MIT", - "dependencies": { - "got": "^11.8.2" - }, - "engines": { - "node": ">=8.0.0" - } - }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.8.tgz", @@ -546,17 +541,6 @@ "node": ">=8" } }, - "node_modules/@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "dependencies": { - "defer-to-connect": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/@tokenizer/token": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", @@ -609,9 +593,9 @@ "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==" }, "node_modules/@types/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz", + "integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==", "dependencies": { "@types/node": "*", "form-data": "^3.0.0" @@ -970,14 +954,6 @@ "node": ">= 0.8" } }, - "node_modules/cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==", - "engines": { - "node": ">=10.6.0" - } - }, "node_modules/cacheable-request": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", @@ -1329,6 +1305,11 @@ "url": "https://github.com/sponsors/fb55" } }, + "node_modules/customizable-discordjs-pagination": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/customizable-discordjs-pagination/-/customizable-discordjs-pagination-1.3.1.tgz", + "integrity": "sha512-6kjYOWKi+4zNs3Os3MvOi2ZqGFmMZgbhXOJRQszbEkAJTvpVtbhzPoDsU222QMk5HfmV2y10NOO9bjpDrRTS/w==" + }, "node_modules/dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", @@ -1337,12 +1318,6 @@ "node": ">=8" } }, - "node_modules/dblapi.js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/dblapi.js/-/dblapi.js-2.4.1.tgz", - "integrity": "sha512-g+u1inF/qOLit5qPK4hBGk5pKL1vy09uBLV+nukkRMvw2S9D1PyiyO70n4fboUXOgbExPp6Sho/Y782OqQOUiQ==", - "deprecated": "Module is no longer maintained" - }, "node_modules/debug": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", @@ -1400,12 +1375,12 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "node_modules/deepmerge-ts": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-4.2.1.tgz", + "integrity": "sha512-xzJLiUo4z1dD2nggSfaMvHo5qWLoy/JVa9rKuktC6FrQQEBI8Qnj7KwuCYZhqBoGOOpGqs6+3MR2ZhSMcTr4BA==", "engines": { - "node": ">=0.10.0" + "node": ">=12.4.0" } }, "node_modules/defer-to-connect": { @@ -1462,40 +1437,23 @@ } }, "node_modules/discord-api-types": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" - }, - "node_modules/discord-backup": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/discord-backup/-/discord-backup-3.2.1.tgz", - "integrity": "sha512-eCarIkZzl7eJ/wlr5JqnRF25oyFf61UQsgtqhqHOE+8S26o/QboOcNGhCxYV07vPZQyhJ3i/6WwKJggMGxNZcQ==", - "dependencies": { - "discord.js": "^13.6.0" - } + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.0.tgz", + "integrity": "sha512-6LlL0xceiZs/kQ5PeKe5inkcjR73vagt3oACsP/C5IWKjXfzLGKrXn6yRYgiHIeJyFZ1xVPRJYE4W/u8UTT4ig==" }, "node_modules/discord-giveaways": { - "version": "5.0.1", - "resolved": "git+ssh://git@github.com/Androz2091/discord-giveaways.git#b6b0f3771ede7934c0ce2da373338853034262c6", - "license": "MIT", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/discord-giveaways/-/discord-giveaways-6.0.0.tgz", + "integrity": "sha512-Ii6LAy0XooFjlffNabpyzN1CxWz3W2nmQ+6cLUxRUTXBMdq2gsk9d15lXBTvyG01kxF6Ko6f7EZEb9D83Rrrvw==", "dependencies": { - "deepmerge": "^4.2.2", - "discord.js": "^13.5.0", + "deepmerge-ts": "^4.2.1", "serialize-javascript": "^6.0.0" }, "engines": { - "node": ">=16.6.0" - } - }, - "node_modules/discord-paginationembed": { - "version": "3.0.0-dev.0", - "resolved": "git+ssh://git@github.com/gazmull/discord-paginationembed.git#cd7de9493d11d9db2a8ae15647937e11bc0f7b60", - "license": "MIT", - "engines": { - "node": ">= 14.0.0" + "node": ">=16.9.0" }, "peerDependencies": { - "discord.js": "^13.0.0-dev.4206e35.1626393827" + "discord.js": ">=14.0.0" } }, "node_modules/discord-together": { @@ -1507,36 +1465,14 @@ "node-fetch": "^2.6.1" } }, - "node_modules/discord.js": { - "version": "13.8.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz", - "integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==", + "node_modules/discord-together/node_modules/@discordjs/builders": { + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz", + "integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==", "deprecated": "no longer supported", "dependencies": { - "@discordjs/builders": "^0.14.0", - "@discordjs/collection": "^0.7.0", - "@sapphire/async-queue": "^1.3.1", - "@types/node-fetch": "^2.6.1", - "@types/ws": "^8.5.3", - "discord-api-types": "^0.33.3", - "form-data": "^4.0.0", - "node-fetch": "^2.6.1", - "ws": "^8.7.0" - }, - "engines": { - "node": ">=16.6.0", - "npm": ">=7.0.0" - } - }, - "node_modules/discord.js/node_modules/@discordjs/builders": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz", - "integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==", - "deprecated": "no longer supported", - "dependencies": { - "@sapphire/shapeshift": "^3.1.0", - "@sindresorhus/is": "^4.6.0", - "discord-api-types": "^0.33.3", + "@sapphire/shapeshift": "^3.5.1", + "discord-api-types": "^0.36.2", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" @@ -1545,33 +1481,101 @@ "node": ">=16.9.0" } }, - "node_modules/discord.js/node_modules/discord-api-types": { + "node_modules/discord-together/node_modules/@discordjs/collection": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz", + "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==", + "deprecated": "no longer supported", + "engines": { + "node": ">=16.9.0" + } + }, + "node_modules/discord-together/node_modules/discord-api-types": { + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" + }, + "node_modules/discord-together/node_modules/discord.js": { + "version": "13.9.2", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.9.2.tgz", + "integrity": "sha512-wShFlyAyxgQcWzINeufUoT1U0fmju+pPCRzPfJB7CaA0V1tQHc4e0PpO4NQif8sLfZvrQmEILBaIJ0G5I32OxQ==", + "dependencies": { + "@discordjs/builders": "^0.16.0", + "@discordjs/collection": "^0.7.0", + "@sapphire/async-queue": "^1.3.2", + "@types/node-fetch": "^2.6.2", + "@types/ws": "^8.5.3", + "discord-api-types": "^0.33.3", + "form-data": "^4.0.0", + "node-fetch": "^2.6.7", + "ws": "^8.8.1" + }, + "engines": { + "node": ">=16.6.0", + "npm": ">=7.0.0" + } + }, + "node_modules/discord-together/node_modules/discord.js/node_modules/discord-api-types": { "version": "0.33.5", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz", "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" }, - "node_modules/distube": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/distube/-/distube-3.3.4.tgz", - "integrity": "sha512-izJFDL1dfTzPgTXZbGavyDXDnodkuykVGFSWuFPL9EY83et/qhjQFosLwYoWTJWQN8tG6KPUc5wPi4EZxxy/4g==", + "node_modules/discord.js": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.1.1.tgz", + "integrity": "sha512-6Oa2f+Y0+s6B5HTTqcAP7Z6tUmguNTKpzbuTmE1JIeT/aUTr9dVe397D/bvcBSRpJERQzMyEWyEiVQnMRHcx4A==", "dependencies": { - "@distube/youtube-dl": "^2.2.4", - "@distube/ytdl-core": "^4.11.1", - "@distube/ytpl": "^1.1.1", - "@distube/ytsr": "^1.1.5", - "prism-media": "https://codeload.github.com/distubejs/prism-media/tar.gz/main#workaround.tar.gz", - "tiny-typed-emitter": "^2.1.0" + "@discordjs/builders": "^1.1.0", + "@discordjs/collection": "^1.0.1", + "@discordjs/rest": "^1.0.1", + "@sapphire/snowflake": "^3.2.2", + "@types/ws": "^8.5.3", + "discord-api-types": "^0.36.3", + "fast-deep-equal": "^3.1.3", + "lodash.snakecase": "^4.1.1", + "tslib": "^2.4.0", + "undici": "^5.8.0", + "ws": "^8.8.1" }, "engines": { - "node": ">=12.0.0" + "node": ">=16.9.0" + } + }, + "node_modules/discord.js/node_modules/discord-api-types": { + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" + }, + "node_modules/distube": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/distube/-/distube-4.0.3.tgz", + "integrity": "sha512-EMR/4d1EgNtNIdTPhwBOtVKqkPX1YJBB4JwPymWIX/i6ip0451X+vZGwJamP2LFh46Usssay0ty+Dm1U0/jQ1g==", + "funding": [ + { + "type": "individual", + "url": "https://paypal.me/Skickkk" + }, + { + "type": "patreon", + "url": "https://patreon.com/DisTube" + } + ], + "dependencies": { + "@distube/ytdl-core": "^4.11.3", + "@distube/ytpl": "^1.1.1", + "@distube/ytsr": "^1.1.8", + "prism-media": "https://codeload.github.com/distubejs/prism-media/tar.gz/main#workaround.tar.gz", + "tiny-typed-emitter": "^2.1.0", + "tslib": "^2.4.0", + "undici": "^5.8.0" }, - "funding": { - "url": "https://patreon.com/DisTube" + "engines": { + "node": ">=16.9.0" }, "peerDependencies": { "@discordjs/opus": "*", - "@discordjs/voice": ">=0.5.6", - "discord.js": "^12.5.0||13.x" + "@discordjs/voice": "*", + "discord.js": "14" }, "peerDependenciesMeta": { "@discordjs/opus": { @@ -2117,14 +2121,6 @@ "node": ">=10" } }, - "node_modules/figlet": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.5.2.tgz", - "integrity": "sha512-WOn21V8AhyE1QqVfPIVxe3tupJacq1xGkPTB4iagT6o+P2cAgEOOwIxMftr4+ZCTI6d551ij9j61DFr0nsP2uQ==", - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -2138,12 +2134,12 @@ } }, "node_modules/file-type": { - "version": "17.1.3", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.3.tgz", - "integrity": "sha512-MFVSozBIhvnx2dkxlf+010Xqn6+ojlMUT9LXQiPNoOijgRtXNMghWdGK0u2o1RoCqzHoVsw65IL8ZBcQ4MhIrw==", + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.4.tgz", + "integrity": "sha512-3w/rJUUPBj6CYhVER3D5JCKwYJJiC36uj5dP+LnyubHI6H6FJo1TeWVCEA09YLVoZqV3/mLP26j9+Pz1GjAyjQ==", "dependencies": { "readable-web-to-node-stream": "^3.0.2", - "strtok3": "^7.0.0-alpha.7", + "strtok3": "^7.0.0-alpha.9", "token-types": "^5.0.0-alpha.2" }, "engines": { @@ -2543,30 +2539,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/got": { - "version": "11.8.3", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.3.tgz", - "integrity": "sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg==", - "dependencies": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - }, - "engines": { - "node": ">=10.19.0" - }, - "funding": { - "url": "https://github.com/sindresorhus/got?sponsor=1" - } - }, "node_modules/graceful-readlink": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", @@ -2641,18 +2613,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz", "integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw==" }, - "node_modules/http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "dependencies": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - }, - "engines": { - "node": ">=10.19.0" - } - }, "node_modules/https-proxy-agent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", @@ -2834,14 +2794,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-unix": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-unix/-/is-unix-1.0.1.tgz", - "integrity": "sha512-8Iu9y/xCBmg1uwWV3J/jNl3udPHPAYyqGv4OKE/70O10U2qmt1v3/SRhSAW5+GiRpU2yZEnl+z1Oxm4A8arVrA==", - "engines": { - "node": ">= 12" - } - }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -2947,11 +2899,6 @@ "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", "integrity": "sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k=" }, - "node_modules/js-string-cleaner": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/js-string-cleaner/-/js-string-cleaner-1.2.0.tgz", - "integrity": "sha512-nasV4rj3sgD43GvkwhyBM63eQH6I+4AYfsORISI2G+StTeRhK5sZq95PIvz9oURIFNs6KZmDRN8zBPlVHwuLrw==" - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -3028,19 +2975,6 @@ "node": ">= 0.8.0" } }, - "node_modules/libsodium": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.9.tgz", - "integrity": "sha512-gfeADtR4D/CM0oRUviKBViMGXZDgnFdMKMzHsvBdqLBHd9ySi6EtYnmuhHVDDYgYpAO8eU8hEY+F8vIUAPh08A==" - }, - "node_modules/libsodium-wrappers": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.9.tgz", - "integrity": "sha512-9HaAeBGk1nKTRFRHkt7nzxqCvnkWTjn1pdjKgcUnZxj0FyOP4CnhgFhMdrFfgNsukijBGyBLpP2m2uKT1vuWhQ==", - "dependencies": { - "libsodium": "^0.7.0" - } - }, "node_modules/lodash.deburr": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-4.1.0.tgz", @@ -3051,6 +2985,11 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, + "node_modules/lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" + }, "node_modules/lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", @@ -3480,9 +3419,9 @@ } }, "node_modules/node-addon-api": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.2.0.tgz", - "integrity": "sha512-eazsqzwG2lskuzBqCGPi7Ac2UgOoMz8JVOXVhTvvPDYhthvNpefx8jWD8Np7Gv+2Sz0FlPWZk0nJV0z598Wn8Q==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.0.0.tgz", + "integrity": "sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA==" }, "node_modules/node-fetch": { "version": "2.6.7", @@ -3635,55 +3574,6 @@ "node": ">= 0.8.0" } }, - "node_modules/p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", - "dependencies": { - "p-timeout": "^3.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "engines": { - "node": ">=4" - } - }, - "node_modules/p-reflect": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-reflect/-/p-reflect-2.1.0.tgz", - "integrity": "sha512-paHV8NUz8zDHu5lhr/ngGWQiW067DK/+IbJ+RfZ4k+s8y4EKyYCz8pGYWjxCg35eHztpJAt+NUgvN4L+GCbPlg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "dependencies": { - "p-finally": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -4351,11 +4241,6 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" }, - "node_modules/string-sanitizer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string-sanitizer/-/string-sanitizer-1.1.1.tgz", - "integrity": "sha512-ZaqlidMholFiBaKDPPVf9cJjNo6iRhP6g/ei5qTgvzKEMa8TK/nu4hM90YZ2LvfjvAomF2LIexmOlX1MvYN+ug==" - }, "node_modules/string-to-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string-to-stream/-/string-to-stream-1.1.1.tgz", @@ -4410,9 +4295,9 @@ } }, "node_modules/strtok3": { - "version": "7.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.8.tgz", - "integrity": "sha512-u+k19v+rTxBjGYxncRQjGvZYwYvEd0uP3D+uHKe/s4WB1eXS5ZwpZsTlBu5xSS4zEd89mTXECXg6WW3FSeV8cA==", + "version": "7.0.0-alpha.9", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.9.tgz", + "integrity": "sha512-G8WxjBFjTZ77toVElv1i7k3jCXNkBB14FVaZ/6LIOka/WGo4La5XHLrU7neFVLdKbXESZf4BejVKZu5maOmocA==", "dependencies": { "@tokenizer/token": "^0.3.0", "peek-readable": "^5.0.0-alpha.5" @@ -4782,9 +4667,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "node_modules/ws": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.7.0.tgz", - "integrity": "sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "engines": { "node": ">=10.0.0" }, @@ -4946,85 +4831,104 @@ } }, "@discordjs/builders": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.0.0.tgz", - "integrity": "sha512-8y91ZfpOHubiGJu5tVyGI9tQCEyHZDTeqUWVcJd0dq7B96xIf84S0L4fwmD1k9zTe1eqEFSk0gc7BpY+FKn7Ww==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.1.0.tgz", + "integrity": "sha512-EO8TSltiIc9Z1wE854wAFvv5AccqEtvjFmao9PPoxQhRaJ0hEb7FwWRTCA1jGg4ZWI3hcp4m+RET5ufZQz3rOg==", "requires": { "@sapphire/shapeshift": "^3.5.1", - "discord-api-types": "^0.36.2", + "discord-api-types": "^0.36.3", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" + }, + "dependencies": { + "discord-api-types": { + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" + } } }, "@discordjs/collection": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz", - "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.1.tgz", + "integrity": "sha512-5V/wswzR3r2RVYXLxxg4TvrAnBhVCNgHTXhC+OUtLoriJ072rPMHo+Iw1SS1vrCckp8Es40XM411+WkNRPaXFw==" }, "@discordjs/node-pre-gyp": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@discordjs/node-pre-gyp/-/node-pre-gyp-0.4.2.tgz", - "integrity": "sha512-V239Czn+DXFGLhhuccwEDBoTdgMGrRu30dOlzm1GzrSIjwFj01ZJerNX7x+CEX1NG1Q/1gGfOOkeZFNHjycrRA==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/@discordjs/node-pre-gyp/-/node-pre-gyp-0.4.4.tgz", + "integrity": "sha512-x569MMtdk6jdGo2S58iiZoyv4p/N2Ju8Nh6vvzZb1wyouV7IE3VuU0hg2kqUmTfD0z6r4uD6acvMTuc+iA3f8g==", "requires": { - "detect-libc": "^1.0.3", + "detect-libc": "^2.0.0", "https-proxy-agent": "^5.0.0", "make-dir": "^3.1.0", - "node-fetch": "^2.6.5", + "node-fetch": "^2.6.7", "nopt": "^5.0.0", "npmlog": "^5.0.1", "rimraf": "^3.0.2", "semver": "^7.3.5", "tar": "^6.1.11" + }, + "dependencies": { + "detect-libc": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", + "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==" + } } }, "@discordjs/opus": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@discordjs/opus/-/opus-0.7.0.tgz", - "integrity": "sha512-3Xxa3dh7taSDwBAR5fLALZ/KTxvbMmHCMxYLYve6NlPO7Ms1CLmKqp/R4ZoVzkRGQVUVWEhaB1s0v9jfa2tfDg==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@discordjs/opus/-/opus-0.8.0.tgz", + "integrity": "sha512-uHE7OmHEmP8YM0yvsH3iSdacdeghO0qTkF0CIkV07Tg0qdyOLUVkoZHj5Zcpge9rC4qb/JvTS2xRgttSZLM43Q==", "requires": { - "@discordjs/node-pre-gyp": "^0.4.2", - "node-addon-api": "^4.2.0" + "@discordjs/node-pre-gyp": "^0.4.4", + "node-addon-api": "^5.0.0" } }, "@discordjs/rest": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.0.tgz", - "integrity": "sha512-uDAvnE0P2a8axMdD4C51EGjvCRQ2HZk2Yxf6vHWZgIqG87D8DGKMPwmquIxrrB07MjV+rwci2ObU+mGhGP+bJg==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.0.1.tgz", + "integrity": "sha512-w08CTKVzzYYvKxEjXKOs9AdS7KQ1J502TrPfF8eCZ2lF6AfKuMP/32YgDakiwIyYTDjEQS/v0nKLSFcncHRMtg==", "requires": { - "@discordjs/collection": "^1.0.0", + "@discordjs/collection": "^1.0.1", "@sapphire/async-queue": "^1.3.2", "@sapphire/snowflake": "^3.2.2", - "discord-api-types": "^0.36.2", - "file-type": "^17.1.2", + "discord-api-types": "^0.36.3", + "file-type": "^17.1.4", "tslib": "^2.4.0", - "undici": "^5.7.0" + "undici": "^5.8.0" }, "dependencies": { - "@discordjs/collection": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.0.0.tgz", - "integrity": "sha512-nAxDQYE5dNAzEGQ7HU20sujDsG5vLowUKCEqZkKUIlrXERZFTt/60zKUj/g4+AVCGeq+pXC5hivMaNtiC+PY5Q==" + "discord-api-types": { + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" } } }, "@discordjs/voice": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.10.0.tgz", - "integrity": "sha512-tChDKRRbKwWHcyq1dSEzrnuCMJyLtKXcFhgQpqcS2YjZ1TLlXboc/mhrR8jA1Yb1rB81u8dgj/lPkkHsk0ItEg==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.11.0.tgz", + "integrity": "sha512-6+9cj1dxzBJm7WJ9qyG2XZZQ8rcLl6x2caW0C0OxuTtMLAaEDntpb6lqMTFiBg/rDc4Rd59g1w0gJmib33CuHw==", "requires": { "@types/ws": "^8.5.3", - "discord-api-types": "^0.33.3", - "prism-media": "^1.3.2", - "tiny-typed-emitter": "^2.1.0", + "discord-api-types": "^0.36.2", + "prism-media": "^1.3.4", "tslib": "^2.4.0", - "ws": "^8.7.0" + "ws": "^8.8.1" }, "dependencies": { "discord-api-types": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz", - "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" + }, + "prism-media": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.4.tgz", + "integrity": "sha512-eW7LXORkTCQznZs+eqe9VjGOrLBxcBPXgNyHXMTSRVhphvd/RrxgIR7WaWt4fkLuhshcdT5KHL88LAfcvS3f5g==", + "requires": {} } } }, @@ -5047,21 +4951,6 @@ "spotify-web-api-node": "^5.0.2" } }, - "@distube/youtube-dl": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@distube/youtube-dl/-/youtube-dl-2.2.4.tgz", - "integrity": "sha512-rGmnVqNF6LjGb5zpSLicLgeK9MbIJ/wOJ6Zl5g9V44Cnfkxfk76VNtzd9wNp3JPdWPa9aD9HUsMA4H72Z9ZoiQ==", - "requires": { - "dargs": "~7.0.0", - "execa": "~5.1.1", - "get-stream": "~6.0.1", - "got": "~11.8.2", - "is-unix": "~1.0.0", - "mkdirp": "~1.0.4", - "p-event": "~4.2.0", - "p-reflect": "~2.1.0" - } - }, "@distube/yt-dlp": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@distube/yt-dlp/-/yt-dlp-1.1.3.tgz", @@ -5092,11 +4981,11 @@ } }, "@distube/ytsr": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/@distube/ytsr/-/ytsr-1.1.5.tgz", - "integrity": "sha512-nSYsB+UYw0FXSivJ49MGkES41Gfg5rgavil9nOHra0yCsGiY4qsDzpoFVjCmbpKQ6GDUq4Z/8LOwZakgpH3N1A==", + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/@distube/ytsr/-/ytsr-1.1.8.tgz", + "integrity": "sha512-/6pVd9Hiu6EbjPbbC4PKckse957LMiCYYwULWH7Ctovbc/mdPz9pT7hsFIBqx1vLXOYj6osbcfkCCbhhegSBDg==", "requires": { - "miniget": "^4.2.1" + "miniget": "^4.2.2" } }, "@eslint/eslintrc": { @@ -5133,13 +5022,6 @@ "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", "dev": true }, - "@k3rn31p4nic/google-translate-api": { - "version": "git+ssh://git@github.com/k3rn31p4nic/google-translate-api.git#363662416a4f33238c8dcb4e89bba5c4baae9df9", - "from": "@k3rn31p4nic/google-translate-api@github:k3rn31p4nic/google-translate-api", - "requires": { - "got": "^11.8.2" - } - }, "@mapbox/node-pre-gyp": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.8.tgz", @@ -5205,14 +5087,6 @@ } } }, - "@szmarczak/http-timer": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-4.0.6.tgz", - "integrity": "sha512-4BAffykYOgO+5nzBWYwE3W90sBgLJoUPRWWcL8wlyiM8IB8ipJz3UMJ9KXQd1RKQXpKp8Tutn80HZtWsu2u76w==", - "requires": { - "defer-to-connect": "^2.0.0" - } - }, "@tokenizer/token": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", @@ -5265,9 +5139,9 @@ "integrity": "sha512-YofkM6fGv4gDJq78g4j0mMuGMkZVxZDgtU0JRdx6FgiJDG+0fY0GKVolOV8WqVmEhLCXkQRjwDdKyPxJp/uucg==" }, "@types/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.2.tgz", + "integrity": "sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==", "requires": { "@types/node": "*", "form-data": "^3.0.0" @@ -5572,11 +5446,6 @@ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.1.tgz", "integrity": "sha512-dWe4nWO/ruEOY7HkUJ5gFt1DCFV9zPRoJr8pV0/ASQermOZjtq8jMjOprC0Kd10GLN+l7xaUPvxzJFWtxGu8Fg==" }, - "cacheable-lookup": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", - "integrity": "sha512-2/kNscPhpcxrOigMZzbiWF7dz8ilhb/nIHU3EyZiXWXpeq/au8qJ8VhdftMkty3n7Gj6HIGalQG8oiBNB3AJgA==" - }, "cacheable-request": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-7.0.2.tgz", @@ -5840,16 +5709,16 @@ "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz", "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==" }, + "customizable-discordjs-pagination": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/customizable-discordjs-pagination/-/customizable-discordjs-pagination-1.3.1.tgz", + "integrity": "sha512-6kjYOWKi+4zNs3Os3MvOi2ZqGFmMZgbhXOJRQszbEkAJTvpVtbhzPoDsU222QMk5HfmV2y10NOO9bjpDrRTS/w==" + }, "dargs": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==" }, - "dblapi.js": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/dblapi.js/-/dblapi.js-2.4.1.tgz", - "integrity": "sha512-g+u1inF/qOLit5qPK4hBGk5pKL1vy09uBLV+nukkRMvw2S9D1PyiyO70n4fboUXOgbExPp6Sho/Y782OqQOUiQ==" - }, "debug": { "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", @@ -5891,10 +5760,10 @@ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true }, - "deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==" + "deepmerge-ts": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/deepmerge-ts/-/deepmerge-ts-4.2.1.tgz", + "integrity": "sha512-xzJLiUo4z1dD2nggSfaMvHo5qWLoy/JVa9rKuktC6FrQQEBI8Qnj7KwuCYZhqBoGOOpGqs6+3MR2ZhSMcTr4BA==" }, "defer-to-connect": { "version": "2.0.1", @@ -5932,32 +5801,19 @@ "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" }, "discord-api-types": { - "version": "0.36.3", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", - "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" - }, - "discord-backup": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/discord-backup/-/discord-backup-3.2.1.tgz", - "integrity": "sha512-eCarIkZzl7eJ/wlr5JqnRF25oyFf61UQsgtqhqHOE+8S26o/QboOcNGhCxYV07vPZQyhJ3i/6WwKJggMGxNZcQ==", - "requires": { - "discord.js": "^13.6.0" - } + "version": "0.37.0", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.0.tgz", + "integrity": "sha512-6LlL0xceiZs/kQ5PeKe5inkcjR73vagt3oACsP/C5IWKjXfzLGKrXn6yRYgiHIeJyFZ1xVPRJYE4W/u8UTT4ig==" }, "discord-giveaways": { - "version": "git+ssh://git@github.com/Androz2091/discord-giveaways.git#b6b0f3771ede7934c0ce2da373338853034262c6", - "from": "discord-giveaways@github:Androz2091/discord-giveaways#develop", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/discord-giveaways/-/discord-giveaways-6.0.0.tgz", + "integrity": "sha512-Ii6LAy0XooFjlffNabpyzN1CxWz3W2nmQ+6cLUxRUTXBMdq2gsk9d15lXBTvyG01kxF6Ko6f7EZEb9D83Rrrvw==", "requires": { - "deepmerge": "^4.2.2", - "discord.js": "^13.5.0", + "deepmerge-ts": "^4.2.1", "serialize-javascript": "^6.0.0" } }, - "discord-paginationembed": { - "version": "git+ssh://git@github.com/gazmull/discord-paginationembed.git#cd7de9493d11d9db2a8ae15647937e11bc0f7b60", - "from": "discord-paginationembed@github:gazmull/discord-paginationembed#v3", - "requires": {} - }, "discord-together": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/discord-together/-/discord-together-1.3.3.tgz", @@ -5965,55 +5821,92 @@ "requires": { "discord.js": "^13.1.0", "node-fetch": "^2.6.1" - } - }, - "discord.js": { - "version": "13.8.1", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.8.1.tgz", - "integrity": "sha512-jOsD+4tEZWWx0RHVyH+FBcqoTrsL+d5Mm5p+ULQOdU0qSaxhLNkWYig+yDHNZoND7nlkXX3qi+BW+gO5erWylg==", - "requires": { - "@discordjs/builders": "^0.14.0", - "@discordjs/collection": "^0.7.0", - "@sapphire/async-queue": "^1.3.1", - "@types/node-fetch": "^2.6.1", - "@types/ws": "^8.5.3", - "discord-api-types": "^0.33.3", - "form-data": "^4.0.0", - "node-fetch": "^2.6.1", - "ws": "^8.7.0" }, "dependencies": { "@discordjs/builders": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.14.0.tgz", - "integrity": "sha512-+fqLIqa9wN3R+kvlld8sgG0nt04BAZxdCDP4t2qZ9TJsquLWA+xMtT8Waibb3d4li4AQS+IOfjiHAznv/dhHgQ==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-0.16.0.tgz", + "integrity": "sha512-9/NCiZrLivgRub2/kBc0Vm5pMBE5AUdYbdXsLu/yg9ANgvnaJ0bZKTY8yYnLbsEc/LYUP79lEIdC73qEYhWq7A==", "requires": { - "@sapphire/shapeshift": "^3.1.0", - "@sindresorhus/is": "^4.6.0", - "discord-api-types": "^0.33.3", + "@sapphire/shapeshift": "^3.5.1", + "discord-api-types": "^0.36.2", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.1", "tslib": "^2.4.0" } }, + "@discordjs/collection": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-0.7.0.tgz", + "integrity": "sha512-R5i8Wb8kIcBAFEPLLf7LVBQKBDYUL+ekb23sOgpkpyGT+V4P7V83wTxcsqmX+PbqHt4cEHn053uMWfRqh/Z/nA==" + }, "discord-api-types": { - "version": "0.33.5", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz", - "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" + }, + "discord.js": { + "version": "13.9.2", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-13.9.2.tgz", + "integrity": "sha512-wShFlyAyxgQcWzINeufUoT1U0fmju+pPCRzPfJB7CaA0V1tQHc4e0PpO4NQif8sLfZvrQmEILBaIJ0G5I32OxQ==", + "requires": { + "@discordjs/builders": "^0.16.0", + "@discordjs/collection": "^0.7.0", + "@sapphire/async-queue": "^1.3.2", + "@types/node-fetch": "^2.6.2", + "@types/ws": "^8.5.3", + "discord-api-types": "^0.33.3", + "form-data": "^4.0.0", + "node-fetch": "^2.6.7", + "ws": "^8.8.1" + }, + "dependencies": { + "discord-api-types": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.33.5.tgz", + "integrity": "sha512-dvO5M52v7m7Dy96+XUnzXNsQ/0npsYpU6dL205kAtEDueswoz3aU3bh1UMoK4cQmcGtB1YRyLKqp+DXi05lzFg==" + } + } + } + } + }, + "discord.js": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.1.1.tgz", + "integrity": "sha512-6Oa2f+Y0+s6B5HTTqcAP7Z6tUmguNTKpzbuTmE1JIeT/aUTr9dVe397D/bvcBSRpJERQzMyEWyEiVQnMRHcx4A==", + "requires": { + "@discordjs/builders": "^1.1.0", + "@discordjs/collection": "^1.0.1", + "@discordjs/rest": "^1.0.1", + "@sapphire/snowflake": "^3.2.2", + "@types/ws": "^8.5.3", + "discord-api-types": "^0.36.3", + "fast-deep-equal": "^3.1.3", + "lodash.snakecase": "^4.1.1", + "tslib": "^2.4.0", + "undici": "^5.8.0", + "ws": "^8.8.1" + }, + "dependencies": { + "discord-api-types": { + "version": "0.36.3", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.36.3.tgz", + "integrity": "sha512-bz/NDyG0KBo/tY14vSkrwQ/n3HKPf87a0WFW/1M9+tXYK+vp5Z5EksawfCWo2zkAc6o7CClc0eff1Pjrqznlwg==" } } }, "distube": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/distube/-/distube-3.3.4.tgz", - "integrity": "sha512-izJFDL1dfTzPgTXZbGavyDXDnodkuykVGFSWuFPL9EY83et/qhjQFosLwYoWTJWQN8tG6KPUc5wPi4EZxxy/4g==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/distube/-/distube-4.0.3.tgz", + "integrity": "sha512-EMR/4d1EgNtNIdTPhwBOtVKqkPX1YJBB4JwPymWIX/i6ip0451X+vZGwJamP2LFh46Usssay0ty+Dm1U0/jQ1g==", "requires": { - "@distube/youtube-dl": "^2.2.4", - "@distube/ytdl-core": "^4.11.1", + "@distube/ytdl-core": "^4.11.3", "@distube/ytpl": "^1.1.1", - "@distube/ytsr": "^1.1.5", + "@distube/ytsr": "^1.1.8", "prism-media": "https://codeload.github.com/distubejs/prism-media/tar.gz/main#workaround.tar.gz", - "tiny-typed-emitter": "^2.1.0" + "tiny-typed-emitter": "^2.1.0", + "tslib": "^2.4.0", + "undici": "^5.8.0" } }, "doctrine": { @@ -6442,11 +6335,6 @@ "progress": "^2.0.3" } }, - "figlet": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/figlet/-/figlet-1.5.2.tgz", - "integrity": "sha512-WOn21V8AhyE1QqVfPIVxe3tupJacq1xGkPTB4iagT6o+P2cAgEOOwIxMftr4+ZCTI6d551ij9j61DFr0nsP2uQ==" - }, "file-entry-cache": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", @@ -6457,12 +6345,12 @@ } }, "file-type": { - "version": "17.1.3", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.3.tgz", - "integrity": "sha512-MFVSozBIhvnx2dkxlf+010Xqn6+ojlMUT9LXQiPNoOijgRtXNMghWdGK0u2o1RoCqzHoVsw65IL8ZBcQ4MhIrw==", + "version": "17.1.4", + "resolved": "https://registry.npmjs.org/file-type/-/file-type-17.1.4.tgz", + "integrity": "sha512-3w/rJUUPBj6CYhVER3D5JCKwYJJiC36uj5dP+LnyubHI6H6FJo1TeWVCEA09YLVoZqV3/mLP26j9+Pz1GjAyjQ==", "requires": { "readable-web-to-node-stream": "^3.0.2", - "strtok3": "^7.0.0-alpha.7", + "strtok3": "^7.0.0-alpha.9", "token-types": "^5.0.0-alpha.2" } }, @@ -6766,24 +6654,6 @@ "type-fest": "^0.20.2" } }, - "got": { - "version": "11.8.3", - "resolved": "https://registry.npmjs.org/got/-/got-11.8.3.tgz", - "integrity": "sha512-7gtQ5KiPh1RtGS9/Jbv1ofDpBFuq42gyfEib+ejaRBJuj/3tQFeR5+gw57e4ipaU8c/rCjvX6fkQz2lyDlGAOg==", - "requires": { - "@sindresorhus/is": "^4.0.0", - "@szmarczak/http-timer": "^4.0.5", - "@types/cacheable-request": "^6.0.1", - "@types/responselike": "^1.0.0", - "cacheable-lookup": "^5.0.3", - "cacheable-request": "^7.0.2", - "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.5.2", - "lowercase-keys": "^2.0.0", - "p-cancelable": "^2.0.0", - "responselike": "^2.0.0" - } - }, "graceful-readlink": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", @@ -6847,15 +6717,6 @@ } } }, - "http2-wrapper": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-1.0.3.tgz", - "integrity": "sha512-V+23sDMr12Wnz7iTcDeJr3O6AIxlnvT/bmaAAAP/Xda35C90p9599p0F1eHR/N1KILWSoWVAiOMFjBBXaXSMxg==", - "requires": { - "quick-lru": "^5.1.1", - "resolve-alpn": "^1.0.0" - } - }, "https-proxy-agent": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", @@ -6982,11 +6843,6 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" }, - "is-unix": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-unix/-/is-unix-1.0.1.tgz", - "integrity": "sha512-8Iu9y/xCBmg1uwWV3J/jNl3udPHPAYyqGv4OKE/70O10U2qmt1v3/SRhSAW5+GiRpU2yZEnl+z1Oxm4A8arVrA==" - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -7073,11 +6929,6 @@ "resolved": "https://registry.npmjs.org/javascript-natural-sort/-/javascript-natural-sort-0.7.1.tgz", "integrity": "sha1-+eIwPUUH9tdDVac2ZNFED7Wg71k=" }, - "js-string-cleaner": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/js-string-cleaner/-/js-string-cleaner-1.2.0.tgz", - "integrity": "sha512-nasV4rj3sgD43GvkwhyBM63eQH6I+4AYfsORISI2G+StTeRhK5sZq95PIvz9oURIFNs6KZmDRN8zBPlVHwuLrw==" - }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -7142,19 +6993,6 @@ "type-check": "~0.4.0" } }, - "libsodium": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.9.tgz", - "integrity": "sha512-gfeADtR4D/CM0oRUviKBViMGXZDgnFdMKMzHsvBdqLBHd9ySi6EtYnmuhHVDDYgYpAO8eU8hEY+F8vIUAPh08A==" - }, - "libsodium-wrappers": { - "version": "0.7.9", - "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.9.tgz", - "integrity": "sha512-9HaAeBGk1nKTRFRHkt7nzxqCvnkWTjn1pdjKgcUnZxj0FyOP4CnhgFhMdrFfgNsukijBGyBLpP2m2uKT1vuWhQ==", - "requires": { - "libsodium": "^0.7.0" - } - }, "lodash.deburr": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/lodash.deburr/-/lodash.deburr-4.1.0.tgz", @@ -7165,6 +7003,11 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==" + }, "lodash.truncate": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", @@ -7480,9 +7323,9 @@ "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, "node-addon-api": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.2.0.tgz", - "integrity": "sha512-eazsqzwG2lskuzBqCGPi7Ac2UgOoMz8JVOXVhTvvPDYhthvNpefx8jWD8Np7Gv+2Sz0FlPWZk0nJV0z598Wn8Q==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.0.0.tgz", + "integrity": "sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA==" }, "node-fetch": { "version": "2.6.7", @@ -7585,37 +7428,6 @@ "word-wrap": "^1.2.3" } }, - "p-cancelable": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", - "integrity": "sha512-BZOr3nRQHOntUjTrH8+Lh54smKHoHyur8We1V8DSMVrl5A2malOOwuJRnKRDjSnkoeBh4at6BwEnb5I7Jl31wg==" - }, - "p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", - "requires": { - "p-timeout": "^3.1.0" - } - }, - "p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" - }, - "p-reflect": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-reflect/-/p-reflect-2.1.0.tgz", - "integrity": "sha512-paHV8NUz8zDHu5lhr/ngGWQiW067DK/+IbJ+RfZ4k+s8y4EKyYCz8pGYWjxCg35eHztpJAt+NUgvN4L+GCbPlg==" - }, - "p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "requires": { - "p-finally": "^1.0.0" - } - }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -7675,8 +7487,7 @@ "dev": true }, "prism-media": { - "version": "1.3.3", - "resolved": "https://codeload.github.com/distubejs/prism-media/tar.gz/main#workaround.tar.gz", + "version": "https://codeload.github.com/distubejs/prism-media/tar.gz/main#workaround.tar.gz", "integrity": "sha512-2a/62b86i60OksrnliRwG7IGMHjFHM0KiRYk6YBi43IZpCZCf/ZLjXIbMGtzzeTZhEJy1Fi6Ke6kKtn2ObNjPw==", "requires": {} }, @@ -8104,11 +7915,6 @@ } } }, - "string-sanitizer": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string-sanitizer/-/string-sanitizer-1.1.1.tgz", - "integrity": "sha512-ZaqlidMholFiBaKDPPVf9cJjNo6iRhP6g/ei5qTgvzKEMa8TK/nu4hM90YZ2LvfjvAomF2LIexmOlX1MvYN+ug==" - }, "string-to-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string-to-stream/-/string-to-stream-1.1.1.tgz", @@ -8148,9 +7954,9 @@ "dev": true }, "strtok3": { - "version": "7.0.0-alpha.8", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.8.tgz", - "integrity": "sha512-u+k19v+rTxBjGYxncRQjGvZYwYvEd0uP3D+uHKe/s4WB1eXS5ZwpZsTlBu5xSS4zEd89mTXECXg6WW3FSeV8cA==", + "version": "7.0.0-alpha.9", + "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0-alpha.9.tgz", + "integrity": "sha512-G8WxjBFjTZ77toVElv1i7k3jCXNkBB14FVaZ/6LIOka/WGo4La5XHLrU7neFVLdKbXESZf4BejVKZu5maOmocA==", "requires": { "@tokenizer/token": "^0.3.0", "peek-readable": "^5.0.0-alpha.5" @@ -8439,9 +8245,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { - "version": "8.7.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.7.0.tgz", - "integrity": "sha512-c2gsP0PRwcLFzUiA8Mkr37/MI7ilIlHQxaEAtd0uNMbVMoy8puJyafRlm0bV9MbGSabUPeLrRRaqIBcFcA2Pqg==", + "version": "8.8.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.8.1.tgz", + "integrity": "sha512-bGy2JzvzkPowEJV++hF07hAD6niYSr0JzBNo/J29WsB57A2r7Wlc1UFcTR9IzrPvuNVO4B8LGqF8qcpsVOhJCA==", "requires": {} }, "xmlbuilder": { diff --git a/package.json b/package.json index f7a0a038..bb1f5148 100644 --- a/package.json +++ b/package.json @@ -9,18 +9,16 @@ "lint": "eslint . --ext .js", "testcfg": "node scripts/verify-config.js" }, - "author": "Jonny_Bro", + "author": "Jonny_Bro#4226", "license": "ISC", "dependencies": { - "@discordjs/builders": "^1.0.0", - "@discordjs/opus": "^0.7.0", + "@discordjs/opus": "^0.8.0", "@discordjs/rest": "^1.0.0", - "@discordjs/voice": "^0.10.0", + "@discordjs/voice": "^0.11.0", "@distube/soundcloud": "^1.2.1", "@distube/spotify": "^1.3.2", "@distube/yt-dlp": "^1.1.3", "@distube/ytdl-core": "^4.11.3", - "@k3rn31p4nic/google-translate-api": "github:k3rn31p4nic/google-translate-api", "@sindresorhus/slugify": "^1.1.0", "amethyste-api": "github:Androz2091/amethyste-api", "btoa": "^1.2.1", @@ -29,31 +27,25 @@ "chalk": "^4.1.0", "colors-generator": "^0.3.4", "cron": "^1.7.2", - "dblapi.js": "^2.3.0", - "discord-api-types": "^0.36.3", - "discord-backup": "^3.2.1", - "discord-giveaways": "github:Androz2091/discord-giveaways#develop", - "discord-paginationembed": "github:gazmull/discord-paginationembed#v3", + "customizable-discordjs-pagination": "^1.3.1", + "discord-api-types": "^0.37.0", + "discord-giveaways": "^6.0.0", "discord-together": "^1.3.3", - "discord.js": "^13.8.1", - "distube": "^3.3.4", + "discord.js": "^14.1.1", + "distube": "^4.0.3", "ejs": "^3.1.3", "express": "^4.17.1", "express-session": "^1.17.0", "ffmpeg-static": "^4.4.0", - "figlet": "^1.5.0", "gamedig": "^4.0.2", "i18next": "^20.2.2", "i18next-node-fs-backend": "^2.1.3", - "js-string-cleaner": "^1.0.3", - "libsodium-wrappers": "^0.7.9", "markdown-table": "2.0.0", "mathjs": "^9.0.0", "md5": "^2.2.1", "moment": "^2.26.0", "mongoose": "^5.13.14", - "ms": "^2.1.3", - "string-sanitizer": "^1.1.1" + "ms": "^2.1.3" }, "devDependencies": { "eslint": "^7.5.0" diff --git a/scripts/verify-config.js b/scripts/verify-config.js index ea6c39c6..ea518f50 100644 --- a/scripts/verify-config.js +++ b/scripts/verify-config.js @@ -1,5 +1,5 @@ /* eslint-disable no-async-promise-executor */ -const { Intents } = require("discord.js"), +const { GatewayIntentBits } = require("discord.js"), config = require("../config"), fetch = require("node-fetch"), chalk = require("chalk"), @@ -23,7 +23,7 @@ const checks = [ console.log("\n\nDiscord Bot"); return new Promise((res) => { const Discord = require("discord.js"); - const client = new Discord.Client({ intents: Object.keys(Intents.FLAGS) }); + const client = new Discord.Client({ intents: [ GatewayIntentBits.Guilds ] }); let readyResolve; new Promise((resolve) => readyResolve = resolve); client.login(config.token).then(async () => {