fix: replace , to .

This commit is contained in:
Данил 2025-01-07 13:57:48 +03:00
parent e54e70ed49
commit b7396d4634

View file

@ -15,7 +15,7 @@ config = yaml.safe_load(open('config.yaml'))
@dp.inline_query() @dp.inline_query()
async def currency(query: types.InlineQuery) -> None: async def currency(query: types.InlineQuery) -> None:
global result, from_currency, conv_currency global from_currency, conv_currency
try: try:
text = query.query.lower() text = query.query.lower()
@ -33,7 +33,7 @@ async def currency(query: types.InlineQuery) -> None:
query) query)
if len(args) == 3: if len(args) == 3:
conv.amount = float(args[0]) conv.amount = float(args[0].replace(',', '.'))
from_currency = args[1] from_currency = args[1]
conv_currency = args[2] conv_currency = args[2]
elif len(args) == 2: elif len(args) == 2: