From 92f16ae305422504322922733e057da2caf76cd1 Mon Sep 17 00:00:00 2001 From: Ali Askari Date: Sat, 28 Dec 2024 18:06:40 +0330 Subject: [PATCH] fix space error --- main.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 6ac18fc..292f949 100644 --- a/main.py +++ b/main.py @@ -48,7 +48,8 @@ def format_data_for_telegram(data): # Add more currencies and their Persian names as needed } - formatted_lines = [] + formatted_lines = [] + for key, values in data.items(): flag = currency_flags.get(key.lower(), '') name_persian = currency_names_persian.get(key.lower(), key.upper()) @@ -62,12 +63,9 @@ def format_data_for_telegram(data): formatted_lines.append(f"{flag} • {name_persian}: \n - فروش: {sell_price} \n - خرید: {buy_price}") - - # Add Jalali date at the beginning jalali_date = jdatetime.datetime.now().strftime("%Y/%m/%d") formatted_message = f"تاریخ: {jalali_date}\n\n{formatted_message}" - - # Add Telegram channel address at the end + formatted_message += "\n\n@bonbast2tg" return formatted_message