Timmy MK 2 is an homage to the original Timmy the Time Bot programmed by Khunee and Juliend10 in Python. I switched to Javascript as I'm more comfortable with it, and AWS hosting for a more stable hosting solution than the original Timmy bot.
For a full deep dive into the math behind this, please check Time Calc Website README. This bot mostly works the same, except that this bot can return up to 4 possible values, in return for the user typing in less inputs than the Time Calc Website. I kept it that way as the original Timmy Bot did it the same, and also because the speedrunner users are generally ok with sifting through a few possible answers if they can enter less inputs.
-
Must set Payload Format to 2.0. Click AWS in very top left > API Gateway > discord-API > develop > Integrations > Manage Integrations > Edit > Advanced Settings
- To go back to code: CLick AWS in very top left > Lambda
-
Anything in the
register_commands
folder can be run vianode register.js
on your local computer. Anything inlambda_bot
should be run inside of AWS Lambda Code terminal.- Two most important menus in Lambda - Code and Configuration (for Env. Variables)
- Reference Image of code setup in Lambda
- Copy contents of
lambda_bot
folder to top directory of Lambda coding space.
-
I switched to DiscordJS instead of Axios for handling the numberic inputs
-
.env
andconfig.json
files aren't included here for my privacy but you will need one (Explained in the tutorial from first bullet point), as well as here -
Up to 1 million free Lambda requests (read: bot command usages) per month.
- Add the bot to your Discord server using this URL, or just DM the bot on Discord at
Timmy MK 2#9428
. Sending commands to the bot in a server and in DM's are both supported. - The required inputs are to type
/time
into the bot, then click on thescore
option, then enter your score value. - Most video examples from here or here will work for getting valid scores. Otherwise, any score value of about 50,000 to 210,000 should work.
- NOTE: Only Hitman level completion times of up to 5 minutes are compatible with the bot.
- Use the Time Calc Website for times of 5 to 15 minutes.
- For this example, let's use this video, which is an 8 second run of the "On Top of the World" Hitman level.
- We can see that the end of this video that the score at the end of the video is
83,521
. As shown here: - Now, let's type
/time
, then select thescore
option, then type in the score83521
.
- As you can see, the bot returns a few viable solutions. One of them (8.981) is within a second of the 8 seconds value shown on the rating screen, so this is the milliseconds value we are looking for.