From 9074d663eb9866f10939a3a02e1a1e166899157a Mon Sep 17 00:00:00 2001 From: Redume Date: Fri, 15 Nov 2024 21:34:50 +0300 Subject: [PATCH] fix error --- main.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index b3edd26..8b928d5 100644 --- a/main.py +++ b/main.py @@ -27,11 +27,12 @@ async def currency(query: types.InlineQuery) -> None: conv = Converter() - if len(args) < 2: + if len(args) <= 2: return await reply(result_id, [("2 or 3 arguments are required.", '@shirino_bot USD RUB \n' - '@shirino_bot 12 USD RUB')], + '@shirino_bot 12 USD RUB', + None, None)], query) if len(args) == 3: @@ -42,10 +43,10 @@ async def currency(query: types.InlineQuery) -> None: from_currency = args[0] conv_currency = args[1] else: - return await reply(result_id, [('The source and target currency could not be determined.')], query) + return await reply(result_id, [('The source and target currency could not be determined.', None, None)], query) if not from_currency or not conv_currency: - return await reply(result_id, [('The currency exchange rate could not be found.')], query) + return await reply(result_id, [('The currency exchange rate could not be found.', None, None)], query) conv.from_currency = from_currency.upper() conv.conv_currency = conv_currency.upper()