Can anyone point me to a way to programatically check for changes in a Telegram room? I can't decipher the API. I want to do something like:
telegram.onMessageReceived('room_id', (msg) => {
console.log(msg.content);
}
I usually use Python, but open to using NodeJS because I want to have it always running, monitoring for changes on an Ubuntu server.
As far as I can find on the internet, everything is pointing to the bot API, but as I understand it, it would only be notified of updates to messages to the bot. I want to monitor public rooms in which I cannot add the bot as an administrator since I did not create the room. Or is there some way to add a bot to public rooms? I don't think so.
Also the room I want to monitor doesn't allow anyone to chat. It's just to notify subscribers.
I've read these SOs so far and am still confused:
Can a Telegram bot read messages of channel
How do I join my bot to the Channel?
How to join my Telegram Bot to PUBLIC channel
in node.js
telegram library you can check the last message.date and compare with last date you have stored. if changed there is new message
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With