From 43ffa88642392154b6d1abadf7342851546b2022 Mon Sep 17 00:00:00 2001 From: Redume Date: Mon, 26 Aug 2024 11:18:54 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D1=84?= =?UTF-8?q?=D0=BE=D1=80=D0=BC=D0=B0=D1=82=20=D1=87=D0=B8=D1=81=D0=B5=D0=BB?= =?UTF-8?q?,=20=D1=87=D1=82=D0=BE=D0=B1=D1=8B=201300=20=D1=84=D0=BE=D1=80?= =?UTF-8?q?=D0=BC=D0=B0=D1=82=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BB=D0=BE?= =?UTF-8?q?=D1=81=D1=8C=20=D0=B2=201=20300?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index aeed7fe..0032419 100644 --- a/main.py +++ b/main.py @@ -11,6 +11,7 @@ import re from word2number import w2n from function.convert import Converter +from function.format_number import format_number config = yaml.safe_load(open("config.yaml")) dp = Dispatcher() @@ -69,7 +70,7 @@ async def message_conv(message: types.Message): conv.conv_currency = target_currency_code.upper() conv.convert() - result = f'{conv.amount} {conv.from_currency} = {conv.conv_amount} {conv.conv_currency}' + result = f'{format_number(conv.amount)} {conv.from_currency} = {conv.conv_amount} {conv.conv_currency}' await message.reply(result) @@ -117,7 +118,7 @@ async def currency(inline_query: types.InlineQuery) -> None: conv.convert() result = ( - f'{conv.amount} {conv.from_currency} = ' + f'{format_number(conv.amount)} {conv.from_currency} = ' f'{conv.conv_amount} {conv.conv_currency}' )