Skip to content

Commit

Permalink
🛠 Update logic of generating client id
Browse files Browse the repository at this point in the history
  • Loading branch information
shamhi committed Aug 22, 2024
1 parent db3d37c commit 7bc17e4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bot/utils/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,10 @@ async def get_mini_game_cipher(http_client: aiohttp.ClientSession,


def generate_client_id():
current_time = int(time.time() * 1000)
random_part = random.randint(100, 999)
random_first = int(str(current_time)[:10] + str(random_part))
time_ms = int(time.time() * 1000)
rand_num = "34" + str(random.randint(10000000000000000, 99999999999999999))

return f"{random_first}-3472514666961597005"
return f"{time_ms}-{rand_num}"


def generate_event_id():
Expand Down

0 comments on commit 7bc17e4

Please sign in to comment.