【问题标题】:How to remove service messages from Telegram with Bot API?如何使用 Bot API 从 Telegram 中删除服务消息?
【发布时间】:2018-06-06 04:06:05
【问题描述】:

我在 Telegram 中有一个超级组和一个 Bot,它是一个组的管理员。当新用户加入或离开群组时,聊天中会出现服务消息(背景为灰色),例如

Username join to a chat
Username is join to a chat by invite link
Username is left the chat

是否可以从与 Bot API 的聊天中捕获和删除此类服务消息?提前致谢!

PS。我正在使用https://github.com/php-telegram-bot/core

【问题讨论】:

    标签: telegram telegram-bot php-telegram-bot


    【解决方案1】:

    你需要将Request::sendMessage()添加到each update events

    PS。已经有@AntiServiceMessageBot可以做到这一点。

    【讨论】:

    • 感谢您的回答!我已经用 php-telegram-bot 命令 Newchatmembers 和 Leftchatmember 做出了决定。
    猜你喜欢
    • 1970-01-01
    • 2018-11-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-28
    • 1970-01-01
    • 2016-05-18
    • 2020-03-26
    相关资源
    最近更新 更多