mirror of
https://github.com/Redume/Shirino.git
synced 2024-11-23 00:36:22 +03:00
Compare commits
No commits in common. "9a2b16aefbb1201247e6f91b9d2db60e054370b7" and "019f844e4ffd431ff7879028568147ddca132116" have entirely different histories.
9a2b16aefb
...
019f844e4f
2 changed files with 3 additions and 5 deletions
5
main.py
5
main.py
|
@ -11,7 +11,6 @@ import re
|
||||||
|
|
||||||
from word2number import w2n
|
from word2number import w2n
|
||||||
from function.convert import Converter
|
from function.convert import Converter
|
||||||
from function.format_number import format_number
|
|
||||||
|
|
||||||
config = yaml.safe_load(open("config.yaml"))
|
config = yaml.safe_load(open("config.yaml"))
|
||||||
dp = Dispatcher()
|
dp = Dispatcher()
|
||||||
|
@ -70,7 +69,7 @@ async def message_conv(message: types.Message):
|
||||||
conv.conv_currency = target_currency_code.upper()
|
conv.conv_currency = target_currency_code.upper()
|
||||||
conv.convert()
|
conv.convert()
|
||||||
|
|
||||||
result = f'{format_number(conv.amount)} {conv.from_currency} = {conv.conv_amount} {conv.conv_currency}'
|
result = f'{conv.amount} {conv.from_currency} = {conv.conv_amount} {conv.conv_currency}'
|
||||||
await message.reply(result)
|
await message.reply(result)
|
||||||
|
|
||||||
|
|
||||||
|
@ -118,7 +117,7 @@ async def currency(inline_query: types.InlineQuery) -> None:
|
||||||
conv.convert()
|
conv.convert()
|
||||||
|
|
||||||
result = (
|
result = (
|
||||||
f'{format_number(conv.amount)} {conv.from_currency} = '
|
f'{conv.amount} {conv.from_currency} = '
|
||||||
f'{conv.conv_amount} {conv.conv_currency}'
|
f'{conv.conv_amount} {conv.conv_currency}'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,4 +2,3 @@ aiohttp~=3.9.5
|
||||||
requests~=2.32.3
|
requests~=2.32.3
|
||||||
PyYAML~=6.0.1
|
PyYAML~=6.0.1
|
||||||
aiogram~=3.7.0
|
aiogram~=3.7.0
|
||||||
word2number~=1.1
|
|
Loading…
Add table
Reference in a new issue