From b7396d4634f95573f5a2f15f2de52369aa97730f Mon Sep 17 00:00:00 2001 From: Redume Date: Tue, 7 Jan 2025 13:57:48 +0300 Subject: [PATCH] fix: replace , to . --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 0b92670..4889b47 100644 --- a/main.py +++ b/main.py @@ -15,7 +15,7 @@ config = yaml.safe_load(open('config.yaml')) @dp.inline_query() async def currency(query: types.InlineQuery) -> None: - global result, from_currency, conv_currency + global from_currency, conv_currency try: text = query.query.lower() @@ -33,7 +33,7 @@ async def currency(query: types.InlineQuery) -> None: query) if len(args) == 3: - conv.amount = float(args[0]) + conv.amount = float(args[0].replace(',', '.')) from_currency = args[1] conv_currency = args[2] elif len(args) == 2: