How to receive all messages from my channel in a telegram?

To all of you! I have a telegram. And I want to automatically create windows on my site. The widget receives the latest messages from the channel via telegram. Like a twitter widget . Unable to find a suitable guide for him

+1
source share
1 answer

You can use:

updates.getChannelDifference#bb32d7c0 channel:InputChannel filter:ChannelMessagesFilter pts:int limit:int = updates.ChannelDifference;

It will return one of the following values:

updates.channelDifferenceEmpty#3e11affb flags:# final:flags.0?true pts:int timeout:flags.1?int = updates.ChannelDifference;
updates.channelDifferenceTooLong#5e167646 flags:# final:flags.0?true pts:int timeout:flags.1?int top_message:int top_important_message:int read_inbox_max_id:int unread_count:int unread_important_count:int messages:Vector<Message> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference;
updates.channelDifference#2064674e flags:# final:flags.0?true pts:int timeout:flags.1?int new_messages:Vector<Message> other_updates:Vector<Update> chats:Vector<Chat> users:Vector<User> = updates.ChannelDifference;

In your implementation, Telegram periodically issues updates.getChannelDifferenceto retrieve (and cache) your new channel messages.

updates.channelDifferenceEmpty returns, indicating that you have seen the latest posts on your channel.

Then you can send / push new messages to the panel / widget of the website

+2

All Articles