aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMole Shang <[email protected]>2023-01-25 13:54:47 +0800
committerMole Shang <[email protected]>2023-01-25 13:54:47 +0800
commitbe447d0ea7fc30b7bd7bdfe730532f20a3f00b77 (patch)
tree37fb18b0b5a738ae6c75ccf40775a8fa27c1de6c
parent0241c014dc3c1ee2abcb65104c943c8d09b0d380 (diff)
downloadtelegram-mail-bot-be447d0ea7fc30b7bd7bdfe730532f20a3f00b77.tar.gz
telegram-mail-bot-be447d0ea7fc30b7bd7bdfe730532f20a3f00b77.tar.bz2
telegram-mail-bot-be447d0ea7fc30b7bd7bdfe730532f20a3f00b77.zip
fix(bot.py): update callback params...
... following the new 20.0 api here: https://github.com/python-telegram-bot/python-telegram-bot/wiki/Extensions-%E2%80%93-JobQueue
-rw-r--r--bot.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bot.py b/bot.py
index 68be042..11fc201 100644
--- a/bot.py
+++ b/bot.py
@@ -94,7 +94,7 @@ async def periodic_task(context: CallbackContext) -> None:
mail = client.get_mail_by_index(i + 1)
content = mail.__repr__()
for text in handle_large_text(content):
- await context.bot.send_message(context.job.context, text=text)
+ await context.bot.send_message(context.job.chat_id, text=text)
inbox_num = new_inbox_num