From 8375c2482b03629bbe30b07defdb8d4ce232c561 Mon Sep 17 00:00:00 2001 From: earth Date: Sat, 2 Oct 2021 09:21:39 -0500 Subject: [PATCH] Fix a few bugs, clean up a few things --- .gitignore | 3 +- adab data.xlsx | Bin 30915 -> 30895 bytes bot.js | 11 +- .../TimeStudyApplicationCommand.js | 29 +- classes/FunctionClasses/Checks.js | 29 +- classes/FunctionClasses/Message.js | 3 +- .../MetaApplicationCommand.js => Meta.js} | 118 +--- commands/challenge.js | 2 +- commands/eternitychallenge.js | 544 +----------------- commands/meta.js | 15 - database.sqlite | Bin 65536 -> 65536 bytes timeTags.sqlite | Bin 131072 -> 131072 bytes utils/actualMessages.js | 35 +- utils/ecs.js | 541 +++++++++++++++++ 14 files changed, 631 insertions(+), 699 deletions(-) rename classes/{ApplicationCommand/MetaApplicationCommand.js => Meta.js} (64%) delete mode 100644 commands/meta.js create mode 100644 utils/ecs.js diff --git a/.gitignore b/.gitignore index 34a9154..143e543 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ config.json /node_modules package.json package-lock.json -.vscode \ No newline at end of file +.vscode +testfileforrandomsnippets.js \ No newline at end of file diff --git a/adab data.xlsx b/adab data.xlsx index e4b13559a53355a9afd8014f51c323a49e4d29da..ebc02d9511b69acbf052b9fac1d220b97c10df74 100644 GIT binary patch delta 8302 zcmZ8`bx<5i@a8V=f#7b72Mg}*PH=aY#obvn1ee7T%xtR1uV0)7G7>ivlHpF7s{797&(0geV@kfGS3G}9gT^n zv>IahaB=fjzer@~5PtK`$uRv%Op-0jqVORxn$N?cb9(W~*AizS87Zi@`%6FAJ~gQ;)xSXsG=Zc8?FnjX`0q9G2K8UOzZ%R=~=Yi)bp9(dq3tIpsL^ zN&T#_*9A}X5KV?IjaD1jZrwU@WF>TqEB463g}bG!5hQ-yLFiB{4HTG3Xnx1?z4d60 zIn;&nl-AnPAxDrlUFFB4qD3G+gzA}te5KQlF_TJWq97KNg#$|jy-T|mWl>(|46yvR zeTyvR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ZnAVN3l&GN2DKW5h@riWLm~ZOPUy}CjV@AOi3*e zPD;;Y!}SIE@8x^Wxxe@Mde*82?S)Y8ShqvRJ|s7HDo0+DwU*e`rudydcuy@sen)Z` ztczz+a4hfonE88+Euvx(AUg(MjZ7x1j2=Z?Sg~(MW<5-9vqeRqAUK>mYH(zrrpbK7 zi2LU#dR2Mit$Qs7W))-==gp3mo=xw*@KExsm#}o>6iV+L&4zRwwP4x-o4l`g5HlHq z#zwm-#Q&~+N4u)PqGLm--3TD(t^{QNs=6V9KuSa)5bmUf8H8B5iNi=i zO5CW){+$wj_1W?NLwrSukR3M(SVcw%mMZ~7(4Bzn-$_!&|DTEpv2&Mzb$tiveMbmk z^ui|lPZ$IO5&X}pqL4FpCbIvH3I3bl4B_;Ufc2Gx0Fp$IC=V7`Eh&hB)Emg!D^!<$ zg=7#~Fb_-+L=UVE69y>*E5jzqLDJ=DAZ%c42%{${?6^E+MxGF2;K>3TtpZ6@!G~nL z!YDOJf*K)Y&65SD8-nPi1e>V^$=70r1bDH)s6k4-Bw$P+M_wW@j1Wd|akvL75Cq1W z1cKm!P4=&w`+7PCuNifm|K2J{98%*g3eyfb^A>^ehp_r6!+Se{K#&k8N=SweHe#U5 HKkWYl=hWbD diff --git a/bot.js b/bot.js index bcfb125..16e3f5b 100644 --- a/bot.js +++ b/bot.js @@ -20,7 +20,7 @@ const commands = require("./utils/commands"); const { Internal } = require("./classes/FunctionClasses/Internal"); const { Help } = require("./classes/FunctionClasses/Help"); const { Time } = require("./classes/FunctionClasses/Time"); -const { Meta } = require("./classes/ApplicationCommand/MetaApplicationCommand"); +const { Meta } = require("./classes/Meta"); // eslint-disable-next-line max-len const client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES, Discord.Intents.FLAGS.DIRECT_MESSAGES, Discord.Intents.FLAGS.GUILD_INTEGRATIONS, Discord.Intents.FLAGS.GUILD_MEMBERS], partials: ["MESSAGE", "CHANNEL", "USER", "REACTION", "GUILD_MEMBER"] }); @@ -204,7 +204,7 @@ client.on("interactionCreate", async interaction => { return; } - if (!client.commands.has(interaction.commandName) && interaction.commandName !== "help") return; + if (!client.commands.has(interaction.commandName) && interaction.commandName !== "help" && interaction.commandName !== "meta") return; incrementTag("totalRequests", Tags, "Tags"); @@ -240,7 +240,7 @@ client.on("interactionCreate", async interaction => { TimeTags }); m.send(); - } else client.commands.get(interaction.commandName).execute(interaction, interaction.channelId, Tags); + } else client.commands.get(interaction.commandName).execute(interaction, interaction.channelId); incrementTag("totalSuccesses", Tags, "Tags"); incrementTag(interaction.commandName, Tags, "Tags"); incrementTag(Time.newDate().getHours(), TimeTags, "TimeTags"); @@ -302,8 +302,9 @@ client.on("messageCreate", async message => { // Sends a message with the amount of helpers, and then DMs you the list. if (message.content.toLowerCase() === "++helpers" && ((message.author.id === config.ids.earth && message.guildId === adIDs.serverID) || isMod)) { const roleInfo = message.guild.roles.resolve(config.ids.helperRole); - const namesAndIDs = roleInfo.members.map(member => `${member.user.username}#${member.user.discriminator} (${member.user.id})`); - console.log(namesAndIDs); + const namesAndIDs = roleInfo.members.map(member => `${member.user.username}#${member.user.discriminator} (${member.user.id}) [${member.roles.highest.name}]`); + + console.log(namesAndIDs.join("\n")); message.reply(`Currently, ${roleInfo.members.size} person(s) have the Helper role.`); message.author.send(namesAndIDs.join("\n")); } diff --git a/classes/ApplicationCommand/TimeStudyApplicationCommand.js b/classes/ApplicationCommand/TimeStudyApplicationCommand.js index d6005fb..d1d2537 100644 --- a/classes/ApplicationCommand/TimeStudyApplicationCommand.js +++ b/classes/ApplicationCommand/TimeStudyApplicationCommand.js @@ -94,6 +94,12 @@ class TimeStudyApplicationCommand extends ApplicationCommand { this.name === "eternitychallengeorder"; } + isTSorECorECO() { + return this.name === "ec" || + this.name === "ts" || + this.name === "eco"; + } + /** * @inheritdoc * @return {Array} @@ -128,17 +134,18 @@ class TimeStudyApplicationCommand extends ApplicationCommand { let argMessage; let argMessageWithDM; let args; - if (this.hasHelperRole(interaction)) this.ephemeral = false; - else if (!this.hasHelperRole(interaction)) this.ephemeral = true; - if (this.isECOorEC()) args = [`${this.getArgs(interaction)[0]}x${this.getArgs(interaction)[1]}`]; + const allArgs = this.getArgs(interaction); + const isHelper = this.hasHelperRole(interaction); + + if (this.isECOorEC()) args = [`${allArgs[0]}x${allArgs[1]}`]; else if (this.isTS()) { - args = this.getArgs(interaction); + args = allArgs; if (!args[1]) args[1] = "active"; } else if (this.isPeople() || this.isHTP()) { - args = this.getArgs(interaction); + args = allArgs; } - if (this.type !== "shorthand" || this.name === "ts" || this.name === "ec" || this.name === "eco") { + if (this.type !== "shorthand" || this.isTSorECorECO()) { argMessage = this.getArgMessage(args); argMessageWithDM = this.getArgMessage(args, true); } else if (this.type === "shorthand") { @@ -146,14 +153,14 @@ class TimeStudyApplicationCommand extends ApplicationCommand { argMessageWithDM = this.sent[0]; } - if (this.isEC() && this.hasHelperRole(interaction)) { - interaction.reply({ content: argMessage, ephemeral: this.getArgs(interaction)[2] }); - interaction.followUp({ content: argMessageWithDM, ephemeral: this.getArgs(interaction)[2] }); + if (this.isEC() && isHelper) { + interaction.reply({ content: argMessage, ephemeral: allArgs[2] }); + interaction.followUp({ content: argMessageWithDM, ephemeral: allArgs[2] }); return; } - interaction.reply({ content: argMessage, ephemeral: !this.hasHelperRole(interaction) }); - if (this.isEC()) interaction.followUp({ content: argMessageWithDM, ephemeral: !this.hasHelperRole(interaction) }); + interaction.reply({ content: argMessage, ephemeral: !isHelper }); + if (this.isEC()) interaction.followUp({ content: argMessageWithDM, ephemeral: !isHelper }); } } diff --git a/classes/FunctionClasses/Checks.js b/classes/FunctionClasses/Checks.js index 2674280..1f84aa0 100644 --- a/classes/FunctionClasses/Checks.js +++ b/classes/FunctionClasses/Checks.js @@ -22,6 +22,7 @@ class Checks { "ecsPlusCheck": this.ecsPlusCheck, "weirdICsCheck": this.weirdICsCheck, "lateBreakCheck": this.lateBreakCheck, + "challengeCheck": this.challengeCheck, true: true }; } @@ -32,23 +33,23 @@ class Checks { } static earlyGameCheck(id, message) { - return config.ids.earlyGame.includes(id) || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message); + return config.ids.earlyGame.includes(id) || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message); } static breakCheck(id, message) { - return config.ids.break.includes(id) || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message); + return config.ids.break.includes(id) || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message); } static earlyEternityCheck(id, message) { - return config.ids.earlyEternity.includes(id) || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message); + return config.ids.earlyEternity.includes(id) || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message); } static ecsCheck(id, message) { - return config.ids.ecs.includes(id) || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message); + return config.ids.ecs.includes(id) || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message); } static endgameCheck(id, message) { - return config.ids.endgame.includes(id) || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message); + return config.ids.endgame.includes(id) || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message); } static botCommandsCheck(id, message) { @@ -62,15 +63,15 @@ class Checks { } static bankedInfsCheck(id, message) { - return config.ids.common.includes(id) || config.ids.ecs[1] === id || config.ids.endgame.includes(id) || Checks.botCommandsCheck(id, message); + return Checks.commonCheck(id) || config.ids.ecs[1] === id || config.ids.endgame.includes(id) || Checks.botCommandsCheck(id, message); } static dilationGrindCheck(id, message) { - return config.ids.endgame.includes(id) || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message) || config.ids.ecs[1] === id; + return config.ids.endgame.includes(id) || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message) || config.ids.ecs[1] === id; } static earlyInfinityCheck(id, message) { - return config.ids.earlyGame[1] === id || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message); + return config.ids.earlyGame[1] === id || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message); } static eternityGrindingCheck(id, message) { @@ -86,19 +87,23 @@ class Checks { } static e4000Check(id, message) { - return config.ids.endgame[1] === id || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message); + return config.ids.endgame[1] === id || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message); } static ecsPlusCheck(id, message) { - return config.ids.ecs.includes(id) || config.ids.endgame.includes(id) || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message); + return config.ids.ecs.includes(id) || config.ids.endgame.includes(id) || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message); } static weirdICsCheck(id, message) { - return config.ids.earlyEternity.includes(id) || config.ids.break.includes(id) || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message); + return config.ids.earlyEternity.includes(id) || config.ids.break.includes(id) || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message); } static lateBreakCheck(id, message) { - return config.ids.break[1] === id || config.ids.common.includes(id) || Checks.botCommandsCheck(id, message); + return config.ids.break[1] === id || Checks.commonCheck(id) || Checks.botCommandsCheck(id, message); + } + + static challengeCheck(id, message) { + return Checks.earlyInfinityCheck(id, message) || Checks.breakCheck(id, message) || Checks.earlyEternityCheck(id, message) || Checks.ecsCheck(id, message); } } diff --git a/classes/FunctionClasses/Message.js b/classes/FunctionClasses/Message.js index 2d17849..b78e6d2 100644 --- a/classes/FunctionClasses/Message.js +++ b/classes/FunctionClasses/Message.js @@ -36,7 +36,8 @@ class Message { "endgameCheck": this.noWorkyMessage("endgame"), "e4000Check": this.noWorkyMessage("e4000 EP"), "weirdICsCheck": this.noWorkyMessage("Break Infinity", "early Eternity"), - "lateBreakCheck": this.noWorkyMessage("last Break Infinity") + "lateBreakCheck": this.noWorkyMessage("last Break Infinity"), + "challengeCheck": `This command only works in Early Infinity channels, Break Infinity channels, Eternity channels, and EC channels.` } }; } diff --git a/classes/ApplicationCommand/MetaApplicationCommand.js b/classes/Meta.js similarity index 64% rename from classes/ApplicationCommand/MetaApplicationCommand.js rename to classes/Meta.js index 1a25dd6..6af525c 100644 --- a/classes/ApplicationCommand/MetaApplicationCommand.js +++ b/classes/Meta.js @@ -1,13 +1,11 @@ /* eslint-disable no-console */ "use strict"; -const { ApplicationCommand } = require("./ApplicationCommand"); -const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js"); -const config = require("../../utils/config.json"); -const commands = require("../../utils/commands"); -const { footerMessages } = require("../../utils/messages"); -const wait = require("util").promisify(setTimeout); -const { Time } = require("../FunctionClasses/Time"); +const { MessageActionRow, MessageButton } = require("discord.js"); +const config = require("../utils/config.json"); +const commands = require("../utils/commands"); +const { footerMessages } = require("../utils/messages"); +const { Time } = require("./FunctionClasses/Time"); const NOW = new Date(); const metaMessageObject = { @@ -226,108 +224,4 @@ class Meta { } } -/** - * @class MetaApplicationCommand - * @extends {ApplicationCommand} - * @classdesc Class for executing meta.js. - */ -class MetaApplicationCommand extends ApplicationCommand { - async manageBottomAndTopCommands(Tags, secondAttribute) { - const tagsMatchedWithTimesUsed = {}; - const tagList = await Tags.findAll({ attributes: ["timesUsed", secondAttribute] }); - tagList.map(t => Object.assign(tagsMatchedWithTimesUsed, { [t[secondAttribute]]: t.timesUsed })); - const sorted = Object.values(tagsMatchedWithTimesUsed).sort((a, b) => b - a); - const requests = sorted[0]; - const successes = sorted[1]; - sorted.shift(); - sorted.shift(); - let top5commands = []; - let bottom5commands = []; - for (let i = 0; i < 5; i++) { - const b = Object.entries(tagsMatchedWithTimesUsed).find(a => a[1] === sorted[0]); - top5commands.push(b); - delete tagsMatchedWithTimesUsed[b[0]]; - sorted.shift(); - } - for (let i = 0; i < 5; i++) { - const b = Object.entries(tagsMatchedWithTimesUsed).find(a => a[1] === sorted[sorted.length - 1]); - bottom5commands.push(b); - delete tagsMatchedWithTimesUsed[b[0]]; - sorted.pop(); - } - bottom5commands = bottom5commands.map(a => `${a[0]}: ${a[1]}`).reverse().join("\n"); - top5commands = top5commands.map(a => `${a[0]}: ${a[1]}`).join("\n"); - return { - requests, - successes, - bottom5commands, - top5commands, - }; - } - - getStatus(ping) { - if (ping >= 200) return `Very high ping! ${ping}ms`; - if (ping >= 175) return `High ping! ${ping}ms`; - if (ping >= 150) return `Relatively high ping! ${ping}ms`; - if (ping >= 125) return `Slightly above average ping! ${ping}ms`; - if (ping >= 100) return `Average ping! ${ping}ms`; - if (ping >= 75) return `Below average ping! ${ping}ms`; - if (ping >= 50) return `Very good ping! ${ping}ms`; - return `Incredible ping! ${ping}ms`; - } - - /** - * Executes the command. - * @param {Object} interaction - The interaction object used for the command that contains all useful information - */ - async execute(interaction, Tags, TimeTags) { - if (!this.getCheck(interaction.channelId, interaction)) { - interaction.reply({ content: `hey bitchass you can't use that command here`, ephemeral: true }); - return; - } - const tagStuff = await this.manageBottomAndTopCommands(Tags, "name"); - const timeTagStuff = await this.manageBottomAndTopCommands(TimeTags, "hour"); - const embed = new MessageEmbed() - .setColor("BLURPLE") - .setTitle("Bot Information") - .setDescription(`Internal bot information`) - .setThumbnail(`${interaction.client.user.displayAvatarURL()}`) - .addFields( - { name: "Bot version", value: config.version, inline: true }, - { name: "Last restart", value: metaMessageObject.lastrestart, inline: true }, - // eslint-disable-next-line max-len - { name: "Uptime", value: `The bot has been up for ${Time.dhmsFromMS(interaction.client.uptime).clock}, (${Time.decimalTime(true, Time.newDate(), interaction.client.uptime)} 10h time)`, inline: true }, - { name: "Status", value: `Pong! ${this.getStatus(interaction.client.ws.ping)}`, inline: true }, - { name: "Suggest", value: metaMessageObject.suggest, inline: true }, - { name: "Invite", value: metaMessageObject.invite, inline: true }, - { name: "Contributing", value: metaMessageObject.contributing, inline: true }, - { name: "Total amount of commands", value: `${commands.all.length}`, inline: true }, - { name: "Total requests/successses", value: `Requests: ${tagStuff.requests}\nSuccesses: ${tagStuff.successes}`, inline: true }, - { name: "Top 5 used commands", value: `${tagStuff.top5commands}`, inline: true }, - { name: "Bottom 5 used commands", value: `${tagStuff.bottom5commands}`, inline: true }, - { name: "All data", value: metaMessageObject.alldata, inline: true }, - { name: "Time", value: Time.getTime(), inline: true }, - { name: "Top 5 active hours (UTC-5)", value: `${timeTagStuff.top5commands}`, inline: true }, - { name: "Bottom 5 active hours (UTC-5)", value: `${timeTagStuff.bottom5commands}`, inline: true }, - ) - .setTimestamp() - .setFooter(footerMessages.next(false), `${interaction.client.user.displayAvatarURL()}`); - - const buttonRow = new MessageActionRow() - .addComponents( - new MessageButton() - .setStyle("LINK") - .setLabel("See all commands") - .setURL("https://earthernsence.github.io/ADAnswers-Bot/docs/"), - new MessageButton() - .setStyle("LINK") - .setLabel("GitHub repository") - .setURL("https://github.com/earthernsence/ADAnswers-Bot"), - ); - await interaction.deferReply(); - await wait(2000); - await interaction.editReply({ embeds: [embed], ephemeral: true, components: [buttonRow] }); - } -} - -module.exports = { MetaApplicationCommand, Meta }; \ No newline at end of file +module.exports = { Meta }; \ No newline at end of file diff --git a/commands/challenge.js b/commands/challenge.js index d16634e..f5e4622 100644 --- a/commands/challenge.js +++ b/commands/challenge.js @@ -52,7 +52,7 @@ module.exports = { number: 1, name: "challenge", description: "Args: all challenges, including `ecs`. Returns a guide for each argument. All of these commands have shorthands as well, f.e `/challenge c9` will return the same result as `/c9`", - check: true, + check: "challengeCheck", acceptableArgs: Object.keys(challengeMessageObject), sent: undefined, getArgMessage(arg) { diff --git a/commands/eternitychallenge.js b/commands/eternitychallenge.js index f4250bb..ee7f157 100644 --- a/commands/eternitychallenge.js +++ b/commands/eternitychallenge.js @@ -1,543 +1,7 @@ /* eslint-disable max-len */ "use strict"; -const order = ["1x1", "2x1", "1x2", "3x1", "4x1", "5x1", "1x3", "3x2", "2x2", "6x1", "1x4", "3x3", "7x1", "4x2", "4x3", "6x2", "1x5", "5x2", "2x3", "3x4", "7x2", "5x3", "8x1", "3x5", "6x3", "2x4", "5x4", "7x3", "2x5", "5x5", "4x4", "6x4", "7x4", "8x2", "6x5", "4x5", "8x3", "9x1", "9x2", "8x4", "9x3", "9x4", "8x5", "9x5", "10x1", "7x5", "10x2", "10x3", "10x4", "10x5", "11x1", "11x2", "11x3", "11x4", "11x5", "12x1", "12x2", "12x3", "12x4", "12x5"]; -const orderWithMultSigns = ["1×1", "2×1", "1×2", "3×1", "4×1", "5×1", "1×3", "3×2", "2×2", "6×1", "1×4", "3×3", "7×1", "4×2", "4×3", "6×2", "1×5", "5×2", "2×3", "3×4", "7×2", "5×3", "8×1", "3×5", "6×3", "2×4", "5×4", "7×3", "2×5", "5×5", "4×4", "6×4", "7×4", "8×2", "6×5", "4×5", "8×3", "9×1", "9×2", "8×4", "9×3", "9×4", "8×5", "9×5", "10×1", "7×5", "10×2", "10×3", "10×4", "10×5", "11×1", "11×2", "11×3", "11×4", "11×5", "12×1", "12×2", "12×3", "12×4", "12×5"]; - -/** - * Finds the other completions based on the ID and Completion of a challenge requested - * @param {Number} id ID of the challenge requested - * @param {Number} completion Completion of the challenge requested - * @returns {String} string of the other completions required to beat a certain challenge based on order - */ -function otherCompletions(id, completion) { - if (id < 1 || id > 12) { - return `Invalid challenge id: ${id}`; - } - - if (completion < 1 || completion > 5) { - return `Invalid challenge completion: ${completion}`; - } - - const completionText = `${id}x${completion}`; - const indexOfCompletion = order.indexOf(completionText); - - if (indexOfCompletion === -1) { - return `Challenge ${completionText} completion not found.`; - } - - if (indexOfCompletion === 0) { - return `No other challenge completions required.`; - } - - const completions = Array(12); - - for (let i = 0; i < indexOfCompletion; i++) { - const previous = order[i].split("x").map(Number); - const previousId = previous[0] - 1; - const previousCompletion = previous[1]; - - completions[previousId] = previousCompletion; - } - - return completions.filter(Number).map((value, index) => `${index + 1}x${value}`).join(", "); -} - - -const revampedECs = [ - // EC1 - { - challenge: 1, - completion: 1, - tt: 130, - ip: "`1e1800`", - note: null, - tree: "`11,22,32,42,51,61,72,82,92,102,111,121,131,141,151,161,171|1`" - }, - { - challenge: 1, - completion: 2, - tt: 140, - ip: "`1e2000`", - note: "`Get 60,000 Eternities before trying.`", - tree: "`11,22,32,42,51,61,72,82,92,102,111,121,131,141,151,161,162,171,21,33,31,41|1`", - }, - { - challenge: 1, - completion: 3, - tt: 147, - ip: "`1e2200`", - note: null, - tree: "`11,22,32,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171,21,33,31,41|1`", - }, - { - challenge: 1, - completion: 4, - tt: 163, - ip: "`1e2400`", - note: null, - tree: "`11,22,32,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171,21,33,31,41|1`" - }, - { - challenge: 1, - completion: 5, - tt: 176, - ip: "`1e2600`", - note: null, - tree: "`11,21,22,32,33,41,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171|1`" - }, - // EC2 - { - challenge: 2, - completion: 1, - tt: 135, - ip: "`1e975`", - note: null, - tree: "`11,22,32,42,51,61,73,83,93,103,111,121,131,141,151,161,171|2`", - }, - { - challenge: 2, - completion: 2, - tt: 157, - ip: "`1e1150`", - note: null, - tree: "`11,21,22,31,32,33,41,42,51,61,73,83,93,103,111,121,131,141,151,161,162,171|2`", - }, - { - challenge: 2, - completion: 3, - tt: 182, - ip: "`1e1325`", - note: null, - tree: "`11,21,22,31,32,33,41,42,51,61,73,83,93,103,111,121,131,141,151,161,162,171|2`", - }, - { - challenge: 2, - completion: 4, - tt: 208, - ip: "`1e1500`", - note: null, - tree: "`11,21,22,31,32,33,41,42,51,61,73,83,93,103,111,121,131,141,151,161,162,171|2`", - }, - { - challenge: 2, - completion: 5, - tt: 240, - ip: "`1e1675`", - note: null, - tree: "`11,21,22,31,32,33,41,42,51,61,73,83,93,103,111,121,131,141,151,161,162,171|2`", - }, - // EC3 - { - challenge: 3, - completion: 1, - tt: 140, - ip: "`1e600`", - note: "`To unlock the challenge, use TD, and then switch to the tree.`", - tree: `11,22,32,42,51,61,71,81,91,101,111,122,132,142,151,161,162,171|3` - }, - { - challenge: 3, - completion: 2, - tt: 155, - ip: "`1e600`", - note: "`To unlock the challenge, use TD, and then switch to the tree.`", - tree: "`11,21,22,31,32,33,41,42,51,61,71,81,91,101,111,121,131,141,151,161,162,171|3`" - }, - { - challenge: 3, - completion: 3, - tt: 165, - ip: "`1e600`", - note: "`To unlock the challenge, use TD, and then switch to the tree.`", - tree: "`11,21,22,31,32,33,41,42,51,61,72,82,92,102,111,121,131,141,151,161,162,171|3`" - }, - { - challenge: 3, - completion: 4, - tt: 182, - ip: "`1e600`", - note: "`To unlock the challenge, use TD, and then switch to the tree.`", - tree: "`11,21,22,31,32,33,41,42,51,61,72,82,92,102,111,121,131,141,151,161,162,171|3`" - }, - { - challenge: 3, - completion: 5, - tt: 208, - ip: "`1e600`", - note: "`To unlock the challenge, use TD, and then switch to the tree.`", - tree: "`11,21,22,31,32,33,41,42,51,61,72,82,92,102,111,121,131,141,151,161,162,171|3`" - }, - // EC4 - { - challenge: 4, - completion: 1, - tt: 145, - ip: "`1e2750`", - note: "`Fail once for achievement`", - tree: "`11,21,22,32,33,42,51,61,73,83,93,103,111,123,133,143|4`" - }, - { - challenge: 4, - completion: 2, - tt: 170, - ip: "`1e3300`", - note: null, - tree: "`11,22,32,42,51,61,73,83,93,103,111,123,133,143,151,162,171|4`" - }, - { - challenge: 4, - completion: 3, - tt: 176, - ip: "`1e3850`", - note: null, - tree: "`11,21,22,32,42,51,61,62,73,83,93,103,111,123,133,143,151,162,171|4`" - }, - { - challenge: 4, - completion: 4, - tt: 252, - ip: "`1e4400`", - note: null, - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,123,133,143,151,161,162,171|4`" - }, - { - challenge: 4, - completion: 5, - tt: 370, - ip: "`1e4950`", - note: "`TS181 required`", - tree: "`11,22,32,42,51,61,73,83,93,103,111,123,133,143,151,162,171,181|4`" - }, - // EC5 - { - challenge: 5, - completion: 1, - tt: 147, - ip: "`1e750`", - note: null, - tree: "`11,21,22,32,42,51|5`" - }, - { - challenge: 5, - completion: 2, - tt: 182, - ip: "`1e1150`", - note: null, - tree: "`11,22,32,42,51,61,72,82,92,102,111|5`" - }, - { - challenge: 5, - completion: 3, - tt: 200, - ip: "`1e1550`", - note: null, - tree: "`11,22,32,42,51,61,72,82,92,102,111,121,131,141|5`" - }, - { - challenge: 5, - completion: 4, - tt: 220, - ip: "`1e1950`", - note: null, - tree: "`11,21,22,31,32,33,42,51,61,62,72,82,92,102,111,121,131,141,151|5`" - }, - { - challenge: 5, - completion: 5, - tt: 252, - ip: "`1e2350`", - note: null, - tree: "`11,21,22,31,32,33,41,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171|5`" - }, - // EC6 - { - challenge: 6, - completion: 1, - tt: 161, - ip: "`1e850`", - note: "`1e15 times last crunch, wait for RGs (+TS33 at 163 TT)`", - tree: "`11,21,22,32,42,51,61,62,72,82,92,102,111,121,131,141,33|6`" - }, - { - challenge: 6, - completion: 2, - tt: 176, - ip: "`1e1100`", - note: null, - tree: "`11,21,22,32,42,51,61,62,72,82,92,102,111,121,131,141,151,162|6`" - }, - { - challenge: 6, - completion: 3, - tt: 208, - ip: "`1e1350`", - note: null, - tree: "`11,21,22,31,32,33,41,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171|6`" - }, - { - challenge: 6, - completion: 4, - tt: 252, - ip: "`1e1600`", - note: null, - tree: "`11,21,22,31,32,33,41,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171|6`" - }, - { - challenge: 6, - completion: 5, - tt: 320, - ip: "`1e1850`", - note: "`Get eternity upgrade 5 (1e40 EP)`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171|6`" - }, - // EC7 - { - challenge: 7, - completion: 1, - tt: 167, - ip: "`1e2000`", - note: "`To unlock the challenge, use TD, and then switch to the tree.`", - tree: "`11,21,22,32,42,51,61,62,71,81,91,101,111|7`" - }, - { - challenge: 7, - completion: 2, - tt: 193, - ip: "`1e2530`", - note: "`To unlock the challenge, use TD, and then switch to the tree.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141|7`" - }, - { - challenge: 7, - completion: 3, - tt: 220, - ip: "`1e3060`", - note: "`To unlock the challenge, use TD, and then switch to the tree.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162|7`" - }, - { - challenge: 7, - completion: 4, - tt: 252, - ip: "`1e3590`", - note: "`To unlock the challenge, use TD, and then switch to the tree.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171|7`" - }, - { - challenge: 7, - completion: 5, - tt: 895, - ip: "`1e4120`", - note: "`To unlock the challenge, use TD, and then switch to the tree.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,193,214|7`" - }, - // EC8 - { - challenge: 8, - completion: 1, - tt: 207, - ip: "`1e1300`", - note: "`Buy the challenge once, then respec your tree and buy everything up until TS123. Start the challenge and wait for replicanti. Then buy the rest of the tree: 133,143,151,161,162. Spend your upgrades on: 0 RG, 9% chance, remaining on interval - all on ID1.`", - tree: "`11,22,32,42,51,61,73,83,93,103,111,123,133,143,151,161,162|8`" - }, - { - challenge: 8, - completion: 2, - tt: 320, - ip: "`1e2200`", - note: "`Buy the challenge once, then respec your tree and buy everything up until TS123. Start the challenge and wait for replicanti. Then buy the rest of the tree: 133,143,151,161,162,171. Spend your upgrades on: 0 RG, 9% chance, remaining on interval - all on ID1.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,123,133,143,151,161,162,171|8`" - }, - { - challenge: 8, - completion: 3, - tt: 450, - ip: "`1e3100`", - note: "`Buy the challenge once, then respec your tree and buy everything up until TS123. Start the challenge and wait for replicanti and max RG. Then buy the rest of the tree: 133,143,151,161,162,171,181. Spend your upgrades on: 4 RG, 9% chance, remaining on interval - all on ID1.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,123,133,143,151,161,162,171,181|8`" - }, - { - challenge: 8, - completion: 4, - tt: 600, - ip: "`1e4000`", - note: "`Buy the challenge once, then respec your tree and buy everything up until TS123. Start the challenge and wait for replicanti and max RG. Then buy the rest of the tree: 133,143,151,161,162,171,181. Spend your upgrades on: 5 RG, 9% chance, remaining on interval - all on ID1.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,123,133,143,151,161,162,171,181|8`" - }, - { - challenge: 8, - completion: 5, - tt: 825, - ip: "`1e4900`", - note: "`Spend your upgrades on: 0 RG, 9% chance, remaining on interval - all on ID1.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,123,133,143,151,161,162,171,181|8`" - }, - // EC9 - { - challenge: 9, - completion: 1, - tt: 522, - ip: "`1e1750`", - note: "`Can be done with less TT.`", - tree: "`11,22,32,42,51,61,73,83,93,103,111,121,131,141,151,161,162,171|9`" - }, - { - challenge: 9, - completion: 2, - tt: 575, - ip: "`1e2000`", - note: "`Can be done with less TT.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,121,131,141,151,161,162,171|9`" - }, - { - challenge: 9, - completion: 3, - tt: 660, - ip: "`1e2250`", - note: "`Can be done with less TT.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,121,131,141,151,161,162,171|9`" - }, - { - challenge: 9, - completion: 4, - tt: 760, - ip: "`1e2500`", - note: "`Can be done with less TT.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,121,131,141,151,161,162,171|9`" - }, - { - challenge: 9, - completion: 5, - tt: 830, - ip: "`1e2750`", - note: null, - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,121,131,141,151,161,162,171,181|9`" - }, - // EC10 - { - challenge: 10, - completion: 1, - tt: 895, - ip: "`1e3000`", - note: "`Farm 150M infinities inside the challenge.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181|10`" - }, - { - challenge: 10, - completion: 2, - tt: 1900, - ip: "`1e3300`", - note: "`10M+ binfs recommended.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,191,193,211,214|10`" - }, - { - challenge: 10, - completion: 3, - tt: 2050, - ip: "`1e3600`", - note: "`20M+ binfs recommended.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,192,193,214|10`" - }, - { - challenge: 10, - completion: 4, - tt: 3650, - ip: "`1e3900`", - note: "`30M+ binfs recommended.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,192,193,213,214|10`" - }, - { - challenge: 10, - completion: 5, - tt: 5200, - ip: "`1e4200`", - note: "`40M+ binfs recommended.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,191,192,193,211,213,214,225,228,233|10`" - }, - // EC11 - { - challenge: 11, - completion: 1, - tt: 5600, - ip: "`1e500`", - note: "`Get the Popular Music - achievement first (if you need help with it use /achievements pm).`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,191,192,193,211,212,213,222,225,231,233|11`" - }, - { - challenge: 11, - completion: 2, - tt: 5600, - ip: "`1e700`", - note: "`Get the Popular Music - achievement first (if you need help with it use /achievements pm).`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,191,192,193,211,212,213,222,225,231,233|11`" - }, - { - challenge: 11, - completion: 3, - tt: 5950, - ip: "`1e900`", - note: "`Get the Popular Music - achievement first (if you need help with it use /achievements pm).`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,123,133,143,151,161,162,171,181,191,192,193,211,212,213,222,223,225,231,233|11`" - }, - { - challenge: 11, - completion: 4, - tt: 5950, - ip: "`1e1100`", - note: "`Get the Popular Music - achievement first (if you need help with it use /achievements pm).`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,123,133,143,151,161,162,171,181,191,192,193,211,212,213,222,223,225,231,233|11`" - }, - { - challenge: 11, - completion: 5, - tt: 5950, - ip: "`1e1300`", - note: "`This takes around 2h 45m. Get the Popular Music - achievement first (if you need help with it use /achievements pm).`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,123,133,143,151,161,162,171,181,191,192,193,211,212,213,222,223,225,231,233|11`" - }, - // EC12 - { - challenge: 12, - completion: 1, - tt: 9800, - ip: "`1e110,000`", - note: "`Enable Auto-Eternity.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,122,132,142,151,161,162,171,181,191,193,211,212,213,214,222,224,226,227,232,234|12`" - }, - { - challenge: 12, - completion: 2, - tt: 9800, - ip: "`1e122,000`", - note: "`Enable Auto-Eternity.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,122,132,142,151,161,162,171,181,191,193,211,212,213,214,222,224,226,227,232,234|12`" - }, - { - challenge: 12, - completion: 3, - tt: 10750, - ip: "`1e134,000`", - note: "`Enable Auto-Eternity.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,122,132,142,151,161,162,171,181,191,193,211,212,213,214,222,224,226,227,232,234|12`" - }, - { - challenge: 12, - completion: 4, - tt: 11200, - ip: "`1e146,000`", - note: "`Enable Auto-Eternity.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,122,132,142,151,161,162,171,181,191,193,211,212,213,214,222,224,226,227,232,234|12`" - }, - { - challenge: 12, - completion: 5, - tt: 12350, - ip: "`1e158,000`", - note: "`Enable Auto-Eternity. Can be done earlier if you have the When Will It Be Enough - achievement.`", - tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,122,132,142,151,161,162,171,181,191,193,211,212,213,214,222,224,226,227,232,234|12`" - }, -]; +const ECs = require("../utils/ecs"); // This is for if/when I can make the buttons not cause the stupid "unknown interaction" error. // Like yeah right, unknown interaction my ass, it's just discord.js being an idiot. @@ -550,7 +14,7 @@ module.exports = { name: "eternitychallenge", description: "Has a shorthand: `/ec`. Requires one argument: `/eternitychallenge [ECNumber]x[CompletionNumber]`. You may notice that some trees increase the number of TT you need, even though it's the same tree as the previous. This follows the Eternity Challenge guide followed by Ninjatsu, and TT can be used as something of a progress marker. For that reason, some trees have more TT than others for the same tree. Returns Total TT for a tree and then the tree.", check: "ecsCheck", - acceptableArgs: order.concat(orderWithMultSigns), + acceptableArgs: ECs.order.concat(ECs.orderWithMultSigns), sent: undefined, getArgMessage(args, tree) { if (!this.acceptableArgs.includes(args[0])) return `That is not an Eternity Challenge!`; @@ -559,13 +23,13 @@ module.exports = { if (args[0].includes("×")) splitArgs = args[0].split("×"); const challengeID = Math.floor(Math.abs(splitArgs[0])); const completion = Math.floor(Math.abs(splitArgs[1])); - const ec = revampedECs[(challengeID - 1) * 5 + (completion - 1)]; + const ec = ECs.EternityChallenges[(challengeID - 1) * 5 + (completion - 1)]; if (tree) return `${ec.tree}`; return `The tree for EC${challengeID}x${completion} is: ${ec.tree} TT for Completion: \`${ec.tt}\` IP Requirement for Completion: \`${ec.ip}\` ${ec.note === null ? `` : `\n Note: \`${ec.note}\``} - Other completions: \`${otherCompletions(challengeID, completion)}\``; + Other completions: \`${ECs.otherCompletions(challengeID, completion)}\``; }, argInfo: { ec: { key: "ec", type: "number" }, diff --git a/commands/meta.js b/commands/meta.js deleted file mode 100644 index 21074a3..0000000 --- a/commands/meta.js +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable max-len */ -"use strict"; - -const { MetaApplicationCommand } = require("../classes/ApplicationCommand/MetaApplicationCommand"); - -module.exports = { - command: new MetaApplicationCommand({ - number: 4, - name: "meta", - description: "internal bot information", - check: "botCommandsCheck", - // We send undefined because it's *actually* going to be an embed we make in MetaApplicationCommand - sent: undefined, - }) -}; diff --git a/database.sqlite b/database.sqlite index 08cf6d0c9b65c7dca8ac98a2b5cc96deac894683..ecf1d17d32e424ad1cda94cc8d965b4cc38bb23a 100644 GIT binary patch delta 2932 zcmZuzU2I%O6~42wH*pg0+H0>}$4g@JZfa+}d%eE# z{>eRhRTYi$5(E^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ghRFlb?893H1DRDE}dT3@Wz z`=MVvYMJ9OM36h>& z`Uhh&7$acjh2P4ugInaCfkh>}sjyA_W-tQ0I!1-6d|lJkEs-PJ|R@8f= z+tE{eIY0mG051pw5ww&+;)Ih}Bzp*U>Ko%V4=Wo;PRk;|3l46OX9mtnKka`u0T-dn QvY3<)55}(##?khNzq4iRvH$=8 diff --git a/utils/actualMessages.js b/utils/actualMessages.js index 868a5ae..c3f36a9 100644 --- a/utils/actualMessages.js +++ b/utils/actualMessages.js @@ -281,7 +281,40 @@ const messages = { ` Joe South.`, ` Poison.`, ` Lil Nas X.`, - ` Jack Harlow.` + ` Glenn Frey.`, + ` Jack Harlow.`, + // This section is based on artists from my Christmas playlist. https://open.spotify.com/playlist/1MxPeMIRjhHTwqInI39Xb4?si=9a8f2a00a4d14974 + ` Bobby Helms.`, + ` Burl Ives.`, + ` Brenda Lee.`, + ` Bing Crosby.`, + ` Perry Como.`, + ` The Fontane Sisters.`, + ` Andy Williams.`, + ` Judy Garland.`, + ` Darlene Love`, + ` Carpenters.`, + ` Eartha Kitt.`, + ` Elvis Presley.`, + ` Irving Berlin.`, + ` The Jackson 5.`, + ` Nat King Cole.`, + ` The Andrews Sisters.`, + ` Vince Guaraldi Trio.`, + ` Dean Martin.`, + ` Gene Autry.`, + ` Frank Sinatra.`, + ` Chuck Berry.`, + ` John Lennon.`, + ` Kay Starr.`, + ` Band Aid.`, + ` Donny Hathaway.`, + ` Tony Bennett.`, + ` Peggy Lee.`, + ` The Platters.`, + ` Lou Monte.`, + ` The Pogues.`, + ` The Oak Ridge Boys.` ], }; diff --git a/utils/ecs.js b/utils/ecs.js new file mode 100644 index 0000000..1d2a62a --- /dev/null +++ b/utils/ecs.js @@ -0,0 +1,541 @@ +/* eslint-disable max-len */ +"use strict"; + +const EternityChallenges = [ + // EC1 + { + challenge: 1, + completion: 1, + tt: 130, + ip: "`1e1800`", + note: null, + tree: "`11,22,32,42,51,61,72,82,92,102,111,121,131,141,151,161,171|1`" + }, + { + challenge: 1, + completion: 2, + tt: 140, + ip: "`1e2000`", + note: "`Get 60,000 Eternities before trying.`", + tree: "`11,22,32,42,51,61,72,82,92,102,111,121,131,141,151,161,162,171,21,33,31,41|1`", + }, + { + challenge: 1, + completion: 3, + tt: 147, + ip: "`1e2200`", + note: null, + tree: "`11,22,32,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171,21,33,31,41|1`", + }, + { + challenge: 1, + completion: 4, + tt: 163, + ip: "`1e2400`", + note: null, + tree: "`11,22,32,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171,21,33,31,41|1`" + }, + { + challenge: 1, + completion: 5, + tt: 176, + ip: "`1e2600`", + note: null, + tree: "`11,21,22,32,33,41,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171|1`" + }, + // EC2 + { + challenge: 2, + completion: 1, + tt: 135, + ip: "`1e975`", + note: null, + tree: "`11,22,32,42,51,61,73,83,93,103,111,121,131,141,151,161,171|2`", + }, + { + challenge: 2, + completion: 2, + tt: 157, + ip: "`1e1150`", + note: null, + tree: "`11,21,22,31,32,33,41,42,51,61,73,83,93,103,111,121,131,141,151,161,162,171|2`", + }, + { + challenge: 2, + completion: 3, + tt: 182, + ip: "`1e1325`", + note: null, + tree: "`11,21,22,31,32,33,41,42,51,61,73,83,93,103,111,121,131,141,151,161,162,171|2`", + }, + { + challenge: 2, + completion: 4, + tt: 208, + ip: "`1e1500`", + note: null, + tree: "`11,21,22,31,32,33,41,42,51,61,73,83,93,103,111,121,131,141,151,161,162,171|2`", + }, + { + challenge: 2, + completion: 5, + tt: 240, + ip: "`1e1675`", + note: null, + tree: "`11,21,22,31,32,33,41,42,51,61,73,83,93,103,111,121,131,141,151,161,162,171|2`", + }, + // EC3 + { + challenge: 3, + completion: 1, + tt: 140, + ip: "`1e600`", + note: "`To unlock the challenge, use TD, and then switch to the tree.`", + tree: `11,22,32,42,51,61,71,81,91,101,111,122,132,142,151,161,162,171|3` + }, + { + challenge: 3, + completion: 2, + tt: 155, + ip: "`1e600`", + note: "`To unlock the challenge, use TD, and then switch to the tree.`", + tree: "`11,21,22,31,32,33,41,42,51,61,71,81,91,101,111,121,131,141,151,161,162,171|3`" + }, + { + challenge: 3, + completion: 3, + tt: 165, + ip: "`1e600`", + note: "`To unlock the challenge, use TD, and then switch to the tree.`", + tree: "`11,21,22,31,32,33,41,42,51,61,72,82,92,102,111,121,131,141,151,161,162,171|3`" + }, + { + challenge: 3, + completion: 4, + tt: 182, + ip: "`1e600`", + note: "`To unlock the challenge, use TD, and then switch to the tree.`", + tree: "`11,21,22,31,32,33,41,42,51,61,72,82,92,102,111,121,131,141,151,161,162,171|3`" + }, + { + challenge: 3, + completion: 5, + tt: 208, + ip: "`1e600`", + note: "`To unlock the challenge, use TD, and then switch to the tree.`", + tree: "`11,21,22,31,32,33,41,42,51,61,72,82,92,102,111,121,131,141,151,161,162,171|3`" + }, + // EC4 + { + challenge: 4, + completion: 1, + tt: 145, + ip: "`1e2750`", + note: "`Fail once for achievement`", + tree: "`11,21,22,32,33,42,51,61,73,83,93,103,111,123,133,143|4`" + }, + { + challenge: 4, + completion: 2, + tt: 170, + ip: "`1e3300`", + note: null, + tree: "`11,22,32,42,51,61,73,83,93,103,111,123,133,143,151,162,171|4`" + }, + { + challenge: 4, + completion: 3, + tt: 176, + ip: "`1e3850`", + note: null, + tree: "`11,21,22,32,42,51,61,62,73,83,93,103,111,123,133,143,151,162,171|4`" + }, + { + challenge: 4, + completion: 4, + tt: 252, + ip: "`1e4400`", + note: null, + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,123,133,143,151,161,162,171|4`" + }, + { + challenge: 4, + completion: 5, + tt: 370, + ip: "`1e4950`", + note: "`TS181 required`", + tree: "`11,22,32,42,51,61,73,83,93,103,111,123,133,143,151,162,171,181|4`" + }, + // EC5 + { + challenge: 5, + completion: 1, + tt: 147, + ip: "`1e750`", + note: null, + tree: "`11,21,22,32,42,51|5`" + }, + { + challenge: 5, + completion: 2, + tt: 182, + ip: "`1e1150`", + note: null, + tree: "`11,22,32,42,51,61,72,82,92,102,111|5`" + }, + { + challenge: 5, + completion: 3, + tt: 200, + ip: "`1e1550`", + note: null, + tree: "`11,22,32,42,51,61,72,82,92,102,111,121,131,141|5`" + }, + { + challenge: 5, + completion: 4, + tt: 220, + ip: "`1e1950`", + note: null, + tree: "`11,21,22,31,32,33,42,51,61,62,72,82,92,102,111,121,131,141,151|5`" + }, + { + challenge: 5, + completion: 5, + tt: 252, + ip: "`1e2350`", + note: null, + tree: "`11,21,22,31,32,33,41,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171|5`" + }, + // EC6 + { + challenge: 6, + completion: 1, + tt: 161, + ip: "`1e850`", + note: "`1e15 times last crunch, wait for RGs (+TS33 at 163 TT)`", + tree: "`11,21,22,32,42,51,61,62,72,82,92,102,111,121,131,141,33|6`" + }, + { + challenge: 6, + completion: 2, + tt: 176, + ip: "`1e1100`", + note: null, + tree: "`11,21,22,32,42,51,61,62,72,82,92,102,111,121,131,141,151,162|6`" + }, + { + challenge: 6, + completion: 3, + tt: 208, + ip: "`1e1350`", + note: null, + tree: "`11,21,22,31,32,33,41,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171|6`" + }, + { + challenge: 6, + completion: 4, + tt: 252, + ip: "`1e1600`", + note: null, + tree: "`11,21,22,31,32,33,41,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171|6`" + }, + { + challenge: 6, + completion: 5, + tt: 320, + ip: "`1e1850`", + note: "`Get eternity upgrade 5 (1e40 EP)`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,72,82,92,102,111,121,131,141,151,161,162,171|6`" + }, + // EC7 + { + challenge: 7, + completion: 1, + tt: 167, + ip: "`1e2000`", + note: "`To unlock the challenge, use TD, and then switch to the tree.`", + tree: "`11,21,22,32,42,51,61,62,71,81,91,101,111|7`" + }, + { + challenge: 7, + completion: 2, + tt: 193, + ip: "`1e2530`", + note: "`To unlock the challenge, use TD, and then switch to the tree.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141|7`" + }, + { + challenge: 7, + completion: 3, + tt: 220, + ip: "`1e3060`", + note: "`To unlock the challenge, use TD, and then switch to the tree.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162|7`" + }, + { + challenge: 7, + completion: 4, + tt: 252, + ip: "`1e3590`", + note: "`To unlock the challenge, use TD, and then switch to the tree.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171|7`" + }, + { + challenge: 7, + completion: 5, + tt: 895, + ip: "`1e4120`", + note: "`To unlock the challenge, use TD, and then switch to the tree.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,193,214|7`" + }, + // EC8 + { + challenge: 8, + completion: 1, + tt: 207, + ip: "`1e1300`", + note: "`Buy the challenge once, then respec your tree and buy everything up until TS123. Start the challenge and wait for replicanti. Then buy the rest of the tree: 133,143,151,161,162. Spend your upgrades on: 0 RG, 9% chance, remaining on interval - all on ID1.`", + tree: "`11,22,32,42,51,61,73,83,93,103,111,123,133,143,151,161,162|8`" + }, + { + challenge: 8, + completion: 2, + tt: 320, + ip: "`1e2200`", + note: "`Buy the challenge once, then respec your tree and buy everything up until TS123. Start the challenge and wait for replicanti. Then buy the rest of the tree: 133,143,151,161,162,171. Spend your upgrades on: 0 RG, 9% chance, remaining on interval - all on ID1.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,123,133,143,151,161,162,171|8`" + }, + { + challenge: 8, + completion: 3, + tt: 450, + ip: "`1e3100`", + note: "`Buy the challenge once, then respec your tree and buy everything up until TS123. Start the challenge and wait for replicanti and max RG. Then buy the rest of the tree: 133,143,151,161,162,171,181. Spend your upgrades on: 4 RG, 9% chance, remaining on interval - all on ID1.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,123,133,143,151,161,162,171,181|8`" + }, + { + challenge: 8, + completion: 4, + tt: 600, + ip: "`1e4000`", + note: "`Buy the challenge once, then respec your tree and buy everything up until TS123. Start the challenge and wait for replicanti and max RG. Then buy the rest of the tree: 133,143,151,161,162,171,181. Spend your upgrades on: 5 RG, 9% chance, remaining on interval - all on ID1.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,123,133,143,151,161,162,171,181|8`" + }, + { + challenge: 8, + completion: 5, + tt: 825, + ip: "`1e4900`", + note: "`Spend your upgrades on: 0 RG, 9% chance, remaining on interval - all on ID1.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,123,133,143,151,161,162,171,181|8`" + }, + // EC9 + { + challenge: 9, + completion: 1, + tt: 522, + ip: "`1e1750`", + note: "`Can be done with less TT.`", + tree: "`11,22,32,42,51,61,73,83,93,103,111,121,131,141,151,161,162,171|9`" + }, + { + challenge: 9, + completion: 2, + tt: 575, + ip: "`1e2000`", + note: "`Can be done with less TT.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,121,131,141,151,161,162,171|9`" + }, + { + challenge: 9, + completion: 3, + tt: 660, + ip: "`1e2250`", + note: "`Can be done with less TT.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,121,131,141,151,161,162,171|9`" + }, + { + challenge: 9, + completion: 4, + tt: 760, + ip: "`1e2500`", + note: "`Can be done with less TT.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,121,131,141,151,161,162,171|9`" + }, + { + challenge: 9, + completion: 5, + tt: 830, + ip: "`1e2750`", + note: null, + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,121,131,141,151,161,162,171,181|9`" + }, + // EC10 + { + challenge: 10, + completion: 1, + tt: 895, + ip: "`1e3000`", + note: "`Farm 150M infinities inside the challenge.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181|10`" + }, + { + challenge: 10, + completion: 2, + tt: 1900, + ip: "`1e3300`", + note: "`10M+ binfs recommended.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,191,193,211,214|10`" + }, + { + challenge: 10, + completion: 3, + tt: 2050, + ip: "`1e3600`", + note: "`20M+ binfs recommended.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,192,193,214|10`" + }, + { + challenge: 10, + completion: 4, + tt: 3650, + ip: "`1e3900`", + note: "`30M+ binfs recommended.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,192,193,213,214|10`" + }, + { + challenge: 10, + completion: 5, + tt: 5200, + ip: "`1e4200`", + note: "`40M+ binfs recommended.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,191,192,193,211,213,214,225,228,233|10`" + }, + // EC11 + { + challenge: 11, + completion: 1, + tt: 5600, + ip: "`1e500`", + note: "`Get the Popular Music - achievement first (if you need help with it use /achievements Popular Music).`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,191,192,193,211,212,213,222,225,231,233|11`" + }, + { + challenge: 11, + completion: 2, + tt: 5600, + ip: "`1e700`", + note: "`Get the Popular Music - achievement first (if you need help with it use /achievements Popular Music).`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,121,131,141,151,161,162,171,181,191,192,193,211,212,213,222,225,231,233|11`" + }, + { + challenge: 11, + completion: 3, + tt: 5950, + ip: "`1e900`", + note: "`Get the Popular Music - achievement first (if you need help with it use /achievements Popular Music).`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,123,133,143,151,161,162,171,181,191,192,193,211,212,213,222,223,225,231,233|11`" + }, + { + challenge: 11, + completion: 4, + tt: 5950, + ip: "`1e1100`", + note: "`Get the Popular Music - achievement first (if you need help with it use /achievements Popular Music).`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,123,133,143,151,161,162,171,181,191,192,193,211,212,213,222,223,225,231,233|11`" + }, + { + challenge: 11, + completion: 5, + tt: 5950, + ip: "`1e1300`", + note: "`This takes around 2h 45m. Get the Popular Music - achievement first (if you need help with it use /achievements Popular Music).`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,71,81,91,101,111,123,133,143,151,161,162,171,181,191,192,193,211,212,213,222,223,225,231,233|11`" + }, + // EC12 + { + challenge: 12, + completion: 1, + tt: 9800, + ip: "`1e110,000`", + note: "`Enable Auto-Eternity.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,122,132,142,151,161,162,171,181,191,193,211,212,213,214,222,224,226,227,232,234|12`" + }, + { + challenge: 12, + completion: 2, + tt: 9800, + ip: "`1e122,000`", + note: "`Enable Auto-Eternity.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,122,132,142,151,161,162,171,181,191,193,211,212,213,214,222,224,226,227,232,234|12`" + }, + { + challenge: 12, + completion: 3, + tt: 10750, + ip: "`1e134,000`", + note: "`Enable Auto-Eternity.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,122,132,142,151,161,162,171,181,191,193,211,212,213,214,222,224,226,227,232,234|12`" + }, + { + challenge: 12, + completion: 4, + tt: 11200, + ip: "`1e146,000`", + note: "`Enable Auto-Eternity.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,122,132,142,151,161,162,171,181,191,193,211,212,213,214,222,224,226,227,232,234|12`" + }, + { + challenge: 12, + completion: 5, + tt: 12350, + ip: "`1e158,000`", + note: "`Enable Auto-Eternity. Can be done earlier if you have the When Will It Be Enough - achievement.`", + tree: "`11,21,22,31,32,33,41,42,51,61,62,73,83,93,103,111,122,132,142,151,161,162,171,181,191,193,211,212,213,214,222,224,226,227,232,234|12`" + }, +]; + +const order = ["1x1", "2x1", "1x2", "3x1", "4x1", "5x1", "1x3", "3x2", "2x2", "6x1", "1x4", "3x3", "7x1", "4x2", "4x3", "6x2", "1x5", "5x2", "2x3", "3x4", "7x2", "5x3", "8x1", "3x5", "6x3", "2x4", "5x4", "7x3", "2x5", "5x5", "4x4", "6x4", "7x4", "8x2", "6x5", "4x5", "8x3", "9x1", "9x2", "8x4", "9x3", "9x4", "8x5", "9x5", "10x1", "7x5", "10x2", "10x3", "10x4", "10x5", "11x1", "11x2", "11x3", "11x4", "11x5", "12x1", "12x2", "12x3", "12x4", "12x5"]; +const orderWithMultSigns = ["1×1", "2×1", "1×2", "3×1", "4×1", "5×1", "1×3", "3×2", "2×2", "6×1", "1×4", "3×3", "7×1", "4×2", "4×3", "6×2", "1×5", "5×2", "2×3", "3×4", "7×2", "5×3", "8×1", "3×5", "6×3", "2×4", "5×4", "7×3", "2×5", "5×5", "4×4", "6×4", "7×4", "8×2", "6×5", "4×5", "8×3", "9×1", "9×2", "8×4", "9×3", "9×4", "8×5", "9×5", "10×1", "7×5", "10×2", "10×3", "10×4", "10×5", "11×1", "11×2", "11×3", "11×4", "11×5", "12×1", "12×2", "12×3", "12×4", "12×5"]; + +/** + * Finds the other completions based on the ID and Completion of a challenge requested + * @param {Number} id ID of the challenge requested + * @param {Number} completion Completion of the challenge requested + * @returns {String} string of the other completions required to beat a certain challenge based on order + */ +function otherCompletions(id, completion) { + if (id < 1 || id > 12) { + return `Invalid challenge id: ${id}`; + } + + if (completion < 1 || completion > 5) { + return `Invalid challenge completion: ${completion}`; + } + + const completionText = `${id}x${completion}`; + const indexOfCompletion = order.indexOf(completionText); + + if (indexOfCompletion === -1) { + return `Challenge ${completionText} completion not found.`; + } + + if (indexOfCompletion === 0) { + return `No other challenge completions required.`; + } + + const completions = Array(12); + + for (let i = 0; i < indexOfCompletion; i++) { + const previous = order[i].split("x").map(Number); + const previousId = previous[0] - 1; + const previousCompletion = previous[1]; + + completions[previousId] = previousCompletion; + } + + return completions.filter(Number).map((value, index) => `${index + 1}x${value}`).join(", "); +} + +module.exports = { EternityChallenges, order, orderWithMultSigns, otherCompletions }; \ No newline at end of file