Telegram recurring message to one user

467 views Asked by At

I need to send two specific recurring messages to a user in telegram .

The first message is followed by the second after some seconds .

It will be the same two messages every 10 mn ,everyday !

Example :

RecurringMessage1 : I AM READY

then after some seconds comes the second one :

RecurringMessage2 : YOU CAN SEND NOW

This would be repeated every 10 mn every day and so on .

The receiver is a bot on telegram that has a @username only . ( i dont have the skills to get his chat id , and restricted to include him in any group ) .

Any help is highly appreciated .

Tried using scheduled messages feature of telegram , it works but it is completely unpractical to use it due to the large number of recurring messages .

Thank you

1

There are 1 answers

1
jazzchng On

You can try to use telethon module to get the chat id of the bot while it's reading all your current incoming messages.

from telethon import TelegramClient, events

Otherwise if you remove the '@' from the bot's name e.g. @MyBot, you should be able to use https://t.me/MyBot as an alternative.