mirror of
https://github.com/Redume/Shirino.git
synced 2024-11-22 00:06:22 +03:00
I limited the characters after the floating point, now conv_amount is multiplied by amount
This commit is contained in:
parent
19e84256a2
commit
6f364be57f
1 changed files with 2 additions and 1 deletions
3
main.py
3
main.py
|
@ -7,6 +7,7 @@ import logging
|
||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict, List, Optional
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
|
import math
|
||||||
|
|
||||||
from pydantic import BaseSettings
|
from pydantic import BaseSettings
|
||||||
|
|
||||||
|
@ -160,7 +161,7 @@ async def currency(inline_query: InlineQuery) -> None:
|
||||||
|
|
||||||
result = (
|
result = (
|
||||||
f'{conv.amount} {conv.from_currency} = '
|
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:
|
except Exception as ex:
|
||||||
|
|
Loading…
Add table
Reference in a new issue