【问题标题】:How to obtain all messages from my channel in telegram?如何在电报中从我的频道获取所有消息?
【发布时间】:2016-08-23 03:04:58
【问题描述】:

大家好! 我有一个电报频道。我想在我的网站上自动构建窗口。小部件从电报频道获取最后一条消息。 像 twitter 小部件。找不到合适的手册

【问题讨论】:

    标签: php html telegram


    【解决方案1】:

    你可以使用:

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

    它将返回以下之一:

    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;
    

    在您的 Telegram 实施中,定期发出 updates.getChannelDifference 以提取(并缓存)您的新频道消息。

    返回updates.channelDifferenceEmpty 表示您已经看到了您频道上的最新消息。

    然后您可以将新消息流式传输/推送到您的网站面板/小部件

    【讨论】:

    • 嗨,我有义务与您合作,请联系我:aminghaderi@gmail.com 或电报:@Amingh777 我在等你,谢谢。
    • @AminGhaderi 当然没问题
    猜你喜欢
    • 2016-09-08
    • 2018-06-15
    • 1970-01-01
    • 1970-01-01
    • 2020-12-23
    • 2017-04-27
    • 1970-01-01
    • 2021-10-12
    • 2017-03-04
    相关资源
    最近更新 更多