0

I have a supergroup in Telegram and a Bot, which is administrator of a group. When a new user join or left group, service message (with grey background) is appear in chat, for example

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

Is it possible to catch and delete such service messages from chat with Bot API? Thanks in advance!

PS. I'am using https://github.com/php-telegram-bot/core

Evgeniy
  • 3,219
  • 5
  • 25
  • 40

1 Answers1

1

You need to add Request::sendMessage() to each update events

PS. There already have @AntiServiceMessageBot can do this.

Sean Wei
  • 7,433
  • 1
  • 19
  • 39
  • Thank you for answear! I'am already make a decision with php-telegram-bot commands Newchatmembers and Leftchatmember. – Evgeniy Dec 25 '17 at 14:20