Last active
June 15, 2022 00:15
-
-
Save adntaha/d5c8b8720665a7b9cec2d4f2a770ae59 to your computer and use it in GitHub Desktop.
get discord account creation date in message timestamp format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
userId = int(input("Enter your Discord user ID: ")) | |
print("---") | |
inBinary = format(userId, "b") | |
inReverse = inBinary[::-1] | |
timestampPart = inReverse[22:64] | |
backInBase10 = int(timestampPart, 2) | |
plusDiscordEpoch = backInBase10 + 1420070400000 | |
inSeconds = round(plusDiscordEpoch / 1000) | |
print("Copy paste this:") | |
print(f"<t:{inSeconds}:R>") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment