From 7bc17e4e4ff2c4c66a7c8d34b493c0b555d32e64 Mon Sep 17 00:00:00 2001 From: shamhi Date: Thu, 22 Aug 2024 11:57:15 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=20Update=20logic=20of=20generating?= =?UTF-8?q?=20client=20id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot/utils/scripts.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bot/utils/scripts.py b/bot/utils/scripts.py index 321d9a54..891f4e1e 100644 --- a/bot/utils/scripts.py +++ b/bot/utils/scripts.py @@ -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():