From 139da8a30fa67c7bd87e34adb1b3c5e59d64c1f4 Mon Sep 17 00:00:00 2001 From: nathomp3 Date: Tue, 8 Mar 2022 19:41:20 -0500 Subject: [PATCH] Updated deprecated functions and linted code --- .eslintrc.json | 41 +++ commands/categories.js | 34 +-- commands/dream.js | 40 +-- commands/help.js | 40 +-- commands/hypixel.js | 456 +++++++++++++++--------------- commands/leaderboard.js | 70 ++--- commands/link.js | 26 +- commands/ping.js | 18 +- commands/search.js | 38 +-- commands/unverified.js | 34 +-- commands/verified.js | 30 +- index.js | 167 ++++++----- messagecommands/banlist.js | 80 +++--- messagecommands/check.js | 40 +-- messagecommands/dream.js | 31 +- messagecommands/runners.js | 124 ++++---- package-lock.json | 300 +++++++++++++++----- package.json | 5 +- scheduledcommands/checkInvalid.js | 16 +- scheduledcommands/combinedLB.js | 26 +- scheduledcommands/dailyLB.js | 148 +++++----- 21 files changed, 987 insertions(+), 777 deletions(-) create mode 100644 .eslintrc.json diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..7f053ce --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,41 @@ +{ + "env": { + "es2021": true, + "node": true + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "rules": { + "indent": [ + "error", + 4 + ], + "linebreak-style": [ + "error", + "windows" + ], + "quotes": [ + "error", + "double" + ], + "semi": [ + "error", + "always" + ], + "no-unused-vars": [ + "error", + { + "args": "none" + } + ], + "no-constant-condition": [ + "error", + { + "checkLoops": false + } + ] + } +} diff --git a/commands/categories.js b/commands/categories.js index c53faef..c297992 100644 --- a/commands/categories.js +++ b/commands/categories.js @@ -1,6 +1,6 @@ -const { MessageEmbed } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); -const tokens = require('../index.js') +const { MessageEmbed } = require("discord.js"); +const { SlashCommandBuilder } = require("@discordjs/builders"); +const tokens = require("../index.js"); /** * Function to provide a list of categories for the given game @@ -10,15 +10,15 @@ module.exports = { * Builds /categories [string:game] */ data: new SlashCommandBuilder() - .setName('categories') - .setDescription('Shows the categories/variables for the provided game.') + .setName("categories") + .setDescription("Shows the categories/variables for the provided game.") .addStringOption(option => - option.setName('game') - .setDescription('Game to show categories') + option.setName("game") + .setDescription("Game to show categories") .setRequired(true) ), - async execute(interaction) { - const game = interaction.options.get('game').value.toLowerCase(); + async execute(interaction) { + const game = interaction.options.get("game").value.toLowerCase(); // Fetches the categories const { data } = await tokens.fetch(`https://www.speedrun.com/api/v1/games?abbreviation=${game}&embed=categories.variables`); // Checks if game exists @@ -27,30 +27,30 @@ module.exports = { } const [dataArr] = data; const embed = new MessageEmbed() - .setColor('118855') + .setColor("118855") .setTitle(dataArr.names.international) .setURL(dataArr.weblink) - .setThumbnail(dataArr.assets["cover-large"].uri) + .setThumbnail(dataArr.assets["cover-large"].uri); // Iterates through all the categories for the game let size = 0; for (const category of dataArr.categories.data) { - let variables = ''; + let variables = ""; // Checks if variables exist if (category.variables.data[0]) { let varArr = category.variables.data[0].values.values; // Gets alll the variablrd and adds them to the string varArr = Object.values(varArr); for (let j = 0; j < varArr.length; j++) { - variables += varArr[j].label + ', '; + variables += varArr[j].label + ", "; } variables = variables.slice(0, -2); } else { - variables = 'None'; + variables = "None"; } // Category for embed - const string = '**Category:** ' + category.name + '** - id:** ' + category.id + const string = "**Category:** " + category.name + "** - id:** " + category.id; // Variables for embed - const string2 = ' **Variables:** ' + variables + '\n'; + const string2 = " **Variables:** " + variables + "\n"; size += string.length + string2.length; if(size > 6000) { break; @@ -58,5 +58,5 @@ module.exports = { embed.addField(string, string2); } return await interaction.editReply({ embeds: [embed] }); - }, + }, }; \ No newline at end of file diff --git a/commands/dream.js b/commands/dream.js index 95d225a..c7f07b0 100644 --- a/commands/dream.js +++ b/commands/dream.js @@ -1,5 +1,5 @@ -const { MessageEmbed } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); +const { MessageEmbed } = require("discord.js"); +const { SlashCommandBuilder } = require("@discordjs/builders"); /** * Function to provide a simulation of Dream's pearl/blaze rod odds. @@ -9,14 +9,14 @@ module.exports = { * Builds /categories (integer:simulations) */ data: new SlashCommandBuilder() - .setName('dream') - .setDescription('Simulates Dream\'s pearl and blaze rod odds.') + .setName("dream") + .setDescription("Simulates Dream's pearl and blaze rod odds.") .addIntegerOption(option => - option.setName('simulations') - .setDescription('Number of simulations to run (Max 100,000') + option.setName("simulations") + .setDescription("Number of simulations to run (Max 100,000") ), - async execute(interaction) { - let sim = interaction.options.get('simulations'); + async execute(interaction) { + let sim = interaction.options.get("simulations"); // If the number of simulations was not specified then set sim to 1 if(!sim) { sim = 1; @@ -24,7 +24,7 @@ module.exports = { sim = sim.value; } if(sim > 100000) { - return await interaction.editReply('Too many simulations (' + sim + ')'); + return await interaction.editReply("Too many simulations (" + sim + ")"); } // Max pearls let pMax = 0; @@ -56,18 +56,18 @@ module.exports = { rTotal += rCount; } // Compares pearls to Dream - const difference = pMax >= 42 ? '+' + pMax - 42 : pMax - 42; + const difference = pMax >= 42 ? "+" + pMax - 42 : pMax - 42; // Compares rods to Dream - const difference2 = rMax >= 211 ? '+' + rMax - 211 : rMax - 211; + const difference2 = rMax >= 211 ? "+" + rMax - 211 : rMax - 211; const embed = new MessageEmbed() - .setColor('118855') - .setTitle('Your Results:') - .addField('Number of simulations: ', String(sim)) - .addField('Average number of pearl trades: ', String(pTotal / sim)) - .addField('Average number of rods: ', String(rTotal / sim)) - .addField('Max number of pearl trades: ' + pMax + '/262', 'Number of pearl trades (Dream): 42/262') - .addField('Max number of rods: ' + rMax + '/305', 'Number of rods (Dream): 211/305') - .setFooter('Difference: ' + difference + '/' + difference2) + .setColor("118855") + .setTitle("Your Results:") + .addField("Number of simulations: ", String(sim)) + .addField("Average number of pearl trades: ", String(pTotal / sim)) + .addField("Average number of rods: ", String(rTotal / sim)) + .addField("Max number of pearl trades: " + pMax + "/262", "Number of pearl trades (Dream): 42/262") + .addField("Max number of rods: " + rMax + "/305", "Number of rods (Dream): 211/305") + .setFooter({ text: "Difference: " + difference + "/" + difference2 }); await interaction.editReply({ embeds: [embed] }); - }, + }, }; \ No newline at end of file diff --git a/commands/help.js b/commands/help.js index ff03252..6b1ec6e 100644 --- a/commands/help.js +++ b/commands/help.js @@ -1,5 +1,5 @@ -const { MessageEmbed } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); +const { MessageEmbed } = require("discord.js"); +const { SlashCommandBuilder } = require("@discordjs/builders"); /** * Function to provide help for slash commands. @@ -9,24 +9,24 @@ module.exports = { * Builds /help */ data: new SlashCommandBuilder() - .setName('help') - .setDescription('Provides a list of commands and descriptions.'), - async execute(interaction) { + .setName("help") + .setDescription("Provides a list of commands and descriptions."), + async execute(interaction) { const embed = new MessageEmbed() - .setColor('118855') - .setTitle('Help') - .setThumbnail('https://www.speedrun.com/images/1st.png') - .addField('/help', 'Shows this help message.') - .addField('/hypixel', 'Provides helpful links for Hypixel Speedruns') - .addField('/link ', 'Sends a link to the provided game.') - .addField('/categories ', 'Shows the categories/variables for the provided game.') - .addField('/search (page)', 'Searches for games containing the keyword(s).') - .addField('/leaderboard ', 'Provides a leaderboard for the given game.') - .addField('/verified ', 'Provides the number of runs verified by the given user.') - .addField('/queuelength ', 'Provides the number of unverified runs for the given game.') - .addField('/dream (simulations)', 'Simulates Dream\'s pearl and blaze rod odds.') - .addField('/ping', 'Provides bot response time.') - await interaction.editReply('Sending you help!'); + .setColor("118855") + .setTitle("Help") + .setThumbnail("https://www.speedrun.com/images/1st.png") + .addField("/help", "Shows this help message.") + .addField("/hypixel", "Provides helpful links for Hypixel Speedruns") + .addField("/link ", "Sends a link to the provided game.") + .addField("/categories ", "Shows the categories/variables for the provided game.") + .addField("/search (page)", "Searches for games containing the keyword(s).") + .addField("/leaderboard ", "Provides a leaderboard for the given game.") + .addField("/verified ", "Provides the number of runs verified by the given user.") + .addField("/queuelength ", "Provides the number of unverified runs for the given game.") + .addField("/dream (simulations)", "Simulates Dream's pearl and blaze rod odds.") + .addField("/ping", "Provides bot response time."); + await interaction.editReply("Sending you help!"); await interaction.followUp({ embeds: [embed], ephemeral: true }); - }, + }, }; \ No newline at end of file diff --git a/commands/hypixel.js b/commands/hypixel.js index 501d38a..57c3f83 100644 --- a/commands/hypixel.js +++ b/commands/hypixel.js @@ -1,5 +1,5 @@ -const { MessageActionRow, MessageSelectMenu, MessageButton } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); +const { MessageActionRow, MessageSelectMenu, MessageButton } = require("discord.js"); +const { SlashCommandBuilder } = require("@discordjs/builders"); /** * Function to provide a link to a requested site @@ -9,262 +9,262 @@ module.exports = { * Builds /hypixel */ data: new SlashCommandBuilder() - .setName('hypixel') - .setDescription('Provides helpful links for Hypixel Speedruns'), - async execute(interaction) { + .setName("hypixel") + .setDescription("Provides helpful links for Hypixel Speedruns"), + async execute(interaction) { // Initial running of the command if(interaction.isCommand()) { const row = new MessageActionRow() .addComponents( new MessageSelectMenu() - .setCustomId('type') - .setPlaceholder('Nothing selected') + .setCustomId("type") + .setPlaceholder("Nothing selected") .addOptions([ { - label: 'General', - description: 'Get links to general Hypixel Speedruns Information', - value: 'General', + label: "General", + description: "Get links to general Hypixel Speedruns Information", + value: "General", }, { - label: 'Games', - description: 'Get links to Hypixel Speedrun Games', - value: 'Games', + label: "Games", + description: "Get links to Hypixel Speedrun Games", + value: "Games", }, { - label: 'Maps', - description: 'Get links to Hypixel Speedrun Maps', - value: 'Maps', + label: "Maps", + description: "Get links to Hypixel Speedrun Maps", + value: "Maps", }, { - label: 'Speedrun.com', - description: 'Links to speedrun.com resources', - value: 'Speedrun.com', + label: "Speedrun.com", + description: "Links to speedrun.com resources", + value: "Speedrun.com", }, ]), ); - return await interaction.editReply({ content: 'Please select a category!', components: [row] }); + return await interaction.editReply({ content: "Please select a category!", components: [row] }); } else if (interaction.isSelectMenu()) { // Second menu - if(interaction.customId == 'type') { - let options = ''; + if(interaction.customId == "type") { + let options = ""; switch(interaction.values[0]) { - case 'General': - options = [ - { - label: 'Hypixel Speedruns Discord', - description: 'Hypixel Speedruns Discord Link', - value: 'Hypixel Speedruns Discord', - }, - { - label: 'Hypixel Server Parkour Discord', - description: 'Hypixel Server Parkour Discord Link', - value: 'Hypixel Server Parkour Discord', - }, - { - label: 'Hypixel SkyBlock Speedruns Discord', - description: 'Hypixel SkyBlock Speedruns Discord Link', - value: 'Hypixel SkyBlock Speedruns Discord', - }, - { - label: 'Series', - description: 'Hypixel Series Link', - value: 'Series', - }, - { - label: 'Twitter', - description: 'Hypixel Speedruns Twitter', - value: 'Twitter', - }, - ]; - break; - case 'Games': - options = [ - { - label: 'SkyWars', - value: 'SkyWars', - }, - { - label: 'BedWars', - value: 'BedWars', - }, - { - label: 'Category Extensions', - value: 'Category Extensions', - }, - { - label: 'Arcade Games', - value: 'Arcade Games', - }, - { - label: 'Classic Games', - value: 'Classic Games', - }, - { - label: 'SMP', - value: 'SMP', - }, - { - label: 'The Pit', - value: 'The Pit', - }, - { - label: 'Server Parkour', - value: 'Server Parkour', - }, - ]; - break; - case 'Maps': - options = [ - { - label: 'Zombie Apocalypse', - value: 'Zombie Apocalypse', - }, - { - label: 'Wrath of the Fallen', - value: 'Wrath of the Fallen', - }, - { - label: 'Herobrine\'s Mansion', - value: 'Herobrine\'s Mansion', - }, - { - label: 'Herobrine\'s Return', - value: 'Herobrine\'s Return', - }, - { - label: 'Minecraft Star Wars', - value: 'Minecraft Star Wars', - }, - { - label: 'Creeper Dungeon', - value: 'Creeper Dungeon', - }, - ]; - break; - case 'Speedrun.com': - options = [ - { - label: 'Support Hub', - description: 'Speedrun.com support', - value: 'Support Hub', - }, - { - label: 'Knowledge Base', - description: 'Speedrun.com general site information', - value: 'Knowledge Base', - }, - { - label: 'Speedrun.com Discord', - description: 'Speedrun.com general Discord', - value: 'Speedrun.com Discord', - }, - { - label: 'Graphic Assets', - description: 'Speedrun.com Assets', - value: 'Graphic Assets', - }, - { - label: 'Speedrun.com Twitter', - description: 'Speedrun.com general Twitter', - value: 'Speedrun.com Twitter', - }, - ]; - break; + case "General": + options = [ + { + label: "Hypixel Speedruns Discord", + description: "Hypixel Speedruns Discord Link", + value: "Hypixel Speedruns Discord", + }, + { + label: "Hypixel Server Parkour Discord", + description: "Hypixel Server Parkour Discord Link", + value: "Hypixel Server Parkour Discord", + }, + { + label: "Hypixel SkyBlock Speedruns Discord", + description: "Hypixel SkyBlock Speedruns Discord Link", + value: "Hypixel SkyBlock Speedruns Discord", + }, + { + label: "Series", + description: "Hypixel Series Link", + value: "Series", + }, + { + label: "Twitter", + description: "Hypixel Speedruns Twitter", + value: "Twitter", + }, + ]; + break; + case "Games": + options = [ + { + label: "SkyWars", + value: "SkyWars", + }, + { + label: "BedWars", + value: "BedWars", + }, + { + label: "Category Extensions", + value: "Category Extensions", + }, + { + label: "Arcade Games", + value: "Arcade Games", + }, + { + label: "Classic Games", + value: "Classic Games", + }, + { + label: "SMP", + value: "SMP", + }, + { + label: "The Pit", + value: "The Pit", + }, + { + label: "Server Parkour", + value: "Server Parkour", + }, + ]; + break; + case "Maps": + options = [ + { + label: "Zombie Apocalypse", + value: "Zombie Apocalypse", + }, + { + label: "Wrath of the Fallen", + value: "Wrath of the Fallen", + }, + { + label: "Herobrine's Mansion", + value: "Herobrine's Mansion", + }, + { + label: "Herobrine's Return", + value: "Herobrine's Return", + }, + { + label: "Minecraft Star Wars", + value: "Minecraft Star Wars", + }, + { + label: "Creeper Dungeon", + value: "Creeper Dungeon", + }, + ]; + break; + case "Speedrun.com": + options = [ + { + label: "Support Hub", + description: "Speedrun.com support", + value: "Support Hub", + }, + { + label: "Knowledge Base", + description: "Speedrun.com general site information", + value: "Knowledge Base", + }, + { + label: "Speedrun.com Discord", + description: "Speedrun.com general Discord", + value: "Speedrun.com Discord", + }, + { + label: "Graphic Assets", + description: "Speedrun.com Assets", + value: "Graphic Assets", + }, + { + label: "Speedrun.com Twitter", + description: "Speedrun.com general Twitter", + value: "Speedrun.com Twitter", + }, + ]; + break; } const row = new MessageActionRow() .addComponents( new MessageSelectMenu() - .setCustomId('link') - .setPlaceholder('Nothing selected') + .setCustomId("link") + .setPlaceholder("Nothing selected") .addOptions(options), ); - return await interaction.update({ content: 'Please select a link!', components: [row] }); - } else if(interaction.customId == 'link') { + return await interaction.update({ content: "Please select a link!", components: [row] }); + } else if(interaction.customId == "link") { // Third menu let url; switch(interaction.values[0]) { - case 'Hypixel Speedruns Discord': - url = 'https://discord.gg/HhNKdB9FJk'; - break; - case 'Hypixel Server Parkour Discord': - url = 'https://discord.gg/RJTk7Bv'; - break; - case 'Hypixel SkyBlock Speedruns Discord': - url = 'https://discord.gg/vskJtfR'; - break; - case 'Series': - url = 'https://www.speedrun.com/hypixel' - break; - case 'Twitter': - url = 'https://twitter.com/HSpeedrunning' - break; - case 'SkyWars': - url = 'https://www.speedrun.com/hypixel_sw'; - break; - case 'BedWars': - url = 'https://www.speedrun.com/hypixel_bw' - break; - case 'Category Extensions': - url = 'https://www.speedrun.com/hypixel_ce' - break; - case 'Arcade Games': - url = 'https://www.speedrun.com/hypixel_ag' - break; - case 'Classic Games': - url = 'https://www.speedrun.com/hypixel_cg' - break; - case 'SMP': - url = 'https://www.speedrun.com/hypixel_smp' - break; - case 'The Pit': - url = 'https://www.speedrun.com/hypixel_tp' - break; - case 'Server Parkour': - url = 'https://www.speedrun.com/mcm_hsp' - break; - case 'Zombie Apocalypse': - url = 'https://www.speedrun.com/mcm_za'; - break; - case 'Wrath of the Fallen': - url = 'https://www.speedrun.com/mcm_wotf' - break; - case 'Herobrine\'s Mansion': - url = 'https://www.speedrun.com/mcm_hm' - break; - case 'Herobrine\'s Return': - url = 'https://www.speedrun.com/mcm_hr' - break; - case 'Minecraft Star Wars': - url = 'https://www.speedrun.com/mcm_sw' - break; - case 'Creeper Dungeon': - url = 'https://www.speedrun.com/mcm_cd' - break; - case 'Support Hub': - url = 'https://www.speedrun.com/knowledgebase/supporthub' - break; - case 'Knowledge Base': - url = 'https://www.speedrun.com/knowledgebase' - break; - case 'Speedrun.com Discord': - url = 'https://discord.gg/0h6sul1ZwHVpXJmK' - break; - case 'Graphic Assets': - url = 'https://www.speedrun.com/knowledgebase/graphic-assets' - break; - case 'Speedrun.com Twitter': - url = 'https://twitter.com/speedruncom' - break; + case "Hypixel Speedruns Discord": + url = "https://discord.gg/HhNKdB9FJk"; + break; + case "Hypixel Server Parkour Discord": + url = "https://discord.gg/RJTk7Bv"; + break; + case "Hypixel SkyBlock Speedruns Discord": + url = "https://discord.gg/vskJtfR"; + break; + case "Series": + url = "https://www.speedrun.com/hypixel"; + break; + case "Twitter": + url = "https://twitter.com/HSpeedrunning"; + break; + case "SkyWars": + url = "https://www.speedrun.com/hypixel_sw"; + break; + case "BedWars": + url = "https://www.speedrun.com/hypixel_bw"; + break; + case "Category Extensions": + url = "https://www.speedrun.com/hypixel_ce"; + break; + case "Arcade Games": + url = "https://www.speedrun.com/hypixel_ag"; + break; + case "Classic Games": + url = "https://www.speedrun.com/hypixel_cg"; + break; + case "SMP": + url = "https://www.speedrun.com/hypixel_smp"; + break; + case "The Pit": + url = "https://www.speedrun.com/hypixel_tp"; + break; + case "Server Parkour": + url = "https://www.speedrun.com/mcm_hsp"; + break; + case "Zombie Apocalypse": + url = "https://www.speedrun.com/mcm_za"; + break; + case "Wrath of the Fallen": + url = "https://www.speedrun.com/mcm_wotf"; + break; + case "Herobrine's Mansion": + url = "https://www.speedrun.com/mcm_hm"; + break; + case "Herobrine's Return": + url = "https://www.speedrun.com/mcm_hr"; + break; + case "Minecraft Star Wars": + url = "https://www.speedrun.com/mcm_sw"; + break; + case "Creeper Dungeon": + url = "https://www.speedrun.com/mcm_cd"; + break; + case "Support Hub": + url = "https://www.speedrun.com/knowledgebase/supporthub"; + break; + case "Knowledge Base": + url = "https://www.speedrun.com/knowledgebase"; + break; + case "Speedrun.com Discord": + url = "https://discord.gg/0h6sul1ZwHVpXJmK"; + break; + case "Graphic Assets": + url = "https://www.speedrun.com/knowledgebase/graphic-assets"; + break; + case "Speedrun.com Twitter": + url = "https://twitter.com/speedruncom"; + break; } const row = new MessageActionRow() - .addComponents( - new MessageButton() - .setLabel(interaction.values[0]) - .setStyle('LINK') - .setURL(url), - ); - await interaction.update({ content: interaction.values[0] + ' Link:', components: [row] }); + .addComponents( + new MessageButton() + .setLabel(interaction.values[0]) + .setStyle("LINK") + .setURL(url), + ); + await interaction.update({ content: interaction.values[0] + " Link:", components: [row] }); } } - }, + }, }; \ No newline at end of file diff --git a/commands/leaderboard.js b/commands/leaderboard.js index 9352639..f4a7ae0 100644 --- a/commands/leaderboard.js +++ b/commands/leaderboard.js @@ -1,6 +1,6 @@ -const tokens = require('../index.js'); -const { MessageEmbed } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); +const tokens = require("../index.js"); +const { MessageEmbed } = require("discord.js"); +const { SlashCommandBuilder } = require("@discordjs/builders"); /** * Function to provide a leaderboard of WRs to a certain game @@ -10,19 +10,19 @@ module.exports = { * Builds /leaderboard [string:game] */ data: new SlashCommandBuilder() - .setName('leaderboard') - .setDescription('Provides a leaderboard for the given game.') + .setName("leaderboard") + .setDescription("Provides a leaderboard for the given game.") .addStringOption(option => - option.setName('game') - .setDescription('Game to get leaderboard') + option.setName("game") + .setDescription("Game to get leaderboard") .setRequired(true) ), - async execute(interaction) { + async execute(interaction) { // From rsp via https://stackoverflow.com/questions/12303989/cartesian-product-of-multiple-arrays-in-javascript // Provides cartesian product of arrays const cartesian = (...a) => a.reduce((a, b) => a.flatMap(d => b.map(e => [d, e].flat()))); - const game = interaction.options.get('game').value.toLowerCase(); + const game = interaction.options.get("game").value.toLowerCase(); // Retrieves all subcategories for the full game and ILs const {data} = await tokens.fetch(`https://www.speedrun.com/api/v1/games/${game}?embed=categories.variables,levels.variables`); @@ -41,7 +41,7 @@ module.exports = { if(category.type == "per-game") { let subArr = []; let idArr = []; - for(sub of category.variables.data) { + for(const sub of category.variables.data) { if(sub["is-subcategory"]){ const options = Object.keys(sub.values.values); subArr.push(options); @@ -114,12 +114,12 @@ module.exports = { let date = new Date().toISOString().slice(0, 10); let embed = new MessageEmbed() - .setColor('118855') - .setTitle('Leaderboard for ' + game + ':') + .setColor("118855") + .setTitle("Leaderboard for " + game + ":") .setThumbnail(data.assets["cover-large"].uri) - .setFooter(date) - .addField('Full Game Progress:', `${progress}/${count}`) - .addField('Individual Levels Progress:', `${progress2}/${count2}`) + .setFooter({ text: date }) + .addField("Full Game Progress:", `${progress}/${count}`) + .addField("Individual Levels Progress:", `${progress2}/${count2}`); await interaction.editReply({ embeds: [embed] }); let playerList = []; // Iterates through each category @@ -167,9 +167,9 @@ module.exports = { } else { varString += `&var-${c[1][0]}=${o}`; } - data2 = await tokens.fetch(`https://www.speedrun.com/api/v1/leaderboards/${game}/category/${c[0]}?` + varString.substr(1) + '&top=1&embed=players'); + data2 = await tokens.fetch(`https://www.speedrun.com/api/v1/leaderboards/${game}/category/${c[0]}?` + varString.substr(1) + "&top=1&embed=players"); if(!data2.data) { - console.log(`https://www.speedrun.com/api/v1/leaderboards/${game}/category/${c[0]}?` + varString.substr(1) + '&top=1&embed=players'); + console.log(`https://www.speedrun.com/api/v1/leaderboards/${game}/category/${c[0]}?` + varString.substr(1) + "&top=1&embed=players"); console.log(data2); continue; } @@ -205,12 +205,12 @@ module.exports = { // Update embed if enough progress has been made if(Math.floor(progress/10) > lastEmbed) { embed = new MessageEmbed() - .setColor('118855') - .setTitle('Leaderboard for ' + game + ':') + .setColor("118855") + .setTitle("Leaderboard for " + game + ":") .setThumbnail(data.assets["cover-large"].uri) - .setFooter(date) - .addField('Full Game Progress:', `${progress}/${count}`) - .addField('Individual Levels Progress:', `${progress2}/${count2}`) + .setFooter({ text: date }) + .addField("Full Game Progress:", `${progress}/${count}`) + .addField("Individual Levels Progress:", `${progress2}/${count2}`); await interaction.editReply({ embeds: [embed] }); lastEmbed = Math.floor(progress/10); } @@ -261,9 +261,9 @@ module.exports = { } else { varString += `&var-${c[1][1][0]}=${o}`; } - data3 = await tokens.fetch(`https://www.speedrun.com/api/v1/leaderboards/${game}/level/${c[0]}/${c[1][0]}?` + varString.substr(1) + '&top=1&embed=players'); + data3 = await tokens.fetch(`https://www.speedrun.com/api/v1/leaderboards/${game}/level/${c[0]}/${c[1][0]}?` + varString.substr(1) + "&top=1&embed=players"); if(!data3.data) { - console.log(`https://www.speedrun.com/api/v1/leaderboards/${game}/level/${c[0]}/${c[1][0]}?` + varString.substr(1) + '&top=1&embed=players'); + console.log(`https://www.speedrun.com/api/v1/leaderboards/${game}/level/${c[0]}/${c[1][0]}?` + varString.substr(1) + "&top=1&embed=players"); console.log(data3); continue; } @@ -299,12 +299,12 @@ module.exports = { // Update embed if enough progress has been made if(Math.floor(progress2/10) > lastEmbed) { embed = new MessageEmbed() - .setColor('118855') - .setTitle('Leaderboard for ' + game + ':') + .setColor("118855") + .setTitle("Leaderboard for " + game + ":") .setThumbnail(data.assets["cover-large"].uri) - .setFooter(date) - .addField('Full Game Progress:', `${progress}/${count}`) - .addField('Individual Levels Progress:', `${progress2}/${count2}`) + .setFooter({ text: date }) + .addField("Full Game Progress:", `${progress}/${count}`) + .addField("Individual Levels Progress:", `${progress2}/${count2}`); await interaction.editReply({ embeds: [embed] }); lastEmbed = Math.floor(progress2/10); } @@ -315,18 +315,18 @@ module.exports = { return b[1] - a[1]; }); // Remove N/A - playerList = playerList.filter(word => word[0].toLowerCase() !== 'n/a'); + playerList = playerList.filter(word => word[0].toLowerCase() !== "n/a"); // Which place to display let place = 1; let iterator = 0; let countPlayer = 0; embed = new MessageEmbed() - .setColor('118855') - .setTitle('Leaderboard for ' + game + ':') + .setColor("118855") + .setTitle("Leaderboard for " + game + ":") .setThumbnail(data.assets["cover-large"].uri) - .setFooter(date) + .setFooter({ text: date }); for(const player of playerList) { - embed.addField('#' + place + ' ' + player[0].replace(/[\\*_~]/g, "\\$&"), `WRs:${player[1]}`, true) + embed.addField("#" + place + " " + player[0].replace(/[\\*_~]/g, "\\$&"), `WRs:${player[1]}`, true); countPlayer++; // Increment only if next WR count is not equal to this count if(playerList[iterator + 1] && playerList[iterator + 1][1] != playerList[iterator][1]) { @@ -338,5 +338,5 @@ module.exports = { iterator++; } await interaction.editReply({ embeds: [embed] }); - }, + }, }; \ No newline at end of file diff --git a/commands/link.js b/commands/link.js index 33770a2..214e34c 100644 --- a/commands/link.js +++ b/commands/link.js @@ -1,6 +1,6 @@ -const { MessageEmbed } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); -const tokens = require('../index.js') +const { MessageEmbed } = require("discord.js"); +const { SlashCommandBuilder } = require("@discordjs/builders"); +const tokens = require("../index.js"); /** * Function to provide a link to the given game @@ -10,28 +10,28 @@ module.exports = { * Builds /link [string:game] */ data: new SlashCommandBuilder() - .setName('link') - .setDescription('Sends a link to the provided game.') + .setName("link") + .setDescription("Sends a link to the provided game.") .addStringOption(option => - option.setName('game') - .setDescription('Game to link') + option.setName("game") + .setDescription("Game to link") .setRequired(true) ), - async execute(interaction) { - const game = interaction.options.get('game').value.toLowerCase(); + async execute(interaction) { + const game = interaction.options.get("game").value.toLowerCase(); // Gets the requested game const {data} = await tokens.fetch(`https://www.speedrun.com/api/v1/games?abbreviation=${game}`); - [answer] = data; + const [answer] = data; // Checks if game exists if (!answer || answer.length == 0) { return await interaction.editReply(`No results found for **${game}**.`); } // Embed to return const embed = new MessageEmbed() - .setColor('118855') + .setColor("118855") .setTitle(answer.names.international) .setURL(answer.weblink) - .setThumbnail(answer.assets["cover-large"].uri) + .setThumbnail(answer.assets["cover-large"].uri); await interaction.editReply({ embeds: [embed] }); - }, + }, }; \ No newline at end of file diff --git a/commands/ping.js b/commands/ping.js index 986637b..6181036 100644 --- a/commands/ping.js +++ b/commands/ping.js @@ -1,5 +1,5 @@ -const { MessageEmbed } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); +const { MessageEmbed } = require("discord.js"); +const { SlashCommandBuilder } = require("@discordjs/builders"); /** * Function to provide the bot's ping @@ -9,13 +9,13 @@ module.exports = { * Builds /ping */ data: new SlashCommandBuilder() - .setName('ping') - .setDescription('Provides bot response time.'), - async execute(interaction) { + .setName("ping") + .setDescription("Provides bot response time."), + async execute(interaction) { const embed = new MessageEmbed() - .setColor('118855') - .setThumbnail('https://www.speedrun.com/images/1st.png') - .setTitle(`Ping: ${Date.now() - interaction.createdTimestamp}ms`) + .setColor("118855") + .setThumbnail("https://www.speedrun.com/images/1st.png") + .setTitle(`Ping: ${Date.now() - interaction.createdTimestamp}ms`); await interaction.editReply({ embeds: [embed] }); - }, + }, }; \ No newline at end of file diff --git a/commands/search.js b/commands/search.js index d690a9f..57102ea 100644 --- a/commands/search.js +++ b/commands/search.js @@ -1,6 +1,6 @@ -const { MessageEmbed } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); -const tokens = require('../index.js') +const { MessageEmbed } = require("discord.js"); +const { SlashCommandBuilder } = require("@discordjs/builders"); +const tokens = require("../index.js"); /** * Function to search for a specified game @@ -10,20 +10,20 @@ module.exports = { * Builds /search [string:query] (integer:page) */ data: new SlashCommandBuilder() - .setName('search') - .setDescription('Searches for games containing the keyword(s).') + .setName("search") + .setDescription("Searches for games containing the keyword(s).") .addStringOption(option => - option.setName('query') - .setDescription('Search query') + option.setName("query") + .setDescription("Search query") .setRequired(true) ) .addIntegerOption(option => - option.setName('page') - .setDescription('Which page would you like to view?') + option.setName("page") + .setDescription("Which page would you like to view?") ), - async execute(interaction) { - const search = interaction.options.get('query').value.toLowerCase(); - let page = interaction.options.get('page'); + async execute(interaction) { + const search = interaction.options.get("query").value.toLowerCase(); + let page = interaction.options.get("page"); // If page is not specified default to 1 if(!page) { page = 1; @@ -34,25 +34,25 @@ module.exports = { // Fetch games at the given page const { data } = await tokens.fetch(`https://www.speedrun.com/api/v1/games?name=${search}&offset=${offset}`); if (!data.length) { - return interaction.editReply(`No results found for **${search}**.`) + return interaction.editReply(`No results found for **${search}**.`); } const answer = []; // Iterates through each game and gets the name and url for (let i = 0; i < data.length; i++) { answer[i] = []; answer[i][0] = data[i].names.international; - answer[i][1] = data[i].abbreviation + '\n' + data[i].weblink; + answer[i][1] = data[i].abbreviation + "\n" + data[i].weblink; } const embed = new MessageEmbed() - .setColor('118855') - .setTitle('Results (Count: ' + answer.length + ', Page: ' + page + ')') - .setThumbnail('https://www.speedrun.com/images/1st.png') + .setColor("118855") + .setTitle("Results (Count: " + answer.length + ", Page: " + page + ")") + .setThumbnail("https://www.speedrun.com/images/1st.png"); answer.forEach(entry => { embed.addField(entry[0], entry[1]); }); if (answer.length == 20) { - embed.setFooter('There may be more pages. Use /search ') + embed.setFooter({ text: "There may be more pages. Use /search " }); } return await interaction.editReply({ embeds: [embed] }); - }, + }, }; \ No newline at end of file diff --git a/commands/unverified.js b/commands/unverified.js index 7560028..8f36074 100644 --- a/commands/unverified.js +++ b/commands/unverified.js @@ -1,6 +1,6 @@ -const { MessageEmbed } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); -const tokens = require('../index.js') +const { MessageEmbed } = require("discord.js"); +const { SlashCommandBuilder } = require("@discordjs/builders"); +const tokens = require("../index.js"); /** * Function to provide a list of unverified runs in the queue for a game @@ -10,19 +10,19 @@ module.exports = { * Builds /queuelength [string:game] */ data: new SlashCommandBuilder() - .setName('queuelength') - .setDescription('Provides the number of unverified runs for the given game.') + .setName("queuelength") + .setDescription("Provides the number of unverified runs for the given game.") .addStringOption(option => - option.setName('game') - .setDescription('Game to search') + option.setName("game") + .setDescription("Game to search") .setRequired(true) ), - async execute(interaction) { - const game = interaction.options.get('game').value.toLowerCase(); + async execute(interaction) { + const game = interaction.options.get("game").value.toLowerCase(); // Gets the game for the id const gameData = await tokens.fetch(`https://www.speedrun.com/api/v1/games/${game}`); if(!gameData.data) { - return await interaction.editReply('Game does not exist.'); + return await interaction.editReply("Game does not exist."); } // Gets the first page of unverified runs const id = gameData.data.id; @@ -34,15 +34,15 @@ module.exports = { } const num = data.pagination.offset + data.pagination.size; const embed = new MessageEmbed() - .setColor('118855') - .setTitle('Result for: ' + game) - .setThumbnail(gameData.data.assets["cover-large"].uri) + .setColor("118855") + .setTitle("Result for: " + game) + .setThumbnail(gameData.data.assets["cover-large"].uri); if(firstPage) { - embed.addField('Number of unverified runs: ', String(num)) - .addField('Oldest unverified run: ', firstPage.submitted.substring(0,10)) + embed.addField("Number of unverified runs: ", String(num)) + .addField("Oldest unverified run: ", firstPage.submitted.substring(0,10)); } else { - embed.addField('Number of unverified runs: ', String(num)) + embed.addField("Number of unverified runs: ", String(num)); } await interaction.editReply({ embeds: [embed] }); - }, + }, }; \ No newline at end of file diff --git a/commands/verified.js b/commands/verified.js index c9bd2b7..8ff9383 100644 --- a/commands/verified.js +++ b/commands/verified.js @@ -1,6 +1,6 @@ -const { MessageEmbed } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); -const tokens = require('../index.js') +const { MessageEmbed } = require("discord.js"); +const { SlashCommandBuilder } = require("@discordjs/builders"); +const tokens = require("../index.js"); /** * Returns the number of runs verified by the user @@ -10,20 +10,20 @@ module.exports = { * Builds /verified [string:user] */ data: new SlashCommandBuilder() - .setName('verified') - .setDescription('Provides the number of runs verified by the given user.') + .setName("verified") + .setDescription("Provides the number of runs verified by the given user.") .addStringOption(option => - option.setName('user') - .setDescription('User to search') + option.setName("user") + .setDescription("User to search") .setRequired(true) ), - async execute(interaction) { - const user = interaction.options.get('user').value.toLowerCase(); + async execute(interaction) { + const user = interaction.options.get("user").value.toLowerCase(); // Search for user on speedrun.com const playerData = await tokens.fetch(`https://www.speedrun.com/api/v1/users/${user}`); // If player doesn't exist if(!playerData.data) { - return await interaction.editReply('User does not exist.'); + return await interaction.editReply("User does not exist."); } // Retrieve runs for game const id = playerData.data.id; @@ -36,10 +36,10 @@ module.exports = { const num = data.pagination.offset + data.pagination.size; // Creates embed const embed = new MessageEmbed() - .setColor('118855') - .setTitle('Result for: ' + user) - .addField('Number of runs verified: ', num >= 10000 ? '>= 10k' : String(num)) - .setThumbnail(playerData.data.assets.image.uri) + .setColor("118855") + .setTitle("Result for: " + user) + .addField("Number of runs verified: ", num >= 10000 ? ">= 10k" : String(num)) + .setThumbnail(playerData.data.assets.image.uri); return await interaction.editReply({ embeds: [embed] }); - }, + }, }; \ No newline at end of file diff --git a/index.js b/index.js index 1e27643..fe69720 100644 --- a/index.js +++ b/index.js @@ -1,25 +1,25 @@ // Imports -const { Client, Intents, Collection } = require('discord.js'); -const fs = require('fs'); -const Limit = require('./Limiter.js'); -const Queue = require('queue-promise'); +const { Client, Intents, Collection } = require("discord.js"); +const fs = require("fs"); +const Limit = require("./Limiter.js"); +const Queue = require("queue-promise"); const limiter = new Limit(95, 70000); const mojangLimiter = new Limit(600, 600000); const hypixelLimiter = new Limit(120, 60000); -const { REST } = require('@discordjs/rest'); -const { Routes } = require('discord-api-types/v9'); -const fetch = (...args) => import('node-fetch').then(({default: fetch}) => fetch(...args)); +//const { REST } = require("@discordjs/rest"); +//const { Routes } = require("discord-api-types/v9"); +const fetch = (...args) => import("node-fetch").then(({default: fetch}) => fetch(...args)); const { MongoClient } = require("mongodb"); -var cron = require('node-cron'); -require('dotenv').config(); +var cron = require("node-cron"); +require("dotenv").config(); // Creates a rate limiting queue const queue = new Queue({ - concurrent: 1 + concurrent: 1 }); // Prefix to call the bot -const prefix = 'src!'; +const prefix = "src!"; // Determines the token for bot let token = process.env.token; let hypixel = process.env.hypixel; @@ -32,20 +32,19 @@ client.commands = new Collection(); client.msgCommands = new Collection(); const commands = []; -const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); +const commandFiles = fs.readdirSync("./commands").filter(file => file.endsWith(".js")); for (const file of commandFiles) { - const command = require(`./commands/${file}`); - commands.push(command.data.toJSON()); - client.commands.set(command.data.name, command); + const command = require(`./commands/${file}`); + commands.push(command.data.toJSON()); + client.commands.set(command.data.name, command); } -const msgCommands = []; -const msgCommandFiles = fs.readdirSync('./messagecommands').filter(file => file.endsWith('.js')); +const msgCommandFiles = fs.readdirSync("./messagecommands").filter(file => file.endsWith(".js")); for (const file of msgCommandFiles) { - const command = require(`./messagecommands/${file}`); - client.msgCommands.set(command.data.name, command); + const command = require(`./messagecommands/${file}`); + client.msgCommands.set(command.data.name, command); } /** @@ -67,47 +66,47 @@ const rest = new REST({ version: '9' }).setToken(token); */ -const scheduledCommandFiles = fs.readdirSync('./scheduledcommands').filter(file => file.endsWith('.js')); +const scheduledCommandFiles = fs.readdirSync("./scheduledcommands").filter(file => file.endsWith(".js")); for (const file of scheduledCommandFiles) { - const command = require(`./scheduledcommands/${file}`); - cron.schedule(command.data.interval, () => { - command.execute(client); - }); + const command = require(`./scheduledcommands/${file}`); + cron.schedule(command.data.interval, () => { + command.execute(client); + }); } // Sets bot activity and announces that bot is ready for use -client.once('ready', async () => { - client.user.setActivity('speedrun.com | /help', { type: 'WATCHING' }) - console.log('Ready!'); +client.once("ready", async () => { + client.user.setActivity("speedrun.com | /help", { type: "WATCHING" }); + console.log("Ready!"); }); -client.on('messageCreate', async message => { - // Checks if message starts with the given prefix - if (!message.content.toLowerCase().startsWith(prefix) || message.author.bot) return; - console.log(message.content); - const command = message.content.toLowerCase().slice(4).split(' '); - if (!client.msgCommands.has(command[0])) return; - try { - await client.msgCommands.get(command[0]).execute(command, message); - } catch (error) { - console.error(error); - } +client.on("messageCreate", async message => { + // Checks if message starts with the given prefix + if (!message.content.toLowerCase().startsWith(prefix) || message.author.bot) return; + console.log(message.content); + const command = message.content.toLowerCase().slice(4).split(" "); + if (!client.msgCommands.has(command[0])) return; + try { + await client.msgCommands.get(command[0]).execute(command, message); + } catch (error) { + console.error(error); + } }); -client.on('interactionCreate', async interaction => { - if(interaction.isCommand()) { - if (!client.commands.has(interaction.commandName)) return; - await interaction.deferReply(); - try { - await client.commands.get(interaction.commandName).execute(interaction); - } catch (error) { - console.error(error); - await interaction.editReply({ content: 'There was an error while executing this command!', ephemeral: true }); - } - } else if(interaction.isSelectMenu()) { - await client.commands.get('hypixel').execute(interaction); - } +client.on("interactionCreate", async interaction => { + if(interaction.isCommand()) { + if (!client.commands.has(interaction.commandName)) return; + await interaction.deferReply(); + try { + await client.commands.get(interaction.commandName).execute(interaction); + } catch (error) { + console.error(error); + await interaction.editReply({ content: "There was an error while executing this command!", ephemeral: true }); + } + } else if(interaction.isSelectMenu()) { + await client.commands.get("hypixel").execute(interaction); + } }); client.login(token); @@ -117,51 +116,51 @@ exports.hypixel = hypixel; exports.src = src; exports.limit = function getLimit() { - return limiter; -} + return limiter; +}; exports.queue = function getQueue() { - return queue; -} + return queue; +}; exports.fetch = async function limitFetch(text) { - let data; - while(1) { - await limiter.removePoints(1).then(data = await fetch(text).then(response => response.json())); - if(data.status != 420) { - return data; - } - await sleep(2000); - } -} + let data; + while(true) { + await limiter.removePoints(1).then(data = await fetch(text).then(response => response.json())); + if(data.status != 420) { + return data; + } + await sleep(2000); + } +}; exports.post = async function limitPost(text, params) { - let data; - while(1) { - await limiter.removePoints(1).then(data = await fetch(text, params).then(response => response.json())); - if(data.status != 420) { - return data; - } - await sleep(2000); - } -} + let data; + while(true) { + await limiter.removePoints(1).then(data = await fetch(text, params).then(response => response.json())); + if(data.status != 420) { + return data; + } + await sleep(2000); + } +}; exports.fetchMojang = async function limitMojangFetch(text) { - let data; - await mojangLimiter.removePoints(1).then(data = await fetch(text).then(response => response.json()).catch( reason => {})); - return data; -} + let data; + await mojangLimiter.removePoints(1).then(data = await fetch(text).then(response => response.json()).catch()); + return data; +}; exports.fetchHypixel = async function limitHypixelFetch(text) { - let data; - await hypixelLimiter.removePoints(1).then(data = await fetch(text).then(response => response.json())); - return data; -} + let data; + await hypixelLimiter.removePoints(1).then(data = await fetch(text).then(response => response.json())); + return data; +}; function sleep(ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); } const uri = mongourl; diff --git a/messagecommands/banlist.js b/messagecommands/banlist.js index 801aba4..1f6a4cb 100644 --- a/messagecommands/banlist.js +++ b/messagecommands/banlist.js @@ -1,33 +1,33 @@ -const { MessageEmbed } = require('discord.js'); -const token = require('../index.js'); +const { MessageEmbed } = require("discord.js"); +const token = require("../index.js"); /** * Interacts with banlist database */ - module.exports = { +module.exports = { data: { - name: 'banlist' + name: "banlist" }, - async execute(command, message) { + async execute(command, message) { // Command only works in certain channels (staff-commands and my testing server) - if(message.channel != '795130167696556093' && message.channel != '728402518014689333') return; + if(message.channel != "795130167696556093" && message.channel != "728402518014689333") return; switch(command[1]) { - case 'add': - await add(command[2], message); - break; - case 'remove': - await del(command[2], message); - break; - case 'list': - await list(message); - break; - case 'search': - await search(command[2], message); - break; - default: - message.reply('src!banlist list\nsrc!banlist add (player)\nsrc!banlist remove (player)\nsrc!banlist search (player)') + case "add": + await add(command[2], message); + break; + case "remove": + await del(command[2], message); + break; + case "list": + await list(message); + break; + case "search": + await search(command[2], message); + break; + default: + message.reply("src!banlist list\nsrc!banlist add (player)\nsrc!banlist remove (player)\nsrc!banlist search (player)"); } - }, + }, }; /** @@ -41,20 +41,20 @@ async function add(id, message) { // Gets player from mojang api const player = await token.fetchMojang(`https://api.mojang.com/users/profiles/minecraft/${id}`); if(!player) { - return await message.reply('Player does not exist'); + return await message.reply("Player does not exist"); } if(!player.id) { - return await message.reply('Error getting UUID'); + return await message.reply("Error getting UUID"); } const doc = { id: player.id, owner: message.author.id, time: date - } + }; await token.db.connect(); - await token.db.db('banned_runners').collection('mc').insertOne(doc); + await token.db.db("banned_runners").collection("mc").insertOne(doc); await token.db.close(); - return await message.reply('Player added to banlist'); + return await message.reply("Player added to banlist"); } /** @@ -67,11 +67,11 @@ async function del(id, message) { // Gets player from mojang api const player = await token.fetchMojang(`https://api.mojang.com/users/profiles/minecraft/${id}`); if(!player) { - return await message.reply('Player does not exist'); + return await message.reply("Player does not exist"); } const query = { id: player.id }; await token.db.connect(); - const result = await token.db.db('banned_runners').collection('mc').deleteMany(query); + const result = await token.db.db("banned_runners").collection("mc").deleteMany(query); if (result.deletedCount >= 1) { await token.db.close(); return await message.reply("Successfully deleted player."); @@ -88,15 +88,15 @@ async function del(id, message) { */ async function list(message) { await token.db.connect(); - const cursor = token.db.db('banned_runners').collection('mc').find(); + const cursor = token.db.db("banned_runners").collection("mc").find(); let results = await cursor.toArray(); await token.db.close(); - let str = '```'; + let str = "```"; for(const player of results) { const player2 = await token.fetchMojang(`https://api.mojang.com/user/profiles/${player.id}/names`); - str += 'IGN: ' + player2[player2.length - 1].name + '\n'; + str += "IGN: " + player2[player2.length - 1].name + "\n"; } - return await message.reply(str + '```'); + return await message.reply(str + "```"); } /** @@ -109,20 +109,20 @@ async function search(id, message) { // Gets player from mojang api const player = await token.fetchMojang(`https://api.mojang.com/users/profiles/minecraft/${id}`); if(!player) { - return await message.reply('Player does not exist'); + return await message.reply("Player does not exist"); } const query = { id: player.id }; await token.db.connect(); - const result = await token.db.db('banned_runners').collection('mc').findOne(query); + const result = await token.db.db("banned_runners").collection("mc").findOne(query); await token.db.close(); if(!result) { - return await message.reply('Player is not in banlist'); + return await message.reply("Player is not in banlist"); } const embed = new MessageEmbed() - .setColor('118855') - .setTitle(`Name: ${id}`) - .addField('UUID', result.id) - .addField('Added by', '<@' + result.owner + '>') - .addField('Date', result.time.substr(0, 10)) + .setColor("118855") + .setTitle(`Name: ${id}`) + .addField("UUID", result.id) + .addField("Added by", "<@" + result.owner + ">") + .addField("Date", result.time.substr(0, 10)); return await message.reply({ embeds: [embed] }); } \ No newline at end of file diff --git a/messagecommands/check.js b/messagecommands/check.js index 21af5db..f44f085 100644 --- a/messagecommands/check.js +++ b/messagecommands/check.js @@ -1,26 +1,26 @@ -const token = require('../index.js'); +const token = require("../index.js"); /** * Checks a list of players for friends/guild members and the banlist */ - module.exports = { +module.exports = { data: { - name: 'check' + name: "check" }, - async execute(command, message) { + async execute(command, message) { // Command only works in certain channels (staff-commands and my testing server) - if(message.channel != '795130167696556093' && message.channel != '728402518014689333') return; + if(message.channel != "795130167696556093" && message.channel != "728402518014689333") return; const igns = command.slice(1); const players = []; - let result = '```\n'; - let runners = '```\n'; + let result = "```\n"; + let runners = "```\n"; // Gets uuid of each ign for(const ign of igns) { const player = await token.fetchMojang(`https://api.mojang.com/users/profiles/minecraft/${ign}`); if(player) { players.push(player); } else { - result += ign + ' does not exist.\n'; + result += ign + " does not exist.\n"; } } for(const player of players) { @@ -28,20 +28,20 @@ const token = require('../index.js'); const friends = await token.fetchHypixel(`https://api.hypixel.net/friends?uuid=${player.id}&key=${token.hypixel}`); // Gets guild list of player const guild = await token.fetchHypixel(`https://api.hypixel.net/guild?player=${player.id}&key=${token.hypixel}`); - result += player.name + ':\n'; + result += player.name + ":\n"; // Checks if player is friends with other players for(const friend of friends.records) { if(friend.uuidSender != player.id) { for(const player2 of players) { if(player2.id == friend.uuidSender) { - result += '\t' + player2.name + ' (Friend)\n'; + result += "\t" + player2.name + " (Friend)\n"; } } } if(friend.uuidReceiver != player.id) { for(const player2 of players) { if(player2.id == friend.uuidReceiver) { - result += '\t' + player2.name + ' (Friend)\n'; + result += "\t" + player2.name + " (Friend)\n"; } } } @@ -51,7 +51,7 @@ const token = require('../index.js'); for(const gm of guild.guild.members) { for(const player2 of players) { if(player2.id != player.id && gm.uuid == player2.id) { - result += '\t' + player2.name + ' (Guild)\n'; + result += "\t" + player2.name + " (Guild)\n"; } } } @@ -59,20 +59,20 @@ const token = require('../index.js'); // Checks if player is in banlist or known runners const query = { id: player.id }; await token.db.connect(); - const searchResult = await token.db.db('banned_runners').collection('mc').findOne(query); - const searchResult2 = await token.db.db('known_runners').collection('mc').findOne(query); + const searchResult = await token.db.db("banned_runners").collection("mc").findOne(query); + const searchResult2 = await token.db.db("known_runners").collection("mc").findOne(query); await token.db.close(); if(searchResult) { - result += '\t' + player.name + ' (**Banlist**)\n'; + result += "\t" + player.name + " (**Banlist**)\n"; } if(searchResult2) { - const account = await token.fetch(`https://www.speedrun.com/api/v1/users/${searchResult2.account}`) - runners += player.name + ': ' + `https://speedrun.com/user/${account.data.names.international}\n`; + const account = await token.fetch(`https://www.speedrun.com/api/v1/users/${searchResult2.account}`); + runners += player.name + ": " + `https://speedrun.com/user/${account.data.names.international}\n`; } } - await message.channel.send(result + '```'); + await message.channel.send(result + "```"); if(runners.length > 4) { - await message.channel.send(runners + '```'); + await message.channel.send(runners + "```"); } - }, + }, }; \ No newline at end of file diff --git a/messagecommands/dream.js b/messagecommands/dream.js index 0b2bf0c..1d33cfb 100644 --- a/messagecommands/dream.js +++ b/messagecommands/dream.js @@ -1,21 +1,20 @@ -const { MessageEmbed } = require('discord.js'); -const { SlashCommandBuilder } = require('@discordjs/builders'); +const { MessageEmbed } = require("discord.js"); /** * Function to provide a simulation of Dream's pearl/blaze rod odds. */ module.exports = { data: { - name: 'dream' + name: "dream" }, - async execute(command, message) { + async execute(command, message) { let sim = parseInt(command[1]); // If the number of simulations was not specified then set sim to 1 if(!sim) { sim = 1; } if(sim > 100000) { - return await message.reply('Too many simulations (' + sim + ')'); + return await message.reply("Too many simulations (" + sim + ")"); } // Max pearls let pMax = 0; @@ -47,18 +46,18 @@ module.exports = { rTotal += rCount; } // Compares pearls to Dream - const difference = pMax >= 42 ? '+' + pMax - 42 : pMax - 42; + const difference = pMax >= 42 ? "+" + pMax - 42 : pMax - 42; // Compares rods to Dream - const difference2 = rMax >= 211 ? '+' + rMax - 211 : rMax - 211; + const difference2 = rMax >= 211 ? "+" + rMax - 211 : rMax - 211; const embed = new MessageEmbed() - .setColor('118855') - .setTitle('Your Results:') - .addField('Number of simulations: ', String(sim)) - .addField('Average number of pearl trades: ', String(pTotal / sim)) - .addField('Average number of rods: ', String(rTotal / sim)) - .addField('Max number of pearl trades: ' + pMax + '/262', 'Number of pearl trades (Dream): 42/262') - .addField('Max number of rods: ' + rMax + '/305', 'Number of rods (Dream): 211/305') - .setFooter('Difference: ' + difference + '/' + difference2) + .setColor("118855") + .setTitle("Your Results:") + .addField("Number of simulations: ", String(sim)) + .addField("Average number of pearl trades: ", String(pTotal / sim)) + .addField("Average number of rods: ", String(rTotal / sim)) + .addField("Max number of pearl trades: " + pMax + "/262", "Number of pearl trades (Dream): 42/262") + .addField("Max number of rods: " + rMax + "/305", "Number of rods (Dream): 211/305") + .setFooter({ text: "Difference: " + difference + "/" + difference2 }); await message.reply({ embeds: [embed] }); - }, + }, }; \ No newline at end of file diff --git a/messagecommands/runners.js b/messagecommands/runners.js index 9634d7c..8a94060 100644 --- a/messagecommands/runners.js +++ b/messagecommands/runners.js @@ -1,36 +1,36 @@ -const { MessageEmbed } = require('discord.js'); -const token = require('../index.js'); +const { MessageEmbed } = require("discord.js"); +const token = require("../index.js"); /** * Interacts with banlist database */ - module.exports = { +module.exports = { data: { - name: 'runners' + name: "runners" }, - async execute(command, message) { + async execute(command, message) { // Command only works in certain channels (staff-commands and my testing server) - if((command[1] == 'add' || command[1] == 'remove') && message.channel != '795130167696556093' && message.channel != '728402518014689333') return; + if((command[1] == "add" || command[1] == "remove") && message.channel != "795130167696556093" && message.channel != "728402518014689333") return; switch(command[1]) { - case 'add': - await add(command[2], command[3], message); - break; - case 'remove': - await del(command[2], message); - break; - case 'list': - await list(message); - break; - case 'search': - await search(command[2], message); - break; - case 'searchsrc': - await searchSRC(command[2], message); - break; - default: - message.reply('src!runners list\nsrc!runners add (player) (src account)\nsrc!runners remove (player)\nsrc!runners search (player)\nsrc!runners searchsrc (user)') + case "add": + await add(command[2], command[3], message); + break; + case "remove": + await del(command[2], message); + break; + case "list": + await list(message); + break; + case "search": + await search(command[2], message); + break; + case "searchsrc": + await searchSRC(command[2], message); + break; + default: + message.reply("src!runners list\nsrc!runners add (player) (src account)\nsrc!runners remove (player)\nsrc!runners search (player)\nsrc!runners searchsrc (user)"); } - }, + }, }; /** @@ -41,37 +41,37 @@ const token = require('../index.js'); */ async function add(id, account, message) { if(!id || !account) { - return await message.reply('src!runners add (player) (src account)'); + return await message.reply("src!runners add (player) (src account)"); } const date = new Date().toISOString(); // Gets player from mojang api const player = await token.fetchMojang(`https://api.mojang.com/users/profiles/minecraft/${id}`); - const src = await token.fetch(`https://www.speedrun.com/api/v1/users/${account}`) + const src = await token.fetch(`https://www.speedrun.com/api/v1/users/${account}`); if(!player) { - return await message.reply('Player does not exist'); + return await message.reply("Player does not exist"); } if(!player.id) { - return await message.reply('Error getting UUID'); + return await message.reply("Error getting UUID"); } if(!src.data) { - return await message.reply('SRC Account does not exist') + return await message.reply("SRC Account does not exist"); } const doc = { id: player.id, owner: message.author.id, time: date, account: src.data.id - } + }; const query = { id: player.id }; await token.db.connect(); - const result = await token.db.db('known_runners').collection('mc').findOne(query); + const result = await token.db.db("known_runners").collection("mc").findOne(query); if(!result) { - await token.db.db('known_runners').collection('mc').insertOne(doc); + await token.db.db("known_runners").collection("mc").insertOne(doc); await token.db.close(); - return await message.reply('Player added to known runners'); + return await message.reply("Player added to known runners"); } await token.db.close(); - return await message.reply('Player already known'); + return await message.reply("Player already known"); } /** @@ -82,16 +82,16 @@ async function add(id, account, message) { */ async function del(id, message) { if(!id) { - return await message.reply('src!runners remove (player)'); + return await message.reply("src!runners remove (player)"); } // Gets player from mojang api const player = await token.fetchMojang(`https://api.mojang.com/users/profiles/minecraft/${id}`); if(!player) { - return await message.reply('Player does not exist'); + return await message.reply("Player does not exist"); } const query = { id: player.id }; await token.db.connect(); - const result = await token.db.db('known_runners').collection('mc').deleteMany(query); + const result = await token.db.db("known_runners").collection("mc").deleteMany(query); if (result.deletedCount >= 1) { await token.db.close(); return await message.reply("Successfully deleted player."); @@ -108,15 +108,15 @@ async function del(id, message) { */ async function list(message) { await token.db.connect(); - const cursor = token.db.db('known_runners').collection('mc').find(); + const cursor = token.db.db("known_runners").collection("mc").find(); let results = await cursor.toArray(); await token.db.close(); - let str = '```'; + let str = "```"; for(const player of results) { const player2 = await token.fetchMojang(`https://api.mojang.com/user/profiles/${player.id}/names`); - str += player2[player2.length - 1].name + ', '; + str += player2[player2.length - 1].name + ", "; } - return await message.reply(str.slice(0, -2) + '```'); + return await message.reply(str.slice(0, -2) + "```"); } /** @@ -127,29 +127,29 @@ async function list(message) { */ async function search(id, message) { if(!id) { - return await message.reply('src!runners search (player)'); + return await message.reply("src!runners search (player)"); } // Gets player from mojang api const player = await token.fetchMojang(`https://api.mojang.com/users/profiles/minecraft/${id}`); if(!player) { - return await message.reply('Player does not exist'); + return await message.reply("Player does not exist"); } const query = { id: player.id }; await token.db.connect(); - const result = await token.db.db('known_runners').collection('mc').findOne(query); + const result = await token.db.db("known_runners").collection("mc").findOne(query); await token.db.close(); if(!result) { - return await message.reply('Player is not in known runners'); + return await message.reply("Player is not in known runners"); } - const src = await token.fetch(`https://www.speedrun.com/api/v1/users/${result.account}`) + const src = await token.fetch(`https://www.speedrun.com/api/v1/users/${result.account}`); const embed = new MessageEmbed() - .setColor('118855') - .setTitle(`Name: ${id}`) - .setURL(`https://sk1er.club/s/${id}`) - .addField('Speedrun.com', src.data.weblink) - .addField('UUID', result.id) - .addField('Added by', '<@' + result.owner + '>') - .addField('Date', result.time.substr(0, 10)) + .setColor("118855") + .setTitle(`Name: ${id}`) + .setURL(`https://sk1er.club/s/${id}`) + .addField("Speedrun.com", src.data.weblink) + .addField("UUID", result.id) + .addField("Added by", "<@" + result.owner + ">") + .addField("Date", result.time.substr(0, 10)); return await message.reply({ embeds: [embed] }); } @@ -159,31 +159,31 @@ async function search(id, message) { * @param {*} message message to reply to * @returns message reply */ - async function searchSRC(id, message) { +async function searchSRC(id, message) { if(!id) { - return await message.reply('src!runners searchsrc (user)'); + return await message.reply("src!runners searchsrc (user)"); } // Gets player from src api - const src = await token.fetch(`https://www.speedrun.com/api/v1/users/${id}`) + const src = await token.fetch(`https://www.speedrun.com/api/v1/users/${id}`); if(!src.data) { - return await message.reply('SRC user does not exist'); + return await message.reply("SRC user does not exist"); } const query = { account: src.data.id }; await token.db.connect(); - const result = await token.db.db('known_runners').collection('mc').find(query); + const result = await token.db.db("known_runners").collection("mc").find(query); if(!result.hasNext) { - return await message.reply('Player is not in known runners'); + return await message.reply("Player is not in known runners"); } const accounts = await result.toArray(); await token.db.close(); const embed = new MessageEmbed() - .setColor('118855') + .setColor("118855") .setTitle(`Name: ${src.data.names.international}`) - .setURL(src.data.weblink) + .setURL(src.data.weblink); for(const account of accounts) { // Gets player from mojang api const player = await token.fetchMojang(`https://api.mojang.com/user/profiles/${account.id}/names`); - embed.addField(`${player[player.length - 1].name}`, `[Stats](https://sk1er.club/s/${player[player.length - 1].name})`) + embed.addField(`${player[player.length - 1].name}`, `[Stats](https://sk1er.club/s/${player[player.length - 1].name})`); } return await message.reply({ embeds: [embed] }); } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index cf1e8fc..700339c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,13 +13,15 @@ "@discordjs/rest": "^0.3.0", "discord.js": "^13.6.0", "dotenv": "^16.0.0", - "eslint": "^8.10.0", "mongodb": "^4.4.0", "node-cron": "^3.0.0", "node-fetch": "^3.2.0", "perf_hooks": "0.0.1", "queue-promise": "^2.2.1" }, + "devDependencies": { + "eslint": "^8.10.0" + }, "engines": { "node": "16.6.1", "npm": "7.20.3" @@ -108,6 +110,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", + "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -127,6 +130,7 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, "engines": { "node": ">= 4" } @@ -135,6 +139,7 @@ "version": "0.9.2", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -147,7 +152,8 @@ "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true }, "node_modules/@sapphire/async-queue": { "version": "1.1.9", @@ -231,6 +237,7 @@ "version": "8.7.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true, "bin": { "acorn": "bin/acorn" }, @@ -242,6 +249,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -250,6 +258,7 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -265,6 +274,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -272,7 +282,8 @@ "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "node_modules/asynckit": { "version": "0.4.0", @@ -282,7 +293,8 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/base64-js": { "version": "1.5.1", @@ -307,6 +319,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -350,6 +363,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, "engines": { "node": ">=6" } @@ -358,6 +372,7 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -373,6 +388,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -387,6 +403,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -397,12 +414,14 @@ "node_modules/chalk/node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/chalk/node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "engines": { "node": ">=8" } @@ -411,6 +430,7 @@ "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "dependencies": { "has-flag": "^4.0.0" }, @@ -432,12 +452,14 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -459,6 +481,7 @@ "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -474,7 +497,8 @@ "node_modules/deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true }, "node_modules/delayed-stream": { "version": "1.0.0", @@ -578,6 +602,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, "dependencies": { "esutils": "^2.0.2" }, @@ -597,6 +622,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, "engines": { "node": ">=10" }, @@ -608,6 +634,7 @@ "version": "8.10.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", + "dev": true, "dependencies": { "@eslint/eslintrc": "^1.2.0", "@humanwhocodes/config-array": "^0.9.2", @@ -659,6 +686,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -671,6 +699,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, "dependencies": { "eslint-visitor-keys": "^2.0.0" }, @@ -688,6 +717,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, "engines": { "node": ">=10" } @@ -696,6 +726,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -704,6 +735,7 @@ "version": "9.3.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "dev": true, "dependencies": { "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", @@ -717,6 +749,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -728,6 +761,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -739,6 +773,7 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, "engines": { "node": ">=4.0" } @@ -747,6 +782,7 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -754,17 +790,20 @@ "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "node_modules/fetch-blob": { "version": "3.1.4", @@ -792,6 +831,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, "dependencies": { "flat-cache": "^3.0.4" }, @@ -803,6 +843,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, "dependencies": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -814,7 +855,8 @@ "node_modules/flatted": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==" + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "dev": true }, "node_modules/form-data": { "version": "4.0.0", @@ -843,17 +885,20 @@ "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true }, "node_modules/glob": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -873,6 +918,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -884,6 +930,7 @@ "version": "13.12.1", "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", + "dev": true, "dependencies": { "type-fest": "^0.20.2" }, @@ -917,6 +964,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true, "engines": { "node": ">= 4" } @@ -925,6 +973,7 @@ "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -940,6 +989,7 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, "engines": { "node": ">=0.8.19" } @@ -948,6 +998,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -956,7 +1007,8 @@ "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "node_modules/ip": { "version": "1.1.5", @@ -967,6 +1019,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -975,6 +1028,7 @@ "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, "dependencies": { "is-extglob": "^2.1.1" }, @@ -985,12 +1039,14 @@ "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "dependencies": { "argparse": "^2.0.1" }, @@ -1001,17 +1057,20 @@ "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -1023,7 +1082,8 @@ "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true }, "node_modules/memory-pager": { "version": "1.5.0", @@ -1054,6 +1114,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -1109,12 +1170,14 @@ "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true }, "node_modules/node-cron": { "version": "3.0.0", @@ -1166,6 +1229,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "dependencies": { "wrappy": "1" } @@ -1174,6 +1238,7 @@ "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -1190,6 +1255,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, "dependencies": { "callsites": "^3.0.0" }, @@ -1201,6 +1267,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -1209,6 +1276,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, "engines": { "node": ">=8" } @@ -1222,6 +1290,7 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, "engines": { "node": ">= 0.8.0" } @@ -1246,6 +1315,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, "engines": { "node": ">=8" }, @@ -1257,6 +1327,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, "engines": { "node": ">=4" } @@ -1265,6 +1336,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "dependencies": { "glob": "^7.1.3" }, @@ -1291,6 +1363,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "dependencies": { "shebang-regex": "^3.0.0" }, @@ -1302,6 +1375,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, "engines": { "node": ">=8" } @@ -1341,6 +1415,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -1352,6 +1427,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, "engines": { "node": ">=8" }, @@ -1362,7 +1438,8 @@ "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true }, "node_modules/tr46": { "version": "3.0.0", @@ -1389,6 +1466,7 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, "dependencies": { "prelude-ls": "^1.2.1" }, @@ -1400,6 +1478,7 @@ "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, "engines": { "node": ">=10" }, @@ -1411,6 +1490,7 @@ "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "dependencies": { "punycode": "^2.1.0" } @@ -1418,7 +1498,8 @@ "node_modules/v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true }, "node_modules/web-streams-polyfill": { "version": "3.2.0", @@ -1452,6 +1533,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "dependencies": { "isexe": "^2.0.0" }, @@ -1466,6 +1548,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -1473,7 +1556,8 @@ "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "node_modules/ws": { "version": "8.4.2", @@ -1569,6 +1653,7 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", + "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -1584,7 +1669,8 @@ "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true } } }, @@ -1592,6 +1678,7 @@ "version": "0.9.2", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.2.tgz", "integrity": "sha512-UXOuFCGcwciWckOpmfKDq/GyhlTf9pN/BzG//x8p8zTOFEcGuA68ANXheFS0AGvy3qgZqLBUkMs7hqzqCKOVwA==", + "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", "debug": "^4.1.1", @@ -1601,7 +1688,8 @@ "@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" + "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "dev": true }, "@sapphire/async-queue": { "version": "1.1.9", @@ -1669,18 +1757,21 @@ "acorn": { "version": "8.7.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz", - "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==" + "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==", + "dev": true }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, "requires": {} }, "ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -1691,12 +1782,14 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true }, "argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==" + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true }, "asynckit": { "version": "0.4.0", @@ -1706,7 +1799,8 @@ "balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "base64-js": { "version": "1.5.1", @@ -1717,6 +1811,7 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1742,12 +1837,14 @@ "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -1757,6 +1854,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -1765,6 +1863,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -1772,17 +1871,20 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, "requires": { "has-flag": "^4.0.0" } @@ -1800,12 +1902,14 @@ "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1821,6 +1925,7 @@ "version": "4.3.3", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz", "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==", + "dev": true, "requires": { "ms": "2.1.2" } @@ -1828,7 +1933,8 @@ "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true }, "delayed-stream": { "version": "1.0.0", @@ -1906,6 +2012,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, "requires": { "esutils": "^2.0.2" } @@ -1918,12 +2025,14 @@ "escape-string-regexp": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true }, "eslint": { "version": "8.10.0", "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", + "dev": true, "requires": { "@eslint/eslintrc": "^1.2.0", "@humanwhocodes/config-array": "^0.9.2", @@ -1966,6 +2075,7 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", + "dev": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -1975,6 +2085,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, "requires": { "eslint-visitor-keys": "^2.0.0" }, @@ -1982,19 +2093,22 @@ "eslint-visitor-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==" + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true } } }, "eslint-visitor-keys": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==" + "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", + "dev": true }, "espree": { "version": "9.3.1", "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz", "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==", + "dev": true, "requires": { "acorn": "^8.7.0", "acorn-jsx": "^5.3.1", @@ -2005,6 +2119,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, "requires": { "estraverse": "^5.1.0" } @@ -2013,6 +2128,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, "requires": { "estraverse": "^5.2.0" } @@ -2020,27 +2136,32 @@ "estraverse": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==" + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true }, "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "fetch-blob": { "version": "3.1.4", @@ -2055,6 +2176,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, "requires": { "flat-cache": "^3.0.4" } @@ -2063,6 +2185,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, "requires": { "flatted": "^3.1.0", "rimraf": "^3.0.2" @@ -2071,7 +2194,8 @@ "flatted": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", - "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==" + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "dev": true }, "form-data": { "version": "4.0.0", @@ -2094,17 +2218,20 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true }, "glob": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2118,6 +2245,7 @@ "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, "requires": { "is-glob": "^4.0.3" } @@ -2126,6 +2254,7 @@ "version": "13.12.1", "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.1.tgz", "integrity": "sha512-317dFlgY2pdJZ9rspXDks7073GpDmXdfbM3vYYp0HAMKGDh1FfWPleI2ljVNLQX5M5lXcAslTcPTrOrMEFOjyw==", + "dev": true, "requires": { "type-fest": "^0.20.2" } @@ -2138,12 +2267,14 @@ "ignore": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==" + "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", + "dev": true }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -2152,12 +2283,14 @@ "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=" + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -2166,7 +2299,8 @@ "inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true }, "ip": { "version": "1.1.5", @@ -2176,12 +2310,14 @@ "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true }, "is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -2189,12 +2325,14 @@ "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, "requires": { "argparse": "^2.0.1" } @@ -2202,17 +2340,20 @@ "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, "requires": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -2221,7 +2362,8 @@ "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true }, "memory-pager": { "version": "1.5.0", @@ -2246,6 +2388,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2287,12 +2430,14 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=" + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true }, "node-cron": { "version": "3.0.0", @@ -2321,6 +2466,7 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -2329,6 +2475,7 @@ "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, "requires": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -2342,6 +2489,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, "requires": { "callsites": "^3.0.0" } @@ -2349,12 +2497,14 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true }, "perf_hooks": { "version": "0.0.1", @@ -2364,7 +2514,8 @@ "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true }, "punycode": { "version": "2.1.1", @@ -2379,17 +2530,20 @@ "regexpp": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==" + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "requires": { "glob": "^7.1.3" } @@ -2407,6 +2561,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, "requires": { "shebang-regex": "^3.0.0" } @@ -2414,7 +2569,8 @@ "shebang-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true }, "smart-buffer": { "version": "4.2.0", @@ -2443,6 +2599,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -2450,12 +2607,14 @@ "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=" + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true }, "tr46": { "version": "3.0.0", @@ -2479,6 +2638,7 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, "requires": { "prelude-ls": "^1.2.1" } @@ -2486,12 +2646,14 @@ "type-fest": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, "requires": { "punycode": "^2.1.0" } @@ -2499,7 +2661,8 @@ "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", - "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true }, "web-streams-polyfill": { "version": "3.2.0", @@ -2524,6 +2687,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, "requires": { "isexe": "^2.0.0" } @@ -2531,12 +2695,14 @@ "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==" + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "ws": { "version": "8.4.2", diff --git a/package.json b/package.json index 071d436..e6f9605 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "src bot", "main": "index.js", "scripts": { + "lint": "eslint . --ext .js --fix", "test": "echo \"Error: no test specified\" && exit 1" }, "author": "penguin", @@ -13,7 +14,6 @@ "@discordjs/rest": "^0.3.0", "discord.js": "^13.6.0", "dotenv": "^16.0.0", - "eslint": "^8.10.0", "mongodb": "^4.4.0", "node-cron": "^3.0.0", "node-fetch": "^3.2.0", @@ -23,5 +23,8 @@ "engines": { "node": "16.6.1", "npm": "7.20.3" + }, + "devDependencies": { + "eslint": "^8.10.0" } } diff --git a/scheduledcommands/checkInvalid.js b/scheduledcommands/checkInvalid.js index 1966254..9801fbb 100644 --- a/scheduledcommands/checkInvalid.js +++ b/scheduledcommands/checkInvalid.js @@ -1,4 +1,4 @@ -const tokens = require('../index.js'); +const tokens = require("../index.js"); /** * Modified version of leaderboard.js to perform daily leaderboard updates and combine data @@ -7,20 +7,20 @@ module.exports = { data: { interval: "0 */5 * * * *" }, - async execute(client) { - let data = await tokens.fetch(`https://www.speedrun.com/api/v1/runs?status=new&category=zd3q41ek&max=${Math.floor(Math.random() * 10 + 10)}`) + async execute(client) { + let data = await tokens.fetch(`https://www.speedrun.com/api/v1/runs?status=new&category=zd3q41ek&max=${Math.floor(Math.random() * 10 + 10)}`); for(const run of data.data) { const status = { "status": { "status": "rejected", "reason": "This run is managed by a bot. Please do not submit runs here." } - } + }; await tokens.post(`https://www.speedrun.com/api/v1/runs/${run.id}/status`, { - method: 'put', + method: "put", body: JSON.stringify(status), - headers: {'Content-Type': 'application/json', 'X-API-Key': tokens.src} - }) + headers: {"Content-Type": "application/json", "X-API-Key": tokens.src} + }); } - }, + }, }; \ No newline at end of file diff --git a/scheduledcommands/combinedLB.js b/scheduledcommands/combinedLB.js index 5f77062..bb1a792 100644 --- a/scheduledcommands/combinedLB.js +++ b/scheduledcommands/combinedLB.js @@ -1,4 +1,4 @@ -const tokens = require('../index.js'); +const tokens = require("../index.js"); /** * Modified version of leaderboard.js to perform daily leaderboard updates and combine data @@ -7,14 +7,14 @@ module.exports = { data: { interval: "0 0 6 * * *" }, - async execute(client) { + async execute(client) { await findPlayers("824m59e2", "Solo"); await findPlayers("wkpmj40k", "Doubles"); await findPlayers("wdmlzyxk", "3v3v3v3"); await findPlayers("vdom0912", "4v4v4v4"); await findPlayers("wkpm70jk", "4v4"); await updateRuns("zd3q41ek"); - }, + }, }; let players = []; @@ -36,7 +36,7 @@ async function findPlayers(category, mode) { record[mode] = { time: run.run.times.primary_t, link: run.run.weblink - } + }; } else if(run.run.times.primary_t < record[mode]) { record[mode].time = run.run.times.primary_t; record[mode].link = run.run.weblink; @@ -51,8 +51,8 @@ async function findPlayers(category, mode) { time: run.run.times.primary_t, link: run.run.weblink } - } - players.push(p) + }; + players.push(p); } } } @@ -63,9 +63,11 @@ async function updateRuns(category) { const data = await tokens.fetch(`https://www.speedrun.com/api/v1/categories/${category}/records?top=100`); // Filters out only the players with a time in every category players = players.filter(function(player) { - return player.hasOwnProperty("Solo") && player.hasOwnProperty("Doubles") - && player.hasOwnProperty("3v3v3v3") && player.hasOwnProperty("4v4v4v4") - && player.hasOwnProperty("4v4"); + return Object.prototype.hasOwnProperty.call(player, "Solo") && + Object.prototype.hasOwnProperty.call(player, "Doubles") && + Object.prototype.hasOwnProperty.call(player, "3v3v3v3") && + Object.prototype.hasOwnProperty.call(player, "4v4v4v4") && + Object.prototype.hasOwnProperty.call(player, "4v4"); }); next: // Iterates through each player @@ -99,12 +101,12 @@ async function updateRuns(category) { emulated: false, comment: `Solo: ${player["Solo"].link}\nDoubles: ${player["Doubles"].link}\n3v3v3v3: ${player["3v3v3v3"].link}\n4v4v4v4: ${player["4v4v4v4"].link}\n4v4: ${player["4v4"].link}` } - } + }; // Submits the run await tokens.post("https://www.speedrun.com/api/v1/runs", { - method: 'post', + method: "post", body: JSON.stringify(run), - headers: {'Content-Type': 'application/json', 'X-API-Key': tokens.src} + headers: {"Content-Type": "application/json", "X-API-Key": tokens.src} }); } } \ No newline at end of file diff --git a/scheduledcommands/dailyLB.js b/scheduledcommands/dailyLB.js index 84ab8aa..0254bb7 100644 --- a/scheduledcommands/dailyLB.js +++ b/scheduledcommands/dailyLB.js @@ -1,5 +1,5 @@ -const tokens = require('../index.js'); -const { MessageEmbed } = require('discord.js'); +const tokens = require("../index.js"); +const { MessageEmbed } = require("discord.js"); /** * Modified version of leaderboard.js to perform daily leaderboard updates and combine data @@ -8,27 +8,27 @@ module.exports = { data: { interval: "0 0 5 * * *" }, - async execute(client) { + async execute(client) { const daily = [ - 'hypixel_sb', - 'hypixel_sbce' - ]; - const daily2 = [ - 'hypixel_ce', - 'hypixel_bw', - 'hypixel_bwce', - 'hypixel_sw', - 'hypixel_ag', - 'hypixel_cg', - 'hypixel_sg', - 'hypixel_duels', - 'hypixel_tp', - 'tkr', - ]; - await runDaily(daily, await client.channels.cache.get('792473904391651369')); + "hypixel_sb", + "hypixel_sbce" + ]; + const daily2 = [ + "hypixel_ce", + "hypixel_bw", + "hypixel_bwce", + "hypixel_sw", + "hypixel_ag", + "hypixel_cg", + "hypixel_sg", + "hypixel_duels", + "hypixel_tp", + "tkr", + ]; + await runDaily(daily, await client.channels.cache.get("792473904391651369")); await sleep(10000); - await runDaily(daily2, await client.channels.cache.get('782073727881183304')); - }, + await runDaily(daily2, await client.channels.cache.get("782073727881183304")); + }, }; /** @@ -66,34 +66,34 @@ async function runDaily(games, channel) { } let date = new Date().toISOString().slice(0, 10); let embed = new MessageEmbed() - .setColor('118855') - .setTitle('Top Players for Group:') - .setFooter(date) - for(player of topPlayers) { - embed.addField(player.replace(/[\\*_~]/g, "\\$&"), '\u200b', true); - } + .setColor("118855") + .setTitle("Top Players for Group:") + .setFooter({ text: date }); + for(let player of topPlayers) { + embed.addField(player.replace(/[\\*_~]/g, "\\$&"), "\u200b", true); + } await channel.send({ embeds: [embed] }); embed = new MessageEmbed() - .setColor('118855') - .setTitle('Top WRs for Group:') - .setFooter(date) - totalScores.sort(function(a, b) { - return b[1] - a[1]; - }); - let place = 1; - let iterator = 0; - let countPlayer = 0; - for(player of totalScores) { - embed.addField('#' + place + ' ' + player[0].replace(/[\\*_~]/g, "\\$&"), `WRs:${player[1]}`, true) - countPlayer++; - if(totalScores[iterator + 1] && totalScores[iterator + 1][1] != totalScores[iterator][1]) { - place++; - } - if(countPlayer > 30) { - break; - } - iterator++; + .setColor("118855") + .setTitle("Top WRs for Group:") + .setFooter({ text: date }); + totalScores.sort(function(a, b) { + return b[1] - a[1]; + }); + let place = 1; + let iterator = 0; + let countPlayer = 0; + for(let player of totalScores) { + embed.addField("#" + place + " " + player[0].replace(/[\\*_~]/g, "\\$&"), `WRs:${player[1]}`, true); + countPlayer++; + if(totalScores[iterator + 1] && totalScores[iterator + 1][1] != totalScores[iterator][1]) { + place++; } + if(countPlayer > 30) { + break; + } + iterator++; + } await channel.send({ embeds: [embed] }); } async function generateBoard(game, channel) { @@ -118,7 +118,7 @@ async function generateBoard(game, channel) { if(category.type == "per-game") { let subArr = []; let idArr = []; - for(sub of category.variables.data) { + for(const sub of category.variables.data) { if(sub["is-subcategory"]){ const options = Object.keys(sub.values.values); subArr.push(options); @@ -191,12 +191,12 @@ async function generateBoard(game, channel) { let date = new Date().toISOString().slice(0, 10); let embed = new MessageEmbed() - .setColor('118855') - .setTitle('Leaderboard for ' + game + ':') + .setColor("118855") + .setTitle("Leaderboard for " + game + ":") .setThumbnail(data.assets["cover-large"].uri) - .setFooter(date) - .addField('Full Game Progress:', `${progress}/${count}`) - .addField('Individual Levels Progress:', `${progress2}/${count2}`) + .setFooter({ text: date }) + .addField("Full Game Progress:", `${progress}/${count}`) + .addField("Individual Levels Progress:", `${progress2}/${count2}`); let message = await channel.send({ embeds: [embed] }); let playerList = []; // Iterates through each category @@ -244,9 +244,9 @@ async function generateBoard(game, channel) { } else { varString += `&var-${c[1][0]}=${o}`; } - data2 = await tokens.fetch(`https://www.speedrun.com/api/v1/leaderboards/${game}/category/${c[0]}?` + varString.substr(1) + '&top=1&embed=players'); + data2 = await tokens.fetch(`https://www.speedrun.com/api/v1/leaderboards/${game}/category/${c[0]}?` + varString.substr(1) + "&top=1&embed=players"); if(!data2.data) { - console.log(`https://www.speedrun.com/api/v1/leaderboards/${game}/category/${c[0]}?` + varString.substr(1) + '&top=1&embed=players'); + console.log(`https://www.speedrun.com/api/v1/leaderboards/${game}/category/${c[0]}?` + varString.substr(1) + "&top=1&embed=players"); console.log(data2); continue; } @@ -282,12 +282,12 @@ async function generateBoard(game, channel) { // Update embed if enough progress has been made if(Math.floor(progress/10) > lastEmbed) { embed = new MessageEmbed() - .setColor('118855') - .setTitle('Leaderboard for ' + game + ':') + .setColor("118855") + .setTitle("Leaderboard for " + game + ":") .setThumbnail(data.assets["cover-large"].uri) - .setFooter(date) - .addField('Full Game Progress:', `${progress}/${count}`) - .addField('Individual Levels Progress:', `${progress2}/${count2}`) + .setFooter({ text: date }) + .addField("Full Game Progress:", `${progress}/${count}`) + .addField("Individual Levels Progress:", `${progress2}/${count2}`); await message.edit({ embeds: [embed] }); lastEmbed = Math.floor(progress/10); } @@ -338,9 +338,9 @@ async function generateBoard(game, channel) { } else { varString += `&var-${c[1][1][0]}=${o}`; } - data3 = await tokens.fetch(`https://www.speedrun.com/api/v1/leaderboards/${game}/level/${c[0]}/${c[1][0]}?` + varString.substr(1) + '&top=1&embed=players'); + data3 = await tokens.fetch(`https://www.speedrun.com/api/v1/leaderboards/${game}/level/${c[0]}/${c[1][0]}?` + varString.substr(1) + "&top=1&embed=players"); if(!data3.data) { - console.log(`https://www.speedrun.com/api/v1/leaderboards/${game}/level/${c[0]}/${c[1][0]}?` + varString.substr(1) + '&top=1&embed=players'); + console.log(`https://www.speedrun.com/api/v1/leaderboards/${game}/level/${c[0]}/${c[1][0]}?` + varString.substr(1) + "&top=1&embed=players"); console.log(data3); continue; } @@ -376,12 +376,12 @@ async function generateBoard(game, channel) { // Update embed if enough progress has been made if(Math.floor(progress2/10) > lastEmbed) { embed = new MessageEmbed() - .setColor('118855') - .setTitle('Leaderboard for ' + game + ':') + .setColor("118855") + .setTitle("Leaderboard for " + game + ":") .setThumbnail(data.assets["cover-large"].uri) - .setFooter(date) - .addField('Full Game Progress:', `${progress}/${count}`) - .addField('Individual Levels Progress:', `${progress2}/${count2}`) + .setFooter({ text: date }) + .addField("Full Game Progress:", `${progress}/${count}`) + .addField("Individual Levels Progress:", `${progress2}/${count2}`); await message.edit({ embeds: [embed] }); lastEmbed = Math.floor(progress2/10); } @@ -392,18 +392,18 @@ async function generateBoard(game, channel) { return b[1] - a[1]; }); // Remove N/A - playerList = playerList.filter(word => word[0].toLowerCase() !== 'n/a'); + playerList = playerList.filter(word => word[0].toLowerCase() !== "n/a"); // Which place to display let place = 1; let iterator = 0; let countPlayer = 0; embed = new MessageEmbed() - .setColor('118855') - .setTitle('Leaderboard for ' + game + ':') + .setColor("118855") + .setTitle("Leaderboard for " + game + ":") .setThumbnail(data.assets["cover-large"].uri) - .setFooter(date) + .setFooter({ text: date }); for(const player of playerList) { - embed.addField('#' + place + ' ' + player[0].replace(/[\\*_~]/g, "\\$&"), `WRs:${player[1]}`, true) + embed.addField("#" + place + " " + player[0].replace(/[\\*_~]/g, "\\$&"), `WRs:${player[1]}`, true); countPlayer++; // Increment only if next WR count is not equal to this count if(playerList[iterator + 1] && playerList[iterator + 1][1] != playerList[iterator][1]) { @@ -419,7 +419,7 @@ async function generateBoard(game, channel) { } function sleep(ms) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); + return new Promise((resolve) => { + setTimeout(resolve, ms); + }); }