aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2023-03-09 00:28:18 +0800
committerMole Shang <[email protected]>2023-03-09 00:28:18 +0800
commit546928c977fae4c316c27664e3dfd4982b293ffe (patch)
tree47085ed05d1199d7c06010fb2bf9266974cadf57
parentcd556e004cf27a029bd9cd00b45b48f4965f6a67 (diff)
downloadtelegram-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.py2
1 files changed, 1 insertions, 1 deletions
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,