如何使用Bot API从Telegram中删除服务消息?

问题描述 投票:0回答:1

我在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个回答
1
投票

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

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

© www.soinside.com 2019 - 2024. All rights reserved.