From 2f47ff05d90f221a27cedc48670756d2b7bc2df7 Mon Sep 17 00:00:00 2001 From: djimbo Date: Sun, 20 Nov 2022 22:46:28 +0300 Subject: [PATCH] Update --- tgbot/utils/const_functions.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tgbot/utils/const_functions.py b/tgbot/utils/const_functions.py index b85a761..e4338fb 100644 --- a/tgbot/utils/const_functions.py +++ b/tgbot/utils/const_functions.py @@ -192,7 +192,8 @@ def snum(amount, remains=0) -> str: else: str_amount = str(amount) - while str_amount.endswith('0'): str_amount = str_amount[:-1] + if "." in str_amount: + while str_amount.endswith('0'): str_amount = str_amount[:-1] if str_amount.endswith('.'): str_amount = str_amount[:-1] if remains != 0: