From 546928c977fae4c316c27664e3dfd4982b293ffe Mon Sep 17 00:00:00 2001 From: Mole Shang <135e2@135e2.dev> Date: Thu, 9 Mar 2023 00:28:18 +0800 Subject: fix(bot.py): start counting index from 1 in response... ... for better UX. --- bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.py b/bot.py index eca4d8b..65ace9b 100644 --- a/bot.py +++ b/bot.py @@ -155,7 +155,7 @@ async def list_email(update: Update, context: CallbackContext) -> None: mails = client.get_listed_mails() text = "" for i in mails: - text += f"*{mails.index(i)}*: Subject: {i[0]};\nSender: {i[1]};\nDate: {i[2]}\n\n" + text += f"*{mails.index(i)+1}*: Subject: {i[0]};\nSender: {i[1]};\nDate: {i[2]}\n\n" await context.bot.send_message( update.message.chat_id, parse_mode=ParseMode.MARKDOWN, -- cgit v1.2.3