From 36ae370d512fe9802af614967945c442895c680d Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Sat, 12 Aug 2023 20:08:55 +0100 Subject: [PATCH 01/29] pass user.id instead of user --- src/commands/moderation/slash/purge.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/moderation/slash/purge.js b/src/commands/moderation/slash/purge.js index 9ee04f14c..4ab2d3a2d 100644 --- a/src/commands/moderation/slash/purge.js +++ b/src/commands/moderation/slash/purge.js @@ -186,7 +186,7 @@ module.exports = { case "user": { const user = interaction.options.getUser("user"); - response = await purgeMessages(member, channel, "USER", amount, user); + response = await purgeMessages(member, channel, "USER", amount, user.id); break; } From b96bf9068422d458a901bed22696214e369ad1f7 Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Sat, 12 Aug 2023 20:23:46 +0100 Subject: [PATCH 02/29] fix messages to delete for each type classic way is only good for "ALL" it was taking last "amount" messages sent in channel and delete the element which achieves one of the purge types condition but it doesn't delete everything correctly sometimes when messages are mixed so this one takes all messages and fiter amount of them --- src/helpers/ModUtils.js | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/src/helpers/ModUtils.js b/src/helpers/ModUtils.js index 67e0c8b7a..52d434f21 100644 --- a/src/helpers/ModUtils.js +++ b/src/helpers/ModUtils.js @@ -178,7 +178,38 @@ module.exports = class ModUtils { const toDelete = new Collection(); try { - const messages = await channel.messages.fetch({ limit: amount, cache: false, force: true }); + let messages; + switch(type) { + case "ALL": + messages = await channel.messages.fetch({ limit: amount, cache: false, force: true }); + break; + case "BOT": { + messages = await channel.messages.fetch({cache: false, force: true }); + messages = messages.filter(message => message.author.bot).first(amount); + break; + } + case "LINK": { + messages = await channel.messages.fetch({cache: false, force: true }); + messages = messages.filter(message => containsLink(message.content)).first(amount); + break; + } + case "TOKEN": { + messages = await channel.messages.fetch({cache: false, force: true }); + messages = messages.filter(message => message.content.includes(argument)).first(amount); + break; + } + case "ATTACHMENT": { + messages = await channel.messages.fetch({cache: false, force: true }); + messages = messages.filter(message => message.attachments.size > 0).first(amount); + break; + } + case "USER": { + messages = await channel.messages.fetch({cache: false, force: true }); + messages = messages.filter(message => message.author.id === argument).first(amount); + console.log(messages) + break; + } + } for (const message of messages.values()) { if (toDelete.size >= amount) break; From 5cf08fc25b2ecbfa7d8842c2b9d6c350fed5f6c4 Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Sun, 13 Aug 2023 07:11:34 +0100 Subject: [PATCH 03/29] Remove test console.log --- src/helpers/ModUtils.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/helpers/ModUtils.js b/src/helpers/ModUtils.js index 52d434f21..ebbb35014 100644 --- a/src/helpers/ModUtils.js +++ b/src/helpers/ModUtils.js @@ -206,7 +206,6 @@ module.exports = class ModUtils { case "USER": { messages = await channel.messages.fetch({cache: false, force: true }); messages = messages.filter(message => message.author.id === argument).first(amount); - console.log(messages) break; } } From fda37dabc0bbc9469644b311ba778279471e5345 Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Sun, 20 Aug 2023 00:33:00 +0900 Subject: [PATCH 04/29] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 866c32280..d09452399 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "country-emoji-languages": "^1.0.0", "discord-giveaways": "^6.0.1", "discord-together": "^1.3.31", - "discord.js": "^14.11.0", + "discord.js": "^14.13.0", "dotenv": "^16.3.1", "ejs": "^3.1.9", "enhanced-ms": "^2.3.0", From 5f0bad58234c59ada79df8edc8882e415dcdde75 Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Sun, 20 Aug 2023 00:40:32 +0900 Subject: [PATCH 05/29] add custom status examples --- config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 1b735f903..b36a58e53 100644 --- a/config.js +++ b/config.js @@ -105,8 +105,8 @@ module.exports = { PRESENCE: { ENABLED: false, // Whether or not the bot should update its status STATUS: "online", // The bot's status [online, idle, dnd, invisible] - TYPE: "WATCHING", // Status type for the bot [PLAYING | LISTENING | WATCHING | COMPETING] - MESSAGE: "{members} members in {servers} servers", // Your bot status message + TYPE: "WATCHING", // Status type for the bot [ CUSTOM | PLAYING | LISTENING | WATCHING | COMPETING ] + MESSAGE: "{members} members in {servers} servers", // Your bot status message (note: in custom status type you won't have "Playing", "Listening", "Competing" prefix) }, STATS: { From 326bab35c1453384a9c8d6190caa647d8a8b310b Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Sun, 20 Aug 2023 00:41:28 +0900 Subject: [PATCH 06/29] Handle custom presence type --- src/handlers/presence.js | 101 +++++++++++++++++++++++++++++++++++---- 1 file changed, 91 insertions(+), 10 deletions(-) diff --git a/src/handlers/presence.js b/src/handlers/presence.js index 7be835386..7f93e7b7e 100644 --- a/src/handlers/presence.js +++ b/src/handlers/presence.js @@ -11,7 +11,9 @@ function updatePresence(client) { } if (message.includes("{members}")) { - const members = client.guilds.cache.map((g) => g.memberCount).reduce((partial_sum, a) => partial_sum + a, 0); + const members = client.guilds.cache + .map((g) => g.memberCount) + .reduce((partial_sum, a) => partial_sum + a, 0); message = message.replaceAll("{members}", members); } @@ -28,18 +30,97 @@ function updatePresence(client) { case "WATCHING": return ActivityType.Watching; + case "CUSTOM": + return ActivityType.Custom; } }; - client.user.setPresence({ - status: client.config.PRESENCE.STATUS, - activities: [ - { - name: message, - type: getType(client.config.PRESENCE.TYPE), - }, - ], - }); + if(client.config.PRESENCE.TYPE === "CUSTOM") { + client.user.setPresence({ + status: client.config.PRESENCE.STATUS, + activities: [ + { + name: message, + state: message, + type: getType(client.config.PRESENCE.TYPE), + }, + ], + }); + } else { + client.user.setPresence({ + status: client.config.PRESENCE.STATUS, + activities: [ + { + name: message, + type: getType(client.config.PRESENCE.TYPE), + }, + ], + }); + } +} + +module.exports = function handlePresence(client) { + updatePresence(client); + setInterval(() => updatePresence(client), 10 * 60 * 1000); +};const { ActivityType } = require("discord.js"); + +/** + * @param {import('@src/structures').BotClient} client + */ +function updatePresence(client) { + let message = client.config.PRESENCE.MESSAGE; + + if (message.includes("{servers}")) { + message = message.replaceAll("{servers}", client.guilds.cache.size); + } + + if (message.includes("{members}")) { + const members = client.guilds.cache + .map((g) => g.memberCount) + .reduce((partial_sum, a) => partial_sum + a, 0); + message = message.replaceAll("{members}", members); + } + + const getType = (type) => { + switch (type) { + case "COMPETING": + return ActivityType.Competing; + + case "LISTENING": + return ActivityType.Listening; + + case "PLAYING": + return ActivityType.Playing; + + case "WATCHING": + return ActivityType.Watching; + case "CUSTOM": + return ActivityType.Custom; + } + }; + + if(client.config.PRESENCE.TYPE === "CUSTOM") { + client.user.setPresence({ + status: client.config.PRESENCE.STATUS, + activities: [ + { + name: message, + state: message, + type: getType(client.config.PRESENCE.TYPE), + }, + ], + }); + } else { + client.user.setPresence({ + status: client.config.PRESENCE.STATUS, + activities: [ + { + name: message, + type: getType(client.config.PRESENCE.TYPE), + }, + ], + }); + } } module.exports = function handlePresence(client) { From cd1a64c53c3a2f704deab1ab5b145cf5bf1de19e Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Mon, 4 Dec 2023 22:31:58 +0900 Subject: [PATCH 07/29] Fix dublicated code --- src/handlers/presence.js | 65 +--------------------------------------- 1 file changed, 1 insertion(+), 64 deletions(-) diff --git a/src/handlers/presence.js b/src/handlers/presence.js index 7f93e7b7e..e7ff4ed4c 100644 --- a/src/handlers/presence.js +++ b/src/handlers/presence.js @@ -30,70 +30,7 @@ function updatePresence(client) { case "WATCHING": return ActivityType.Watching; - case "CUSTOM": - return ActivityType.Custom; - } - }; - - if(client.config.PRESENCE.TYPE === "CUSTOM") { - client.user.setPresence({ - status: client.config.PRESENCE.STATUS, - activities: [ - { - name: message, - state: message, - type: getType(client.config.PRESENCE.TYPE), - }, - ], - }); - } else { - client.user.setPresence({ - status: client.config.PRESENCE.STATUS, - activities: [ - { - name: message, - type: getType(client.config.PRESENCE.TYPE), - }, - ], - }); - } -} - -module.exports = function handlePresence(client) { - updatePresence(client); - setInterval(() => updatePresence(client), 10 * 60 * 1000); -};const { ActivityType } = require("discord.js"); - -/** - * @param {import('@src/structures').BotClient} client - */ -function updatePresence(client) { - let message = client.config.PRESENCE.MESSAGE; - - if (message.includes("{servers}")) { - message = message.replaceAll("{servers}", client.guilds.cache.size); - } - - if (message.includes("{members}")) { - const members = client.guilds.cache - .map((g) => g.memberCount) - .reduce((partial_sum, a) => partial_sum + a, 0); - message = message.replaceAll("{members}", members); - } - - const getType = (type) => { - switch (type) { - case "COMPETING": - return ActivityType.Competing; - - case "LISTENING": - return ActivityType.Listening; - - case "PLAYING": - return ActivityType.Playing; - - case "WATCHING": - return ActivityType.Watching; + case "CUSTOM": return ActivityType.Custom; } From c80ecc4212929e34ab55d56ed80fef1aa9e3dd19 Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Sat, 13 Jan 2024 00:41:41 +0900 Subject: [PATCH 08/29] remove old files from cache --- src/structures/BotClient.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/structures/BotClient.js b/src/structures/BotClient.js index 5cec62ebf..907febc0b 100644 --- a/src/structures/BotClient.js +++ b/src/structures/BotClient.js @@ -175,6 +175,7 @@ module.exports = class BotClient extends Client { const files = recursiveReadDirSync(directory); for (const file of files) { try { + delete require.cache[require.resolve(file)]; const cmd = require(file); if (typeof cmd !== "object") continue; validateCommand(cmd); @@ -198,6 +199,7 @@ module.exports = class BotClient extends Client { const files = recursiveReadDirSync(directory); for (const file of files) { try { + delete require.cache[require.resolve(file)]; const ctx = require(file); if (typeof ctx !== "object") continue; validateContext(ctx); From 585ac44e2b4a51d82ad37d609ec7c18402c2cd60 Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Fri, 26 Jan 2024 01:31:57 +0900 Subject: [PATCH 09/29] Fix /info user bug --- src/commands/information/slash/info.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/commands/information/slash/info.js b/src/commands/information/slash/info.js index b9aabe1d2..61d3bd488 100644 --- a/src/commands/information/slash/info.js +++ b/src/commands/information/slash/info.js @@ -92,9 +92,13 @@ module.exports = { // user if (sub === "user") { - let targetUser = interaction.options.getUser("name") || interaction.user; - let target = await interaction.guild.members.fetch(targetUser); - response = user(target); + try { + let targetUser = interaction.options.getUser("name") || interaction.user; + let target = await interaction.guild.members.fetch(targetUser); + response = user(target); + } catch(e) { + response = "It appears that the user is either invalid or not a member of this server." + } } // channel From 880ed4b4ddf7563f7afaff25c6bd45c95f6e7f79 Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Fri, 26 Jan 2024 01:34:28 +0900 Subject: [PATCH 10/29] Fix userinfo bug --- src/commands/information/message/userinfo.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/commands/information/message/userinfo.js b/src/commands/information/message/userinfo.js index 28f66c431..a998da36b 100644 --- a/src/commands/information/message/userinfo.js +++ b/src/commands/information/message/userinfo.js @@ -15,8 +15,13 @@ module.exports = { }, async messageRun(message, args) { - const target = (await message.guild.resolveMember(args[0])) || message.member; - const response = userInfo(target); + let response; + try { + const target = args.length > 0 ? (await message.guild.resolveMember(args[0])) : message.member; + response = userInfo(target); + } catch(e) { + response = "It appears that the user is either invalid or not a member of this server." + } await message.safeReply(response); }, }; From 764768359d70252ff6e73e07324c390cbfd1a756 Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Fri, 1 Mar 2024 20:18:39 +0900 Subject: [PATCH 11/29] Update purge.js --- src/commands/moderation/message/purge.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/moderation/message/purge.js b/src/commands/moderation/message/purge.js index dff1e8991..e62a62a49 100644 --- a/src/commands/moderation/message/purge.js +++ b/src/commands/moderation/message/purge.js @@ -22,7 +22,7 @@ module.exports = { if (parseInt(amount) > 99) return message.safeReply("The max amount of messages that I can delete is 99"); const { channel } = message; - const response = await purgeMessages(message.member, channel, "ALL", amount); + const response = await purgeMessages(message.member, channel, "ALL", amount + 1); if (typeof response === "number") { return channel.safeSend(`Successfully deleted ${response} messages`, 5); From 268ea4ecb1c71745763eec12ebfa69598dd9886b Mon Sep 17 00:00:00 2001 From: Twinkle069 <159515125+Twinkle069@users.noreply.github.com> Date: Thu, 21 Mar 2024 08:32:43 +0530 Subject: [PATCH 12/29] Fixed meme command --- src/commands/fun/meme.js | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/commands/fun/meme.js b/src/commands/fun/meme.js index de05f4879..a2e2c4491 100644 --- a/src/commands/fun/meme.js +++ b/src/commands/fun/meme.js @@ -117,30 +117,29 @@ async function getRandomEmbed(choice) { const subReddits = ["meme", "Memes_Of_The_Dank", "memes", "dankmemes"]; let rand = choice ? choice : subReddits[getRandomInt(subReddits.length)]; - const response = await getJson(`https://www.reddit.com/r/${rand}/random/.json`); - if (!response.success) { + const response = await getJson(`https://meme-api.com/gimme/${rand}`); + if (!response.success || !response.data) { return new EmbedBuilder().setColor(EMBED_COLORS.ERROR).setDescription("Failed to fetch meme. Try again!"); } const json = response.data; - if (!Array.isArray(json) || json.length === 0) { - return new EmbedBuilder().setColor(EMBED_COLORS.ERROR).setDescription(`No meme found matching ${choice}`); + if (!json.postLink || !json.url || !json.title || !json.ups) { + return new EmbedBuilder().setColor(EMBED_COLORS.ERROR).setDescription("Failed to fetch meme. Try again!"); } - try { - let permalink = json[0].data.children[0].data.permalink; - let memeUrl = `https://reddit.com${permalink}`; - let memeImage = json[0].data.children[0].data.url; - let memeTitle = json[0].data.children[0].data.title; - let memeUpvotes = json[0].data.children[0].data.ups; - let memeNumComments = json[0].data.children[0].data.num_comments; - - return new EmbedBuilder() - .setAuthor({ name: memeTitle, url: memeUrl }) - .setImage(memeImage) - .setColor("Random") - .setFooter({ text: `👍 ${memeUpvotes} | 💬 ${memeNumComments}` }); - } catch (error) { - return new EmbedBuilder().setColor(EMBED_COLORS.ERROR).setDescription("Failed to fetch meme. Try again!"); + // Check if the meme is marked as NSFW + if (json.nsfw === true) { + return new EmbedBuilder().setColor(EMBED_COLORS.ERROR).setDescription("This meme contains NSFW content"); } -} + + const memeUrl = json.postLink; + const memeImage = json.url; + const memeTitle = json.title; + const memeUpvotes = json.ups; + + return new EmbedBuilder() + .setAuthor({ name: memeTitle, url: memeUrl }) + .setImage(memeImage) + .setColor("Random") + .setFooter({ text: `👍 ${memeUpvotes}` }); + } From d9af5d66b87e4cab6ec412c7c4a9ef671d1d5182 Mon Sep 17 00:00:00 2001 From: Twinkle069 <159515125+Twinkle069@users.noreply.github.com> Date: Sun, 24 Mar 2024 07:28:10 +0530 Subject: [PATCH 13/29] minor changes --- src/commands/fun/meme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/fun/meme.js b/src/commands/fun/meme.js index a2e2c4491..5de9008e3 100644 --- a/src/commands/fun/meme.js +++ b/src/commands/fun/meme.js @@ -115,7 +115,7 @@ module.exports = { async function getRandomEmbed(choice) { const subReddits = ["meme", "Memes_Of_The_Dank", "memes", "dankmemes"]; - let rand = choice ? choice : subReddits[getRandomInt(subReddits.length)]; + let rand = choice ? choice : subReddits[getRandomInt(subReddits.length - 1)]; const response = await getJson(`https://meme-api.com/gimme/${rand}`); if (!response.success || !response.data) { @@ -124,7 +124,7 @@ async function getRandomEmbed(choice) { const json = response.data; if (!json.postLink || !json.url || !json.title || !json.ups) { - return new EmbedBuilder().setColor(EMBED_COLORS.ERROR).setDescription("Failed to fetch meme. Try again!"); + return new EmbedBuilder().setColor(EMBED_COLORS.ERROR).setDescription(`No meme found matching ${choice}`); } // Check if the meme is marked as NSFW From d5b2d7c9e736384f8958913486e2db98102958f3 Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Fri, 2 Aug 2024 22:02:40 +0900 Subject: [PATCH 14/29] Remove cache thing most pointless thing ever --- src/commands/information/leaderboard.js | 35 +------------------------ 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/commands/information/leaderboard.js b/src/commands/information/leaderboard.js index fef5174ab..b7c464685 100644 --- a/src/commands/information/leaderboard.js +++ b/src/commands/information/leaderboard.js @@ -78,18 +78,7 @@ module.exports = { }, }; -// Create a Map object to store cache entries -const cache = new Map(); - async function getXpLeaderboard({ guild }, author, settings) { - // Create a cache key using the guild ID and the type of leaderboard - const cacheKey = `${guild.id}:xp`; - - // Check if there is a cached result for this request - if (cache.has(cacheKey)) { - // Return the cached result if it exists - return cache.get(cacheKey); - } if (!settings.stats.enabled) return "The leaderboard is disabled on this server"; @@ -112,20 +101,10 @@ async function getXpLeaderboard({ guild }, author, settings) { .setDescription(collector) .setFooter({ text: `Requested by ${author.tag}` }); - // Store the result in the cache for future requests - cache.set(cacheKey, { embeds: [embed] }); return { embeds: [embed] }; } async function getInviteLeaderboard({ guild }, author, settings) { - // Create a cache key using the guild ID and the type of leaderboard - const cacheKey = `${guild.id}:invite`; - - // Check if there is a cached result for this request - if (cache.has(cacheKey)) { - // Return the cached result if it exists - return cache.get(cacheKey); - } if (!settings.invite.tracking) return "Invite tracking is disabled on this server"; @@ -151,21 +130,11 @@ async function getInviteLeaderboard({ guild }, author, settings) { .setColor(EMBED_COLORS.BOT_EMBED) .setDescription(collector) .setFooter({ text: `Requested by ${author.tag}` }); - - // Store the result in the cache for future requests - cache.set(cacheKey, { embeds: [embed] }); + return { embeds: [embed] }; } async function getRepLeaderboard(author) { - // Create a cache key using the user ID and the type of leaderboard - const cacheKey = `${author.id}:rep`; - - // Check if there is a cached result for this request - if (cache.has(cacheKey)) { - // Return the cached result if it exists - return cache.get(cacheKey); - } const lb = await getReputationLb(10); if (lb.length === 0) return "There are no users in the leaderboard"; @@ -186,7 +155,5 @@ async function getRepLeaderboard(author) { .setDescription(collector) .setFooter({ text: `Requested by ${author.tag}` }); - // Store the result in the cache for future requests - cache.set(cacheKey, { embeds: [embed] }); return { embeds: [embed] }; } From 32ee964b68d498970eea3f2b9e2d750929125597 Mon Sep 17 00:00:00 2001 From: Ghellab Abderrahmane <43763935+rhaym-tech@users.noreply.github.com> Date: Fri, 2 Aug 2024 22:09:52 +0900 Subject: [PATCH 15/29] Fix broken reputation leaderboard --- src/commands/information/leaderboard.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/commands/information/leaderboard.js b/src/commands/information/leaderboard.js index b7c464685..3129455b9 100644 --- a/src/commands/information/leaderboard.js +++ b/src/commands/information/leaderboard.js @@ -142,10 +142,10 @@ async function getRepLeaderboard(author) { let collector = ""; for (let i = 0; i < lb.length; i++) { try { - const user = await author.client.users.fetch(lb[i].member_id); - collector += `**#${(i + 1).toString()}** - ${escapeInlineCode(user.tag)} [${lb[i].rep}]\n`; + const user = await author.client.users.fetch(lb[i]._id); + collector += `**#${(i + 1).toString()}** - ${escapeInlineCode(user.tag)} [${lb[i].reputation.received}]\n`; } catch (ex) { - collector += `**#${(i + 1).toString()}** - DeletedUser#0000 [${lb[i].rep}]\n`; + collector += `**#${(i + 1).toString()}** - DeletedUser#0000 [${lb[i].reputation.received}]\n`; } } From e0fc2376405f70864448068d7d2ff8d900608ad1 Mon Sep 17 00:00:00 2001 From: Ishan Jaiswal <105939175+NavIshanOp@users.noreply.github.com> Date: Sat, 14 Sep 2024 20:33:40 +0530 Subject: [PATCH 16/29] Update search.js if your search result is more than 100 characters then it throws error. [So now it converst last three char to ...] --- src/commands/music/search.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/music/search.js b/src/commands/music/search.js index d3a3e8fb4..554c7e53a 100644 --- a/src/commands/music/search.js +++ b/src/commands/music/search.js @@ -154,7 +154,7 @@ async function search({ member, guild, channel }, query) { const results = res.tracks.slice(0, max); const options = results.map((result, index) => ({ - label: result.info.title, + label: result.info.title.length > 100 ? result.info.title.slice(0, 97) + '...' : result.info.title, // Truncate title value: index.toString(), })); From ff3c4aba33fa39bf7da50695b1bbbb0d12737757 Mon Sep 17 00:00:00 2001 From: snyk-bot Date: Sat, 12 Oct 2024 03:18:12 +0000 Subject: [PATCH 17/29] fix: package.json & package-lock.json to reduce vulnerabilities The following vulnerabilities are fixed with an upgrade: - https://snyk.io/vuln/SNYK-JS-COOKIE-8163060 --- package-lock.json | 330 +++++++++++++++++++++++++++++++--------------- package.json | 4 +- 2 files changed, 229 insertions(+), 105 deletions(-) diff --git a/package-lock.json b/package-lock.json index 84860170e..306c2b6ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,8 +23,8 @@ "dotenv": "^16.3.1", "ejs": "^3.1.9", "enhanced-ms": "^2.3.0", - "express": "^4.18.2", - "express-session": "^1.18.0", + "express": "^4.21.1", + "express-session": "^1.18.1", "fixedsize-map": "^1.0.1", "iso-639-1": "^3.1.0", "lavaclient": "^4.1.1", @@ -2019,21 +2019,21 @@ "license": "MIT" }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.3.tgz", + "integrity": "sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==", "license": "MIT", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", "http-errors": "2.0.0", "iconv-lite": "0.4.24", "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", + "qs": "6.13.0", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -2146,13 +2146,19 @@ } }, "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2297,18 +2303,18 @@ } }, "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "license": "MIT", "engines": { "node": ">= 0.6" } }, "node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.1.tgz", + "integrity": "sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -2383,6 +2389,23 @@ "node": ">=12.4.0" } }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -2502,7 +2525,7 @@ "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "license": "MIT" }, "node_modules/ejs": { @@ -2527,9 +2550,9 @@ "license": "MIT" }, "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -2561,10 +2584,31 @@ "nan": "^2.15.0" } }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", "license": "MIT" }, "node_modules/escape-string-regexp": { @@ -2770,7 +2814,7 @@ "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -2786,37 +2830,37 @@ } }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.21.1", + "resolved": "https://registry.npmjs.org/express/-/express-4.21.1.tgz", + "integrity": "sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ==", "license": "MIT", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.3", "content-disposition": "0.5.4", "content-type": "~1.0.4", - "cookie": "0.5.0", + "cookie": "0.7.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "2.0.0", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "etag": "~1.8.1", - "finalhandler": "1.2.0", + "finalhandler": "1.3.1", "fresh": "0.5.2", "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", + "merge-descriptors": "1.0.3", "methods": "~1.1.2", "on-finished": "2.4.1", "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", + "path-to-regexp": "0.1.10", "proxy-addr": "~2.0.7", - "qs": "6.11.0", + "qs": "6.13.0", "range-parser": "~1.2.1", "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", + "send": "0.19.0", + "serve-static": "1.16.2", "setprototypeof": "1.2.0", "statuses": "2.0.1", "type-is": "~1.6.18", @@ -2828,12 +2872,12 @@ } }, "node_modules/express-session": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.18.0.tgz", - "integrity": "sha512-m93QLWr0ju+rOwApSsyso838LQwgfs44QtOP/WBiwtAgPIo/SAh1a5c6nn2BR6mFNZehTpqKDESzP+fRHVbxwQ==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.18.1.tgz", + "integrity": "sha512-a5mtTqEaZvBCL9A9aqkrtfz+3SMDhOVUnjafjo+s7A9Txkq+SVX2DLvSp1Zrv4uCXa3lMSK3viWnh9Gg07PBUA==", "license": "MIT", "dependencies": { - "cookie": "0.6.0", + "cookie": "0.7.2", "cookie-signature": "1.0.7", "debug": "2.6.9", "depd": "~2.0.0", @@ -2847,9 +2891,9 @@ } }, "node_modules/express-session/node_modules/cookie": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.6.0.tgz", - "integrity": "sha512-U71cyTamuh1CRNCfpGY6to28lxvNwPG4Guz/EVjgf3Jmzv0vlDp1atT9eS5dDjMYHucpHbWns6Lwf3BKz6svdw==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -3047,13 +3091,13 @@ } }, "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.3.1.tgz", + "integrity": "sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==", "license": "MIT", "dependencies": { "debug": "2.6.9", - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "on-finished": "2.4.1", "parseurl": "~1.3.3", @@ -3149,7 +3193,7 @@ "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -3163,20 +3207,28 @@ "license": "ISC" }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "license": "MIT" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3232,6 +3284,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graphemer": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", @@ -3239,18 +3303,6 @@ "dev": true, "license": "MIT" }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "license": "MIT", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3260,6 +3312,30 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "license": "MIT", + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", @@ -3272,6 +3348,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/help-me": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/help-me/-/help-me-5.0.0.tgz", @@ -3685,10 +3773,13 @@ "license": "MIT" }, "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "license": "MIT" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.3.tgz", + "integrity": "sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } }, "node_modules/methods": { "version": "1.1.2", @@ -4075,10 +4166,13 @@ } }, "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", "license": "MIT", + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -4237,9 +4331,9 @@ } }, "node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", + "version": "0.1.10", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.10.tgz", + "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", "license": "MIT" }, "node_modules/peek-readable": { @@ -4427,12 +4521,12 @@ } }, "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "version": "6.13.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.0.tgz", + "integrity": "sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==", "license": "BSD-3-Clause", "dependencies": { - "side-channel": "^1.0.4" + "side-channel": "^1.0.6" }, "engines": { "node": ">=0.6" @@ -4496,9 +4590,9 @@ } }, "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", "license": "MIT", "dependencies": { "bytes": "3.1.2", @@ -4702,9 +4796,9 @@ } }, "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "version": "0.19.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.19.0.tgz", + "integrity": "sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==", "license": "MIT", "dependencies": { "debug": "2.6.9", @@ -4740,6 +4834,15 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "license": "MIT" }, + "node_modules/send/node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, "node_modules/send/node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -4756,20 +4859,37 @@ } }, "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "version": "1.16.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.16.2.tgz", + "integrity": "sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==", "license": "MIT", "dependencies": { - "encodeurl": "~1.0.2", + "encodeurl": "~2.0.0", "escape-html": "~1.0.3", "parseurl": "~1.3.3", - "send": "0.18.0" + "send": "0.19.0" }, "engines": { "node": ">= 0.8.0" } }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "license": "MIT", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -4800,14 +4920,18 @@ } }, "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5316,7 +5440,7 @@ "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "license": "MIT", "engines": { "node": ">= 0.8" diff --git a/package.json b/package.json index 724f5e389..8dd04e4f4 100644 --- a/package.json +++ b/package.json @@ -38,8 +38,8 @@ "dotenv": "^16.3.1", "ejs": "^3.1.9", "enhanced-ms": "^2.3.0", - "express": "^4.18.2", - "express-session": "^1.18.0", + "express": "^4.21.1", + "express-session": "^1.18.1", "fixedsize-map": "^1.0.1", "iso-639-1": "^3.1.0", "lavaclient": "^4.1.1", From cf3d723bf20341e26d40a6f52ab419740a5371dd Mon Sep 17 00:00:00 2001 From: saiteja-madha Date: Sun, 27 Oct 2024 14:59:00 -0700 Subject: [PATCH 18/29] bump up dependencies --- package-lock.json | 343 +++++++++++++++++++++++++--------------------- package.json | 28 ++-- 2 files changed, 202 insertions(+), 169 deletions(-) diff --git a/package-lock.json b/package-lock.json index 306c2b6ad..b8c85dfb7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,40 +16,40 @@ "btoa": "^1.2.1", "common-tags": "^1.8.2", "connect-mongo": "^5.1.0", - "country-emoji-languages": "^1.0.0", + "country-emoji-languages": "^1.0.1", "discord-giveaways": "^6.0.1", "discord-together": "^1.3.31", "discord.js": "^14.11.0", - "dotenv": "^16.3.1", - "ejs": "^3.1.9", + "dotenv": "^16.4.5", + "ejs": "^3.1.10", "enhanced-ms": "^2.3.0", "express": "^4.21.1", "express-session": "^1.18.1", - "fixedsize-map": "^1.0.1", - "iso-639-1": "^3.1.0", + "fixedsize-map": "^1.1.0", + "iso-639-1": "^3.1.3", "lavaclient": "^4.1.1", "module-alias": "^2.2.3", "moment": "^2.30.1", - "mongoose": "^8.1.1", + "mongoose": "^8.7.3", "nekos.life": "^3.0.0", "node-fetch": "^2.7.0", "os": "^0.1.2", - "pino": "^8.18.0", + "pino": "^8.21.0", "pino-pretty": "^10.3.1", "pretty-ms": "^7.0.1", "snakecord": "^1.0.9", "sourcebin_js": "^0.0.3-ignore", "string-progressbar": "^1.0.4", - "table": "^6.8.1", + "table": "^6.8.2", "timestamp-to-date": "^1.1.0", "twemoji-parser": "^14.0.0" }, "devDependencies": { - "eslint": "^8.56.0", - "eslint-plugin-jsdoc": "^46.4.3", - "node": "^18.18.2", - "nodemon": "^3.0.3", - "prettier": "3.2.5" + "eslint": "^8.57.1", + "eslint-plugin-jsdoc": "^46.10.1", + "node": "^18.20.4", + "nodemon": "^3.1.7", + "prettier": "3.3.3" }, "engines": { "node": ">=18.0.0" @@ -57,7 +57,7 @@ "optionalDependencies": { "bufferutil": "^4.0.8", "erlpack": "^0.1.4", - "utf-8-validate": "^6.0.3", + "utf-8-validate": "^6.0.4", "zlib-sync": "^0.1.9" } }, @@ -884,13 +884,13 @@ "license": "MIT" }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.39.4", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.39.4.tgz", - "integrity": "sha512-Jvw915fjqQct445+yron7Dufix9A+m9j1fCJYlCo1FWlRvTxa3pjJelxdSTdaLWcTwRU6vbL+NYjO4YuNIS5Qg==", + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz", + "integrity": "sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==", "dev": true, "license": "MIT", "dependencies": { - "comment-parser": "1.3.1", + "comment-parser": "1.4.1", "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" }, @@ -949,9 +949,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", - "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "license": "MIT", "engines": { @@ -967,13 +967,14 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", + "deprecated": "Use @eslint/config-array instead", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -996,9 +997,10 @@ } }, "node_modules/@humanwhocodes/object-schema": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", - "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz", + "integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==", + "deprecated": "Use @eslint/object-schema instead", "dev": true, "license": "BSD-3-Clause" }, @@ -1033,9 +1035,9 @@ "license": "MIT" }, "node_modules/@mongodb-js/saslprep": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.4.tgz", - "integrity": "sha512-8zJ8N1x51xo9hwPh6AWnKdLGEC5N3lDa6kms1YHmFBoRhTpJR6HG8wWk0td1MVCu9cD4YBrvjZEtd5Obw0Fbnw==", + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.9.tgz", + "integrity": "sha512-tVkljjeEaAhCqTzajSdgbQ6gE6f3oneVwa3iXR6csiEwXXOFsiC6Uh9iAjAhXPtqa/XMDHWjjeNH/77m/Yq2dw==", "license": "MIT", "dependencies": { "sparse-bitfield": "^3.0.3" @@ -2076,22 +2078,22 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "license": "MIT", "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" } }, "node_modules/bson": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/bson/-/bson-6.3.0.tgz", - "integrity": "sha512-balJfqwwTBddxfnidJZagCBPP/f48zj9Sdp3OJswREOgsJzHiQSaOIAtApSgDQFYgHqAvFkp53AFSqjMDZoTFw==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.9.0.tgz", + "integrity": "sha512-X9hJeyeM0//Fus+0pc5dSUMhhrrmWwQUtdavaQeF3Ta6m69matZkGWV/MrBcnwUeLC8W9kwwc2hfkZgUuCX3Ig==", "license": "Apache-2.0", "engines": { "node": ">=16.20.1" @@ -2249,9 +2251,9 @@ } }, "node_modules/comment-parser": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", - "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", "dev": true, "license": "MIT", "engines": { @@ -2327,9 +2329,9 @@ "license": "MIT" }, "node_modules/country-emoji-languages": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/country-emoji-languages/-/country-emoji-languages-1.0.0.tgz", - "integrity": "sha512-3gvKeG21uNCfbi32f36WAcwlLxpTjEG7vjWNzYMa3JOhKEt5REFBpUCUIh3VoPAz1poaJ2IfNqo5CpNNKE7lVw==", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/country-emoji-languages/-/country-emoji-languages-1.0.1.tgz", + "integrity": "sha512-rOsnS1uJ0Yjf7M9F1Mz4exzHP4kFqLlf29IR+mr40Is+R4U4zr0SrLe/c7G7ztfBLbU04fNS/+qaqD3KFfvwKw==", "license": "ISC" }, "node_modules/cross-spawn": { @@ -2511,15 +2513,15 @@ } }, "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "license": "BSD-2-Clause", "engines": { "node": ">=12" }, "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" + "url": "https://dotenvx.com" } }, "node_modules/ee-first": { @@ -2529,9 +2531,9 @@ "license": "MIT" }, "node_modules/ejs": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.9.tgz", - "integrity": "sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==", + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", "license": "Apache-2.0", "dependencies": { "jake": "^10.8.5" @@ -2625,17 +2627,18 @@ } }, "node_modules/eslint": { - "version": "8.56.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", - "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", + "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.56.0", - "@humanwhocodes/config-array": "^0.11.13", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -2681,27 +2684,27 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "46.4.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.4.3.tgz", - "integrity": "sha512-Prc7ol+vCIghPeECpwZq5+P+VZfoi87suywvbYCiCnkI1kTmVSdcOC2M8mioglWxBbd28wbb1OVjg/8OzGzatA==", + "version": "46.10.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", + "integrity": "sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "@es-joy/jsdoccomment": "~0.39.4", + "@es-joy/jsdoccomment": "~0.41.0", "are-docs-informative": "^0.0.2", - "comment-parser": "1.3.1", + "comment-parser": "1.4.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", "is-builtin-module": "^3.2.1", - "semver": "^7.5.1", - "spdx-expression-parse": "^3.0.1" + "semver": "^7.5.4", + "spdx-expression-parse": "^4.0.0" }, "engines": { "node": ">=16" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/eslint-scope": { @@ -3078,9 +3081,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "license": "MIT", "dependencies": { @@ -3141,9 +3144,9 @@ } }, "node_modules/fixedsize-map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fixedsize-map/-/fixedsize-map-1.0.1.tgz", - "integrity": "sha512-ip1ywpWp+/ZUyDjmoPjLzmtal4ui5/KpBOU43pviQJiOGL+D9sI6V52nQkevtz370oWvoMnZol8+decHU+w8Jg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fixedsize-map/-/fixedsize-map-1.1.0.tgz", + "integrity": "sha512-lTnOqG3vtfFa5UglxoVJfGyuBzAJ1ygG4bO/iXLU0gY+se5H8LN/P6VUXQYpRvO2PWQ05bkpiSxukd7keEZs2g==", "license": "ISC" }, "node_modules/flat-cache": { @@ -3206,6 +3209,21 @@ "dev": true, "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -3475,13 +3493,20 @@ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "license": "ISC" }, - "node_modules/ip": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", - "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", "license": "MIT", "optional": true, - "peer": true + "peer": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } }, "node_modules/ipaddr.js": { "version": "1.9.1", @@ -3581,9 +3606,9 @@ "license": "ISC" }, "node_modules/iso-639-1": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/iso-639-1/-/iso-639-1-3.1.0.tgz", - "integrity": "sha512-rWcHp9dcNbxa5C8jA/cxFlWNFNwy5Vup0KcFvgA8sPQs9ZeJHj/Eq0Y8Yz2eL8XlWYpxw4iwh9FfTeVxyqdRMw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/iso-639-1/-/iso-639-1-3.1.3.tgz", + "integrity": "sha512-1jz0Wh9hyLMRwqEPchb/KZCiTqfFWtc9R3nm7GHPygBAKS8wdKJ3FH4lvLsri6UtAE5Kz5SnowtXZa//6bqMyw==", "license": "MIT", "engines": { "node": ">=6.0" @@ -3629,6 +3654,14 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/jsdoc-type-pratt-parser": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-4.0.0.tgz", @@ -3654,9 +3687,9 @@ "license": "MIT" }, "node_modules/kareem": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.5.1.tgz", - "integrity": "sha512-7jFxRVm+jD+rkq3kY0iZDJfsO2/t4BBPeEb2qKn2lR/9KhuksYk5hxzfRYWMPV8P/x2d0kHD306YyWLzjjH+uA==", + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.6.3.tgz", + "integrity": "sha512-C3iHfuGUXK2u8/ipq9LfjFfXFxAZMQJJq7vLS45r3D9Y2xQ/m4S8zaR4zMLFWh9AsNPXmcFfUDhTEO8UIC/V6Q==", "license": "Apache-2.0", "engines": { "node": ">=12.0.0" @@ -3863,13 +3896,13 @@ } }, "node_modules/mongodb": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.3.0.tgz", - "integrity": "sha512-tt0KuGjGtLUhLoU263+xvQmPHEGTw5LbcNC73EoFRYgSHwZt5tsoJC110hDyO1kjQzpgNrpdcSza9PknWN4LrA==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.9.0.tgz", + "integrity": "sha512-UMopBVx1LmEUbW/QE0Hw18u583PEDVQmUmVzzBRH0o/xtE9DBRA5ZYLOjpLIa03i8FXjzvQECJcqoMvCXftTUA==", "license": "Apache-2.0", "dependencies": { - "@mongodb-js/saslprep": "^1.1.0", - "bson": "^6.2.0", + "@mongodb-js/saslprep": "^1.1.5", + "bson": "^6.7.0", "mongodb-connection-string-url": "^3.0.0" }, "engines": { @@ -3953,18 +3986,18 @@ } }, "node_modules/mongoose": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.1.1.tgz", - "integrity": "sha512-DbLb0NsiEXmaqLOpEz+AtAsgwhRw6f25gwa1dF5R7jj6lS1D8X6uTdhBSC8GDVtOwe5Tfw2EL7nTn6hiJT3Bgg==", + "version": "8.7.3", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.7.3.tgz", + "integrity": "sha512-Xl6+dzU5ZpEcDoJ8/AyrIdAwTY099QwpolvV73PIytpK13XqwllLq/9XeVzzLEQgmyvwBVGVgjmMrKbuezxrIA==", "license": "MIT", "dependencies": { - "bson": "^6.2.0", - "kareem": "2.5.1", - "mongodb": "6.3.0", + "bson": "^6.7.0", + "kareem": "2.6.3", + "mongodb": "6.9.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", - "sift": "16.0.1" + "sift": "17.1.3" }, "engines": { "node": ">=16.20.1" @@ -4037,9 +4070,9 @@ "license": "MIT" }, "node_modules/node": { - "version": "18.18.2", - "resolved": "https://registry.npmjs.org/node/-/node-18.18.2.tgz", - "integrity": "sha512-PzYRrHnY79DWyjkV2HtE2xl2gTaMGU/Taupl751nnC4NBSzSR3mvsGUAm2MYhYDeVloQuFhyyAcO5SXlcYNQyw==", + "version": "18.20.4", + "resolved": "https://registry.npmjs.org/node/-/node-18.20.4.tgz", + "integrity": "sha512-7kNnwQLq7hjLAKkku5Ig77yGmvFzriLwF83zg8BV13QEG3KGh5UGAT0O+TPK9N+AQbdf02LmFBXKbuGcHNfMLA==", "dev": true, "hasInstallScript": true, "license": "ISC", @@ -4091,9 +4124,9 @@ "license": "ISC" }, "node_modules/nodemon": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.3.tgz", - "integrity": "sha512-7jH/NXbFPxVaMwmBCC2B9F/V6X1VkEdNgx3iu9jji8WxWcvhMWkmhNWhI5077zknOnZnBzba9hZP6bCPJLSReQ==", + "version": "3.1.7", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.7.tgz", + "integrity": "sha512-hLj7fuMow6f0lbB0cD14Lz2xNjwsyruH251Pk4t/yIitCFJbmY1myuLlHm/q06aST4jg6EgAh74PIBBrRqpVAQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4363,31 +4396,31 @@ } }, "node_modules/pino": { - "version": "8.18.0", - "resolved": "https://registry.npmjs.org/pino/-/pino-8.18.0.tgz", - "integrity": "sha512-Mz/gKiRyuXu4HnpHgi1YWdHQCoWMufapzooisvFn78zl4dZciAxS+YeRkUxXl1ee/SzU80YCz1zpECCh4oC6Aw==", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.21.0.tgz", + "integrity": "sha512-ip4qdzjkAyDDZklUaZkcRFb2iA118H9SgRh8yzTkSQK8HilsOJF7rSY8HoW5+I0M46AZgX/pxbprf2vvzQCE0Q==", "license": "MIT", "dependencies": { "atomic-sleep": "^1.0.0", "fast-redact": "^3.1.1", "on-exit-leak-free": "^2.1.0", - "pino-abstract-transport": "v1.1.0", + "pino-abstract-transport": "^1.2.0", "pino-std-serializers": "^6.0.0", "process-warning": "^3.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", "sonic-boom": "^3.7.0", - "thread-stream": "^2.0.0" + "thread-stream": "^2.6.0" }, "bin": { "pino": "bin.js" } }, "node_modules/pino-abstract-transport": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.1.0.tgz", - "integrity": "sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-1.2.0.tgz", + "integrity": "sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==", "license": "MIT", "dependencies": { "readable-stream": "^4.0.0", @@ -4425,15 +4458,6 @@ "integrity": "sha512-mMMOwSKrmyl+Y12Ri2xhH1lbzQxwwpuru9VjyJpgFIH4asSj88F2csdMwN6+M5g1Ll4rmsYghHLQJw81tgZ7LQ==", "license": "MIT" }, - "node_modules/pino/node_modules/real-require": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", - "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", - "license": "MIT", - "engines": { - "node": ">= 12.13.0" - } - }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -4445,9 +4469,9 @@ } }, "node_modules/prettier": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", - "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", "dev": true, "license": "MIT", "bin": { @@ -4660,9 +4684,9 @@ } }, "node_modules/real-require": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.1.0.tgz", - "integrity": "sha512-r/H9MzAWtrv8aSVjPCMFpDMl5q66GqtmmRkRjpHTsp4zBAa+snZyiQNlMONiUmEJcsnaw0wCauJ2GWODr/aFkg==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", "license": "MIT", "engines": { "node": ">= 12.13.0" @@ -4938,9 +4962,9 @@ } }, "node_modules/sift": { - "version": "16.0.1", - "resolved": "https://registry.npmjs.org/sift/-/sift-16.0.1.tgz", - "integrity": "sha512-Wv6BjQ5zbhW7VFefWusVP33T/EM0vYikCaQ2qR8yULbsilAT8/wQaXvuQ3ptGLpoKx+lihJE3y2UTgKDyyNHZQ==", + "version": "17.1.3", + "resolved": "https://registry.npmjs.org/sift/-/sift-17.1.3.tgz", + "integrity": "sha512-Rtlj66/b0ICeFzYTuNvX/EF1igRbbnGSvEyT79McoZa/DeGhMyC5pWKOEsZKnpkqtSeovd5FL/bjHWC3CIIvCQ==", "license": "MIT" }, "node_modules/simple-update-notifier": { @@ -5050,18 +5074,18 @@ "license": "MIT" }, "node_modules/socks": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", - "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", "license": "MIT", "optional": true, "peer": true, "dependencies": { - "ip": "^2.0.0", + "ip-address": "^9.0.5", "smart-buffer": "^4.2.0" }, "engines": { - "node": ">= 10.13.0", + "node": ">= 10.0.0", "npm": ">= 3.0.0" } }, @@ -5094,16 +5118,16 @@ } }, "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", "dev": true, "license": "CC-BY-3.0" }, "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", "dev": true, "license": "MIT", "dependencies": { @@ -5112,9 +5136,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.10", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", - "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==", + "version": "3.0.20", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", + "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", "dev": true, "license": "CC0-1.0" }, @@ -5127,6 +5151,14 @@ "node": ">= 10.x" } }, + "node_modules/sprintf-js": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", + "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "license": "BSD-3-Clause", + "optional": true, + "peer": true + }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -5227,9 +5259,9 @@ } }, "node_modules/table": { - "version": "6.8.1", - "resolved": "https://registry.npmjs.org/table/-/table-6.8.1.tgz", - "integrity": "sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA==", + "version": "6.8.2", + "resolved": "https://registry.npmjs.org/table/-/table-6.8.2.tgz", + "integrity": "sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==", "license": "BSD-3-Clause", "dependencies": { "ajv": "^8.0.1", @@ -5272,12 +5304,12 @@ "license": "MIT" }, "node_modules/thread-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.0.0.tgz", - "integrity": "sha512-tnbzCbIrA4Khq5SJt/Fyz5DlE8pUnPR3//nWv+cqdRktvAl2NuC9O08HHq2Ifa10bhkvHLuzcesNjaH15EgTXA==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-2.7.0.tgz", + "integrity": "sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw==", "license": "MIT", "dependencies": { - "real-require": "^0.1.0" + "real-require": "^0.2.0" } }, "node_modules/timestamp-to-date": { @@ -5427,9 +5459,10 @@ "license": "MIT" }, "node_modules/undici": { - "version": "5.28.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", - "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", + "license": "MIT", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -5456,9 +5489,9 @@ } }, "node_modules/utf-8-validate": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.3.tgz", - "integrity": "sha512-uIuGf9TWQ/y+0Lp+KGZCMuJWc3N9BHA+l/UmHd/oUHwJJDeysyTRxNQVkbzsIWfGFbRe3OcgML/i0mvVRPOyDA==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.4.tgz", + "integrity": "sha512-xu9GQDeFp+eZ6LnCywXN/zBancWvOpUMzgjLPSjy4BRHSmTelvn2E0DG0o1sTiw5hkCKBHo8rwSKncfRfv2EEQ==", "hasInstallScript": true, "license": "MIT", "optional": true, @@ -5543,9 +5576,9 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.13.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.13.0.tgz", - "integrity": "sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "license": "MIT", "engines": { "node": ">=10.0.0" diff --git a/package.json b/package.json index 8dd04e4f4..c33164356 100644 --- a/package.json +++ b/package.json @@ -31,46 +31,46 @@ "btoa": "^1.2.1", "common-tags": "^1.8.2", "connect-mongo": "^5.1.0", - "country-emoji-languages": "^1.0.0", + "country-emoji-languages": "^1.0.1", "discord-giveaways": "^6.0.1", "discord-together": "^1.3.31", "discord.js": "^14.11.0", - "dotenv": "^16.3.1", - "ejs": "^3.1.9", + "dotenv": "^16.4.5", + "ejs": "^3.1.10", "enhanced-ms": "^2.3.0", "express": "^4.21.1", "express-session": "^1.18.1", - "fixedsize-map": "^1.0.1", - "iso-639-1": "^3.1.0", + "fixedsize-map": "^1.1.0", + "iso-639-1": "^3.1.3", "lavaclient": "^4.1.1", "module-alias": "^2.2.3", "moment": "^2.30.1", - "mongoose": "^8.1.1", + "mongoose": "^8.7.3", "nekos.life": "^3.0.0", "node-fetch": "^2.7.0", "os": "^0.1.2", - "pino": "^8.18.0", + "pino": "^8.21.0", "pino-pretty": "^10.3.1", "pretty-ms": "^7.0.1", "snakecord": "^1.0.9", "sourcebin_js": "^0.0.3-ignore", "string-progressbar": "^1.0.4", - "table": "^6.8.1", + "table": "^6.8.2", "timestamp-to-date": "^1.1.0", "twemoji-parser": "^14.0.0" }, "optionalDependencies": { "bufferutil": "^4.0.8", "erlpack": "^0.1.4", - "utf-8-validate": "^6.0.3", + "utf-8-validate": "^6.0.4", "zlib-sync": "^0.1.9" }, "devDependencies": { - "eslint": "^8.56.0", - "eslint-plugin-jsdoc": "^46.4.3", - "node": "^18.18.2", - "nodemon": "^3.0.3", - "prettier": "3.2.5" + "eslint": "^8.57.1", + "eslint-plugin-jsdoc": "^46.10.1", + "node": "^18.20.4", + "nodemon": "^3.1.7", + "prettier": "3.3.3" }, "keywords": [ "discord", From edd6d6d766d388eaaa0102f0485af1fa7dec1e21 Mon Sep 17 00:00:00 2001 From: Sai Teja Madha Date: Tue, 29 Oct 2024 10:00:47 -0700 Subject: [PATCH 19/29] Bump up discord.js --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c33164356..79a757d04 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "country-emoji-languages": "^1.0.1", "discord-giveaways": "^6.0.1", "discord-together": "^1.3.31", - "discord.js": "^14.11.0", + "discord.js": "^14.16.3", "dotenv": "^16.4.5", "ejs": "^3.1.10", "enhanced-ms": "^2.3.0", From 50dc1f4298b27d3afa625c4f13074daf721f2aa5 Mon Sep 17 00:00:00 2001 From: Sai Teja Madha Date: Tue, 29 Oct 2024 10:07:35 -0700 Subject: [PATCH 20/29] Revert "Bump up discord.js" This reverts commit edd6d6d766d388eaaa0102f0485af1fa7dec1e21. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79a757d04..c33164356 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "country-emoji-languages": "^1.0.1", "discord-giveaways": "^6.0.1", "discord-together": "^1.3.31", - "discord.js": "^14.16.3", + "discord.js": "^14.11.0", "dotenv": "^16.4.5", "ejs": "^3.1.10", "enhanced-ms": "^2.3.0", From 3462b9b315ec18c39e908dc347240227e282316c Mon Sep 17 00:00:00 2001 From: Sai Teja Madha Date: Tue, 29 Oct 2024 10:09:22 -0700 Subject: [PATCH 21/29] bump discord.js --- package-lock.json | 413 ++++++++++++++++++++-------------------------- package.json | 2 +- 2 files changed, 179 insertions(+), 236 deletions(-) diff --git a/package-lock.json b/package-lock.json index b8c85dfb7..3384cc39e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "country-emoji-languages": "^1.0.1", "discord-giveaways": "^6.0.1", "discord-together": "^1.3.31", - "discord.js": "^14.11.0", + "discord.js": "^14.16.3", "dotenv": "^16.4.5", "ejs": "^3.1.10", "enhanced-ms": "^2.3.0", @@ -773,114 +773,176 @@ } }, "node_modules/@discordjs/builders": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.6.3.tgz", - "integrity": "sha512-CTCh8NqED3iecTNuiz49mwSsrc2iQb4d0MjMdmS/8pb69Y4IlzJ/DIy/p5GFlgOrFbNO2WzMHkWKQSiJ3VNXaw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.9.0.tgz", + "integrity": "sha512-0zx8DePNVvQibh5ly5kCEei5wtPBIUbSoE9n+91Rlladz4tgtFbJ36PZMxxZrTEOQ7AHMZ/b0crT/0fCy6FTKg==", "license": "Apache-2.0", "dependencies": { - "@discordjs/formatters": "^0.3.1", - "@discordjs/util": "^0.3.1", - "@sapphire/shapeshift": "^3.8.2", - "discord-api-types": "^0.37.41", + "@discordjs/formatters": "^0.5.0", + "@discordjs/util": "^1.1.1", + "@sapphire/shapeshift": "^4.0.0", + "discord-api-types": "0.37.97", "fast-deep-equal": "^3.1.3", - "ts-mixer": "^6.0.3", - "tslib": "^2.5.0" + "ts-mixer": "^6.0.4", + "tslib": "^2.6.3" }, "engines": { - "node": ">=16.9.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/builders/node_modules/@sapphire/shapeshift": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-4.0.0.tgz", + "integrity": "sha512-d9dUmWVA7MMiKobL3VpLF8P2aeanRTu6ypG2OIaEv/ZHH/SUQ2iHOVyi5wAPjQ+HmnMuL0whK9ez8I/raWbtIg==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v16" } }, "node_modules/@discordjs/builders/node_modules/discord-api-types": { - "version": "0.37.46", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.46.tgz", - "integrity": "sha512-DeSi5WSWYTeXJJhdwACtpQycY3g4vLRvE2Ol5IlC0o//P2W+8jXPF447PuJn2fRH1nD7JGEJ3YMb0NB9+OQ7BQ==", + "version": "0.37.97", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz", + "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==", "license": "MIT" }, "node_modules/@discordjs/collection": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.1.tgz", - "integrity": "sha512-aWEc9DCf3TMDe9iaJoOnO2+JVAjeRNuRxPZQA6GVvBf+Z3gqUuWYBy2NWh4+5CLYq5uoc3MOvUQ5H5m8CJBqOA==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-1.5.3.tgz", + "integrity": "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ==", "license": "Apache-2.0", "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" } }, "node_modules/@discordjs/formatters": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.3.1.tgz", - "integrity": "sha512-M7X4IGiSeh4znwcRGcs+49B5tBkNDn4k5bmhxJDAUhRxRHTiFAOTVUNQ6yAKySu5jZTnCbSvTYHW3w0rAzV1MA==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@discordjs/formatters/-/formatters-0.5.0.tgz", + "integrity": "sha512-98b3i+Y19RFq1Xke4NkVY46x8KjJQjldHUuEbCqMvp1F5Iq9HgnGpu91jOi/Ufazhty32eRsKnnzS8n4c+L93g==", "license": "Apache-2.0", "dependencies": { - "discord-api-types": "^0.37.41" + "discord-api-types": "0.37.97" }, "engines": { - "node": ">=16.9.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@discordjs/formatters/node_modules/discord-api-types": { - "version": "0.37.46", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.46.tgz", - "integrity": "sha512-DeSi5WSWYTeXJJhdwACtpQycY3g4vLRvE2Ol5IlC0o//P2W+8jXPF447PuJn2fRH1nD7JGEJ3YMb0NB9+OQ7BQ==", + "version": "0.37.97", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz", + "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==", "license": "MIT" }, "node_modules/@discordjs/rest": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-1.7.1.tgz", - "integrity": "sha512-Ofa9UqT0U45G/eX86cURQnX7gzOJLG2oC28VhIk/G6IliYgQF7jFByBJEykPSHE4MxPhqCleYvmsrtfKh1nYmQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.4.0.tgz", + "integrity": "sha512-Xb2irDqNcq+O8F0/k/NaDp7+t091p+acb51iA4bCKfIn+WFWd6HrNvcsSbMMxIR9NjcMZS6NReTKygqiQN+ntw==", "license": "Apache-2.0", "dependencies": { - "@discordjs/collection": "^1.5.1", - "@discordjs/util": "^0.3.0", - "@sapphire/async-queue": "^1.5.0", - "@sapphire/snowflake": "^3.4.2", - "discord-api-types": "^0.37.41", - "file-type": "^18.3.0", - "tslib": "^2.5.0", - "undici": "^5.22.0" + "@discordjs/collection": "^2.1.1", + "@discordjs/util": "^1.1.1", + "@sapphire/async-queue": "^1.5.3", + "@sapphire/snowflake": "^3.5.3", + "@vladfrangu/async_event_emitter": "^2.4.6", + "discord-api-types": "0.37.97", + "magic-bytes.js": "^1.10.0", + "tslib": "^2.6.3", + "undici": "6.19.8" }, "engines": { - "node": ">=16.9.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/rest/node_modules/@discordjs/collection": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz", + "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@discordjs/rest/node_modules/discord-api-types": { - "version": "0.37.46", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.46.tgz", - "integrity": "sha512-DeSi5WSWYTeXJJhdwACtpQycY3g4vLRvE2Ol5IlC0o//P2W+8jXPF447PuJn2fRH1nD7JGEJ3YMb0NB9+OQ7BQ==", + "version": "0.37.97", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.97.tgz", + "integrity": "sha512-No1BXPcVkyVD4ZVmbNgDKaBoqgeQ+FJpzZ8wqHkfmBnTZig1FcH3iPPersiK1TUIAzgClh2IvOuVUYfcWLQAOA==", "license": "MIT" }, + "node_modules/@discordjs/rest/node_modules/undici": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz", + "integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==", + "license": "MIT", + "engines": { + "node": ">=18.17" + } + }, "node_modules/@discordjs/util": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-0.3.1.tgz", - "integrity": "sha512-HxXKYKg7vohx2/OupUN/4Sd02Ev3PBJ5q0gtjdcvXb0ErCva8jNHWfe/v5sU3UKjIB/uxOhc+TDOnhqffj9pRA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/util/-/util-1.1.1.tgz", + "integrity": "sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g==", "license": "Apache-2.0", "engines": { - "node": ">=16.9.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@discordjs/ws": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-0.8.3.tgz", - "integrity": "sha512-hcYtppanjHecbdNyCKQNH2I4RP9UrphDgmRgLYrATEQF1oo4sYSve7ZmGsBEXSzH72MO2tBPdWSThunbxUVk0g==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.1.1.tgz", + "integrity": "sha512-PZ+vLpxGCRtmr2RMkqh8Zp+BenUaJqlS6xhgWKEZcgC/vfHLEzpHtKkB0sl3nZWpwtcKk6YWy+pU3okL2I97FA==", "license": "Apache-2.0", "dependencies": { - "@discordjs/collection": "^1.5.1", - "@discordjs/rest": "^1.7.1", - "@discordjs/util": "^0.3.1", - "@sapphire/async-queue": "^1.5.0", - "@types/ws": "^8.5.4", - "@vladfrangu/async_event_emitter": "^2.2.1", - "discord-api-types": "^0.37.41", - "tslib": "^2.5.0", - "ws": "^8.13.0" + "@discordjs/collection": "^2.1.0", + "@discordjs/rest": "^2.3.0", + "@discordjs/util": "^1.1.0", + "@sapphire/async-queue": "^1.5.2", + "@types/ws": "^8.5.10", + "@vladfrangu/async_event_emitter": "^2.2.4", + "discord-api-types": "0.37.83", + "tslib": "^2.6.2", + "ws": "^8.16.0" }, "engines": { - "node": ">=16.9.0" + "node": ">=16.11.0" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" + } + }, + "node_modules/@discordjs/ws/node_modules/@discordjs/collection": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@discordjs/collection/-/collection-2.1.1.tgz", + "integrity": "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg==", + "license": "Apache-2.0", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/@discordjs/ws/node_modules/discord-api-types": { - "version": "0.37.46", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.46.tgz", - "integrity": "sha512-DeSi5WSWYTeXJJhdwACtpQycY3g4vLRvE2Ol5IlC0o//P2W+8jXPF447PuJn2fRH1nD7JGEJ3YMb0NB9+OQ7BQ==", + "version": "0.37.83", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.83.tgz", + "integrity": "sha512-urGGYeWtWNYMKnYlZnOnDHm8fVRffQs3U0SpE8RHeiuLKb/u92APS8HoQnPTFbnXmY1vVnXjXO4dOxcAn3J+DA==", "license": "MIT" }, "node_modules/@es-joy/jsdoccomment": { @@ -1082,9 +1144,9 @@ } }, "node_modules/@sapphire/async-queue": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.0.tgz", - "integrity": "sha512-JkLdIsP8fPAdh9ZZjrbHWR/+mZj0wvKS5ICibcLrRI1j84UmLMshx5n9QmL8b95d4onJ2xxiyugTgSAX7AalmA==", + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/@sapphire/async-queue/-/async-queue-1.5.3.tgz", + "integrity": "sha512-x7zadcfJGxFka1Q3f8gCts1F0xMwCKbZweM85xECGI0hBTeIZJGGCrHgLggihBoprlQ/hBmDR5LKfIPqnmHM3w==", "license": "MIT", "engines": { "node": ">=v14.0.0", @@ -1106,9 +1168,9 @@ } }, "node_modules/@sapphire/snowflake": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.1.tgz", - "integrity": "sha512-BxcYGzgEsdlG0dKAyOm0ehLGm2CafIrfQTZGWgkfKYbj+pNNsorZ7EotuZukc2MT70E0UbppVbtpBrqpzVzjNA==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/@sapphire/snowflake/-/snowflake-3.5.3.tgz", + "integrity": "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ==", "license": "MIT", "engines": { "node": ">=v14.0.0", @@ -1710,12 +1772,6 @@ "resolved": "https://registry.npmjs.org/@sourcebin/linguist/-/linguist-0.0.3.tgz", "integrity": "sha512-VVkb/34pISdK+1tyqmwBac6crn8UhviKCRV5w/wc8iZyTCOoTrOu0Cgbqfh0bfMGxNlQuhaRy6cMmEmHxa5R3g==" }, - "node_modules/@tokenizer/token": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@tokenizer/token/-/token-0.3.0.tgz", - "integrity": "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==", - "license": "MIT" - }, "node_modules/@types/http-errors": { "version": "1.8.2", "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.8.2.tgz", @@ -1768,9 +1824,9 @@ } }, "node_modules/@types/ws": { - "version": "8.5.4", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz", - "integrity": "sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg==", + "version": "8.5.12", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.12.tgz", + "integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==", "license": "MIT", "dependencies": { "@types/node": "*" @@ -1798,9 +1854,9 @@ } }, "node_modules/@vladfrangu/async_event_emitter": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.2.2.tgz", - "integrity": "sha512-HIzRG7sy88UZjBJamssEczH5q7t5+axva19UbZLO6u0ySbYPrwzWiXBcC0WuHyhKKoeCyneH+FvYzKQq/zTtkQ==", + "version": "2.4.6", + "resolved": "https://registry.npmjs.org/@vladfrangu/async_event_emitter/-/async_event_emitter-2.4.6.tgz", + "integrity": "sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA==", "license": "MIT", "engines": { "node": ">=v14.0.0", @@ -2469,36 +2525,46 @@ } }, "node_modules/discord.js": { - "version": "14.11.0", - "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.11.0.tgz", - "integrity": "sha512-CkueWYFQ28U38YPR8HgsBR/QT35oPpMbEsTNM30Fs8loBIhnA4s70AwQEoy6JvLcpWWJO7GY0y2BUzZmuBMepQ==", + "version": "14.16.3", + "resolved": "https://registry.npmjs.org/discord.js/-/discord.js-14.16.3.tgz", + "integrity": "sha512-EPCWE9OkA9DnFFNrO7Kl1WHHDYFXu3CNVFJg63bfU7hVtjZGyhShwZtSBImINQRWxWP2tgo2XI+QhdXx28r0aA==", "license": "Apache-2.0", "dependencies": { - "@discordjs/builders": "^1.6.3", - "@discordjs/collection": "^1.5.1", - "@discordjs/formatters": "^0.3.1", - "@discordjs/rest": "^1.7.1", - "@discordjs/util": "^0.3.1", - "@discordjs/ws": "^0.8.3", - "@sapphire/snowflake": "^3.4.2", - "@types/ws": "^8.5.4", - "discord-api-types": "^0.37.41", - "fast-deep-equal": "^3.1.3", - "lodash.snakecase": "^4.1.1", - "tslib": "^2.5.0", - "undici": "^5.22.0", - "ws": "^8.13.0" + "@discordjs/builders": "^1.9.0", + "@discordjs/collection": "1.5.3", + "@discordjs/formatters": "^0.5.0", + "@discordjs/rest": "^2.4.0", + "@discordjs/util": "^1.1.1", + "@discordjs/ws": "1.1.1", + "@sapphire/snowflake": "3.5.3", + "discord-api-types": "0.37.100", + "fast-deep-equal": "3.1.3", + "lodash.snakecase": "4.1.1", + "tslib": "^2.6.3", + "undici": "6.19.8" }, "engines": { - "node": ">=16.9.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/discordjs/discord.js?sponsor" } }, "node_modules/discord.js/node_modules/discord-api-types": { - "version": "0.37.46", - "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.46.tgz", - "integrity": "sha512-DeSi5WSWYTeXJJhdwACtpQycY3g4vLRvE2Ol5IlC0o//P2W+8jXPF447PuJn2fRH1nD7JGEJ3YMb0NB9+OQ7BQ==", + "version": "0.37.100", + "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.100.tgz", + "integrity": "sha512-a8zvUI0GYYwDtScfRd/TtaNBDTXwP5DiDVX7K5OmE+DRT57gBqKnwtOC5Ol8z0mRW8KQfETIgiB8U0YZ9NXiCA==", "license": "MIT" }, + "node_modules/discord.js/node_modules/undici": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.19.8.tgz", + "integrity": "sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==", + "license": "MIT", + "engines": { + "node": ">=18.17" + } + }, "node_modules/doctrine": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", @@ -3026,23 +3092,6 @@ "node": "^10.12.0 || >=12.0.0" } }, - "node_modules/file-type": { - "version": "18.5.0", - "resolved": "https://registry.npmjs.org/file-type/-/file-type-18.5.0.tgz", - "integrity": "sha512-yvpl5U868+V6PqXHMmsESpg6unQ5GfnPssl4dxdJudBrr9qy7Fddt7EVX1VLlddFfe8Gj9N7goCZH22FXuSQXQ==", - "license": "MIT", - "dependencies": { - "readable-web-to-node-stream": "^3.0.2", - "strtok3": "^7.0.0", - "token-types": "^5.0.1" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sindresorhus/file-type?sponsor=1" - } - }, "node_modules/file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -3412,26 +3461,6 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "license": "BSD-3-Clause" - }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -3790,6 +3819,12 @@ "node": ">=10" } }, + "node_modules/magic-bytes.js": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.10.0.tgz", + "integrity": "sha512-/k20Lg2q8LE5xiaaSkMXk4sfvI+9EGEykFS4b0CHHGWqDYU0bGUFSwchNOMA56D7TCs9GwVTkqe9als1/ns8UQ==", + "license": "MIT" + }, "node_modules/media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -4369,19 +4404,6 @@ "integrity": "sha512-7lf7qcQidTku0Gu3YDPc8DJ1q7OOucfa/BSsIwjuh56VU7katFvuM8hULfkwB3Fns/rsVF7PwPKVw1sl5KQS9w==", "license": "MIT" }, - "node_modules/peek-readable": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/peek-readable/-/peek-readable-5.0.0.tgz", - "integrity": "sha512-YtCKvLUOvwtMGmrniQPdO7MwPjgkFBtFIrmfSbYmYuq3tKDV/mcfAhBth1+C3ru7uXIZasc/pHnb+YDYNkkj4A==", - "license": "MIT", - "engines": { - "node": ">=14.16" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/picomatch": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", @@ -4640,36 +4662,6 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, - "node_modules/readable-web-to-node-stream": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/readable-web-to-node-stream/-/readable-web-to-node-stream-3.0.2.tgz", - "integrity": "sha512-ePeK6cc1EcKLEhJFt/AebMCLL+GgSKhuygrZ/GLaKZYEecIgIECf4UaUuaByiGtzckwR4ain9VzUh95T1exYGw==", - "license": "MIT", - "dependencies": { - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, - "node_modules/readable-web-to-node-stream/node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "license": "MIT", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -5168,15 +5160,6 @@ "node": ">= 0.8" } }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, "node_modules/string-progressbar": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/string-progressbar/-/string-progressbar-1.0.4.tgz", @@ -5229,23 +5212,6 @@ "optional": true, "peer": true }, - "node_modules/strtok3": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/strtok3/-/strtok3-7.0.0.tgz", - "integrity": "sha512-pQ+V+nYQdC5H3Q7qBZAz/MO6lwGhoC2gOAjuouGf/VO0m7vQRh8QNMl2Uf6SwAtzZ9bOw3UIeBukEGNJl5dtXQ==", - "license": "MIT", - "dependencies": { - "@tokenizer/token": "^0.3.0", - "peek-readable": "^5.0.0" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -5346,23 +5312,6 @@ "node": ">=0.6" } }, - "node_modules/token-types": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/token-types/-/token-types-5.0.1.tgz", - "integrity": "sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==", - "license": "MIT", - "dependencies": { - "@tokenizer/token": "^0.3.0", - "ieee754": "^1.2.1" - }, - "engines": { - "node": ">=14.16" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Borewit" - } - }, "node_modules/touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", @@ -5383,15 +5332,15 @@ "license": "MIT" }, "node_modules/ts-mixer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.3.tgz", - "integrity": "sha512-k43M7uCG1AkTyxgnmI5MPwKoUvS/bRvLvUb7+Pgpdlmok8AoqmUaZxUUw8zKM5B1lqZrt41GjYgnvAi0fppqgQ==", + "version": "6.0.4", + "resolved": "https://registry.npmjs.org/ts-mixer/-/ts-mixer-6.0.4.tgz", + "integrity": "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA==", "license": "MIT" }, "node_modules/tslib": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz", - "integrity": "sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==", + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz", + "integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==", "license": "0BSD" }, "node_modules/twemoji-parser": { @@ -5502,12 +5451,6 @@ "node": ">=6.14.2" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "license": "MIT" - }, "node_modules/utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", diff --git a/package.json b/package.json index c33164356..79a757d04 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "country-emoji-languages": "^1.0.1", "discord-giveaways": "^6.0.1", "discord-together": "^1.3.31", - "discord.js": "^14.11.0", + "discord.js": "^14.16.3", "dotenv": "^16.4.5", "ejs": "^3.1.10", "enhanced-ms": "^2.3.0", From b3fe3fdd5dbe9540acdaf2cba6bd6a2e5041d62c Mon Sep 17 00:00:00 2001 From: saiteja-madha Date: Tue, 29 Oct 2024 13:58:36 -0700 Subject: [PATCH 22/29] fix: prettier --- src/handlers/presence.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/handlers/presence.js b/src/handlers/presence.js index e7ff4ed4c..3c2478038 100644 --- a/src/handlers/presence.js +++ b/src/handlers/presence.js @@ -11,9 +11,7 @@ function updatePresence(client) { } if (message.includes("{members}")) { - const members = client.guilds.cache - .map((g) => g.memberCount) - .reduce((partial_sum, a) => partial_sum + a, 0); + const members = client.guilds.cache.map((g) => g.memberCount).reduce((partial_sum, a) => partial_sum + a, 0); message = message.replaceAll("{members}", members); } @@ -30,13 +28,13 @@ function updatePresence(client) { case "WATCHING": return ActivityType.Watching; - + case "CUSTOM": return ActivityType.Custom; } }; - if(client.config.PRESENCE.TYPE === "CUSTOM") { + if (client.config.PRESENCE.TYPE === "CUSTOM") { client.user.setPresence({ status: client.config.PRESENCE.STATUS, activities: [ From 90c19d71159023dc4c84c053e8df8f3cea4a09ec Mon Sep 17 00:00:00 2001 From: saiteja-madha Date: Tue, 5 Nov 2024 09:35:39 -0700 Subject: [PATCH 23/29] fix: userinfo command --- src/commands/information/message/userinfo.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/commands/information/message/userinfo.js b/src/commands/information/message/userinfo.js index a998da36b..85a85befc 100644 --- a/src/commands/information/message/userinfo.js +++ b/src/commands/information/message/userinfo.js @@ -17,10 +17,12 @@ module.exports = { async messageRun(message, args) { let response; try { - const target = args.length > 0 ? (await message.guild.resolveMember(args[0])) : message.member; - response = userInfo(target); - } catch(e) { - response = "It appears that the user is either invalid or not a member of this server." + const target = args.length > 0 ? await message.guild.resolveMember(args[0]) : message.member; + response = target + ? userInfo(target) + : "It appears that the user is either invalid or not a member of this server."; + } catch (e) { + response = "It appears that the user is either invalid or not a member of this server."; } await message.safeReply(response); }, From 4ef5fd25b831de117b0e9984d46840faeeb6ca43 Mon Sep 17 00:00:00 2001 From: saiteja-madha Date: Tue, 5 Nov 2024 11:12:26 -0700 Subject: [PATCH 24/29] fix: flip text argument --- src/commands/fun/flip.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commands/fun/flip.js b/src/commands/fun/flip.js index b1755801e..350a28c0a 100644 --- a/src/commands/fun/flip.js +++ b/src/commands/fun/flip.js @@ -72,7 +72,7 @@ module.exports = { // else if (sub === "text") { if (args.length < 2) return message.channel.send("Please enter a text"); - const input = args.join(" "); + const input = args.slice(1).join(" "); const response = await flipText(input); await message.safeReply(response); } From 26bd3f8f776bee44503398dd4377f1c921a9a39a Mon Sep 17 00:00:00 2001 From: saiteja-madha Date: Tue, 5 Nov 2024 11:33:44 -0700 Subject: [PATCH 25/29] Support for multiple presence messages #363 --- config.js | 3 ++- src/handlers/presence.js | 9 ++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/config.js b/config.js index 100e3aeef..6fcaf8d7b 100644 --- a/config.js +++ b/config.js @@ -106,7 +106,8 @@ module.exports = { ENABLED: false, // Whether or not the bot should update its status STATUS: "online", // The bot's status [online, idle, dnd, invisible] TYPE: "WATCHING", // Status type for the bot [ CUSTOM | PLAYING | LISTENING | WATCHING | COMPETING ] - MESSAGE: "{members} members in {servers} servers", // Your bot status message (note: in custom status type you won't have "Playing", "Listening", "Competing" prefix) + // Your bot status message (note: in custom status type you won't have "Playing", "Listening", "Competing" prefix) + MESSAGE: ["{members} members in {servers} servers"], }, STATS: { diff --git a/src/handlers/presence.js b/src/handlers/presence.js index 3c2478038..76bfafe91 100644 --- a/src/handlers/presence.js +++ b/src/handlers/presence.js @@ -1,10 +1,13 @@ const { ActivityType } = require("discord.js"); +let messageIndex = 0; + /** * @param {import('@src/structures').BotClient} client */ function updatePresence(client) { - let message = client.config.PRESENCE.MESSAGE; + let messages = client.config.PRESENCE.MESSAGE; + let message = Array.isArray(messages) ? messages[messageIndex] : messages; if (message.includes("{servers}")) { message = message.replaceAll("{servers}", client.guilds.cache.size); @@ -56,6 +59,10 @@ function updatePresence(client) { ], }); } + + if (Array.isArray(messages)) { + messageIndex = (messageIndex + 1) % messages.length; + } } module.exports = function handlePresence(client) { From ecbe46c7418afa6c3ef65ebaf1bf6ae0c013fac5 Mon Sep 17 00:00:00 2001 From: saiteja-madha Date: Tue, 5 Nov 2024 11:46:49 -0700 Subject: [PATCH 26/29] bump up dependencies --- package-lock.json | 26 ++++++++++++++------------ package.json | 4 ++-- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3384cc39e..43af5bcdf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,7 +30,7 @@ "lavaclient": "^4.1.1", "module-alias": "^2.2.3", "moment": "^2.30.1", - "mongoose": "^8.7.3", + "mongoose": "^8.8.0", "nekos.life": "^3.0.0", "node-fetch": "^2.7.0", "os": "^0.1.2", @@ -57,7 +57,7 @@ "optionalDependencies": { "bufferutil": "^4.0.8", "erlpack": "^0.1.4", - "utf-8-validate": "^6.0.4", + "utf-8-validate": "^6.0.5", "zlib-sync": "^0.1.9" } }, @@ -2645,6 +2645,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/erlpack/-/erlpack-0.1.4.tgz", "integrity": "sha512-CJYbkEvsB5FqCCu2tLxF1eYKi28PvemC12oqzJ9oO6mDFrFO9G9G7nNJUHhiAyyL9zfXTOJx/tOcrQk+ncD65w==", + "hasInstallScript": true, "license": "MIT", "optional": true, "dependencies": { @@ -3931,9 +3932,9 @@ } }, "node_modules/mongodb": { - "version": "6.9.0", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.9.0.tgz", - "integrity": "sha512-UMopBVx1LmEUbW/QE0Hw18u583PEDVQmUmVzzBRH0o/xtE9DBRA5ZYLOjpLIa03i8FXjzvQECJcqoMvCXftTUA==", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.10.0.tgz", + "integrity": "sha512-gP9vduuYWb9ZkDM546M+MP2qKVk5ZG2wPF63OvSRuUbqCR+11ZCAE1mOfllhlAG0wcoJY5yDL/rV3OmYEwXIzg==", "license": "Apache-2.0", "dependencies": { "@mongodb-js/saslprep": "^1.1.5", @@ -4021,14 +4022,14 @@ } }, "node_modules/mongoose": { - "version": "8.7.3", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.7.3.tgz", - "integrity": "sha512-Xl6+dzU5ZpEcDoJ8/AyrIdAwTY099QwpolvV73PIytpK13XqwllLq/9XeVzzLEQgmyvwBVGVgjmMrKbuezxrIA==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-8.8.0.tgz", + "integrity": "sha512-KluvgwnQB1GPOYZZXUHJRjS1TW6xxwTlf/YgjWExuuNanIe3W7VcR7dDXQVCIRk8L7NYge8EnoTcu2grWtN+XQ==", "license": "MIT", "dependencies": { "bson": "^6.7.0", "kareem": "2.6.3", - "mongodb": "6.9.0", + "mongodb": "~6.10.0", "mpath": "0.9.0", "mquery": "5.0.0", "ms": "2.1.3", @@ -5438,9 +5439,9 @@ } }, "node_modules/utf-8-validate": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.4.tgz", - "integrity": "sha512-xu9GQDeFp+eZ6LnCywXN/zBancWvOpUMzgjLPSjy4BRHSmTelvn2E0DG0o1sTiw5hkCKBHo8rwSKncfRfv2EEQ==", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-6.0.5.tgz", + "integrity": "sha512-EYZR+OpIXp9Y1eG1iueg8KRsY8TuT8VNgnanZ0uA3STqhHQTLwbl+WX76/9X5OY12yQubymBpaBSmMPkSTQcKA==", "hasInstallScript": true, "license": "MIT", "optional": true, @@ -5563,6 +5564,7 @@ "version": "0.1.9", "resolved": "https://registry.npmjs.org/zlib-sync/-/zlib-sync-0.1.9.tgz", "integrity": "sha512-DinB43xCjVwIBDpaIvQqHbmDsnYnSt6HJ/yiB2MZQGTqgPcwBSZqLkimXwK8BvdjQ/MaZysb5uEenImncqvCqQ==", + "hasInstallScript": true, "license": "MIT", "optional": true, "dependencies": { diff --git a/package.json b/package.json index 79a757d04..27a2d9426 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "lavaclient": "^4.1.1", "module-alias": "^2.2.3", "moment": "^2.30.1", - "mongoose": "^8.7.3", + "mongoose": "^8.8.0", "nekos.life": "^3.0.0", "node-fetch": "^2.7.0", "os": "^0.1.2", @@ -62,7 +62,7 @@ "optionalDependencies": { "bufferutil": "^4.0.8", "erlpack": "^0.1.4", - "utf-8-validate": "^6.0.4", + "utf-8-validate": "^6.0.5", "zlib-sync": "^0.1.9" }, "devDependencies": { From ce18113b3a14f6b9d7a009eb12231e5c34408dbc Mon Sep 17 00:00:00 2001 From: saiteja-madha Date: Tue, 5 Nov 2024 13:58:21 -0700 Subject: [PATCH 27/29] drop support for heroku --- Procfile | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Procfile diff --git a/Procfile b/Procfile deleted file mode 100644 index e8f79ea7b..000000000 --- a/Procfile +++ /dev/null @@ -1 +0,0 @@ -web: npm start \ No newline at end of file From c173bc83cddef411f1cb9e244f4441b4c6bebc88 Mon Sep 17 00:00:00 2001 From: saiteja-madha Date: Tue, 5 Nov 2024 13:58:35 -0700 Subject: [PATCH 28/29] add support for replit --- .replit | 86 +----------------------------------------------------- replit.nix | 6 ++++ 2 files changed, 7 insertions(+), 85 deletions(-) create mode 100644 replit.nix diff --git a/.replit b/.replit index 7c8aef1c6..060dfa826 100644 --- a/.replit +++ b/.replit @@ -1,89 +1,5 @@ entrypoint = "bot.js" - -hidden = [".config", "package-lock.json"] - -[interpreter] -command = [ - "prybar-nodejs", - "-q", - "--ps1", - "\u0001\u001b[33m\u0002îș§\u0001\u001b[00m\u0002 ", - "-i" -] - -[[hints]] -regex = "Error \\[ERR_REQUIRE_ESM\\]" -message = "We see that you are using require(...) inside your code. We currently do not support this syntax. Please use 'import' instead when using external modules. (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import)" +run = ["sh", "-c", "npm install && node bot.js"] [nix] channel = "stable-22_11" - -[env] -XDG_CONFIG_HOME = "/home/runner/$REPL_SLUG/.config" -PATH = "/home/runner/$REPL_SLUG/.config/npm/node_global/bin:/home/runner/$REPL_SLUG/node_modules/.bin" -npm_config_prefix = "/home/runner/$REPL_SLUG/.config/npm/node_global" - -[gitHubImport] -requiredFiles = [".replit", "replit.nix", ".config", "package.json", "package-lock.json"] - -[packager] -language = "nodejs" - - [packager.features] - packageSearch = true - guessImports = true - enabledForHosting = false - -[unitTest] -language = "nodejs" - -[debugger] -support = true - - [debugger.interactive] - transport = "localhost:0" - startCommand = [ "dap-node" ] - - [debugger.interactive.initializeMessage] - command = "initialize" - type = "request" - - [debugger.interactive.initializeMessage.arguments] - clientID = "replit" - clientName = "replit.com" - columnsStartAt1 = true - linesStartAt1 = true - locale = "en-us" - pathFormat = "path" - supportsInvalidatedEvent = true - supportsProgressReporting = true - supportsRunInTerminalRequest = true - supportsVariablePaging = true - supportsVariableType = true - - [debugger.interactive.launchMessage] - command = "launch" - type = "request" - - [debugger.interactive.launchMessage.arguments] - args = [] - console = "externalTerminal" - cwd = "." - environment = [] - pauseForSourceMap = false - program = "./index.js" - request = "launch" - sourceMaps = true - stopOnEntry = false - type = "pwa-node" - -[languages] - -[languages.javascript] -pattern = "**/{*.js,*.jsx,*.ts,*.tsx}" - -[languages.javascript.languageServer] -start = "typescript-language-server --stdio" - -[deployment] -run = ["sh", "-c", "node index.js"] diff --git a/replit.nix b/replit.nix new file mode 100644 index 000000000..3bf728293 --- /dev/null +++ b/replit.nix @@ -0,0 +1,6 @@ +{ pkgs }: { + deps = [ + pkgs.nodejs-18_x + pkgs.nodePackages.npm + ]; +} From 4e9bdb5e145b36ae9c2e158021965ba34c1b244a Mon Sep 17 00:00:00 2001 From: saiteja-madha Date: Fri, 22 Nov 2024 22:48:55 -0700 Subject: [PATCH 29/29] run: prettier --- .prettierrc.json | 2 +- src/commands/fun/meme.js | 2 +- src/commands/information/leaderboard.js | 5 +---- src/commands/information/slash/info.js | 4 ++-- src/commands/music/search.js | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.prettierrc.json b/.prettierrc.json index e1f258c61..b70b91042 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -7,6 +7,6 @@ "printWidth": 120, "bracketSpacing": true, "arrowParens": "always", - "endOfLine": "lf" + "endOfLine": "auto" } diff --git a/src/commands/fun/meme.js b/src/commands/fun/meme.js index 5de9008e3..35b4f13ae 100644 --- a/src/commands/fun/meme.js +++ b/src/commands/fun/meme.js @@ -142,4 +142,4 @@ async function getRandomEmbed(choice) { .setImage(memeImage) .setColor("Random") .setFooter({ text: `👍 ${memeUpvotes}` }); - } +} diff --git a/src/commands/information/leaderboard.js b/src/commands/information/leaderboard.js index 3129455b9..240a85160 100644 --- a/src/commands/information/leaderboard.js +++ b/src/commands/information/leaderboard.js @@ -79,7 +79,6 @@ module.exports = { }; async function getXpLeaderboard({ guild }, author, settings) { - if (!settings.stats.enabled) return "The leaderboard is disabled on this server"; const lb = await getXpLb(guild.id, 10); @@ -105,7 +104,6 @@ async function getXpLeaderboard({ guild }, author, settings) { } async function getInviteLeaderboard({ guild }, author, settings) { - if (!settings.invite.tracking) return "Invite tracking is disabled on this server"; const lb = await getInvitesLb(guild.id, 10); @@ -130,12 +128,11 @@ async function getInviteLeaderboard({ guild }, author, settings) { .setColor(EMBED_COLORS.BOT_EMBED) .setDescription(collector) .setFooter({ text: `Requested by ${author.tag}` }); - + return { embeds: [embed] }; } async function getRepLeaderboard(author) { - const lb = await getReputationLb(10); if (lb.length === 0) return "There are no users in the leaderboard"; diff --git a/src/commands/information/slash/info.js b/src/commands/information/slash/info.js index 61d3bd488..9d482d63a 100644 --- a/src/commands/information/slash/info.js +++ b/src/commands/information/slash/info.js @@ -96,8 +96,8 @@ module.exports = { let targetUser = interaction.options.getUser("name") || interaction.user; let target = await interaction.guild.members.fetch(targetUser); response = user(target); - } catch(e) { - response = "It appears that the user is either invalid or not a member of this server." + } catch (e) { + response = "It appears that the user is either invalid or not a member of this server."; } } diff --git a/src/commands/music/search.js b/src/commands/music/search.js index 554c7e53a..67b02e50c 100644 --- a/src/commands/music/search.js +++ b/src/commands/music/search.js @@ -154,7 +154,7 @@ async function search({ member, guild, channel }, query) { const results = res.tracks.slice(0, max); const options = results.map((result, index) => ({ - label: result.info.title.length > 100 ? result.info.title.slice(0, 97) + '...' : result.info.title, // Truncate title + label: result.info.title.length > 100 ? result.info.title.slice(0, 97) + "..." : result.info.title, // Truncate title value: index.toString(), }));