From ed8425c15a9bee59abac2cccb75e1478c02767e7 Mon Sep 17 00:00:00 2001 From: dj Date: Fri, 12 Apr 2024 03:37:19 +0300 Subject: [PATCH] Update --- tgbot/utils/const_functions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tgbot/utils/const_functions.py b/tgbot/utils/const_functions.py index 963eb5a..379f64e 100644 --- a/tgbot/utils/const_functions.py +++ b/tgbot/utils/const_functions.py @@ -195,9 +195,9 @@ def convert_date(from_time, full=True, second=True) -> Union[str, int]: # Генерация уникального айди -def gen_id() -> int: +def gen_id(len_id: int = 16) -> int: mac_address = uuid.getnode() - time_unix = int(str(time.time_ns())[:16]) + time_unix = int(str(time.time_ns())[:len_id]) return mac_address + time_unix