I limited the characters after the floating point, now conv_amount is multiplied by amount

This commit is contained in:
Данил 2023-05-30 20:35:16 +03:00
parent 19e84256a2
commit 6f364be57f
No known key found for this signature in database
GPG key ID: 5051BCD5AB064A7B

View file

@ -7,6 +7,7 @@ import logging
from typing import Any, Dict, List, Optional
import requests
import math
from pydantic import BaseSettings
@ -160,7 +161,7 @@ async def currency(inline_query: InlineQuery) -> None:
result = (
f'{conv.amount} {conv.from_currency} = '
f'{conv.conv_amount} {conv.conv_currency}'
f'{math.floor(conv.conv_amount*conv.amount)} {conv.conv_currency}'
)
except Exception as ex: