Timmy MK 3 is an homage to the original Timmy the Time Bot programmed by Khunee and Juliend10 in Python. I rewrote the Discord bot in JavaScript as I'm more comfortable with it.
See also:
- HITMAN Milliseconds Time Calc Website
- Website version of this bot (since not everyone uses Discord)
- Also includes a link sharing feature, to easily share calculator results with friends
- Timmy MK 2 Discord Bot
- Alternative implementation using AWS Lambda (serverless) for hosting, as well as Discord Slash commands
For a full deep dive into the math behind this, please check Time Calc Website README.
- Before you start, create a
.env
file and include the lineDISCORD_TOKEN=DISCORD_TOKEN_VALUE
, whereDISCORD_TOKEN_VALUE
can be obtained as explained here - Run
npm install
to install dependencies- I am on NodeJS version 18.18.2 if it matters
- Run
node index.js
to run locally - Code formatting:
npm run prettier
- For server hosting, I used railway.app
Check Discord.js v12 documentation, as well as this tutorial I was using
- Add the bot to your Discord server using this URL, or just DM the bot on Discord at
Timmy MK 3#9573
. Sending commands to the bot in a server and in DM's are both supported. - The required inputs are to type
!time SCORE
, where SCORE is the score on the rating screen.- You can have commas in your score input.
- 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 at 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 83521
.
-
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.
-
In case of rounding errors, you will get a warning, as shown below (example:
!time 204667
):
- Use the
!debugtime SCORE
, where SCORE is the score on the rating screen as shown below (example:!debugtime 204667
):
If needed, click the individual links on the debug message to see the exact math equations used (cross reference with Longer Math Explanation link at bottom):
- You can also use the
over5
optional parameter to calculate milliseconds for runs between 5 and 15 minutes. Use the syntax!time SCORE over5
or!debugtime SCORE over5
, as shown below: