diff options
author | Mole Shang <[email protected]> | 2023-03-09 00:28:18 +0800 |
---|---|---|
committer | Mole Shang <[email protected]> | 2023-03-09 00:28:18 +0800 |
commit | 546928c977fae4c316c27664e3dfd4982b293ffe (patch) | |
tree | 47085ed05d1199d7c06010fb2bf9266974cadf57 | |
parent | cd556e004cf27a029bd9cd00b45b48f4965f6a67 (diff) | |
download | telegram-mail-bot-546928c977fae4c316c27664e3dfd4982b293ffe.tar.gz telegram-mail-bot-546928c977fae4c316c27664e3dfd4982b293ffe.tar.bz2 telegram-mail-bot-546928c977fae4c316c27664e3dfd4982b293ffe.zip |
fix(bot.py): start counting index from 1 in response...
... for better UX.
-rw-r--r-- | bot.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, |