Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Telegram Bot How to delete or remove a message or media from a channel or group

I want to know an example of removing message or file like a photo

I did not find any functional tutorial in this regard,

like image 304
Ebrahim Avatar asked Feb 08 '16 12:02

Ebrahim


People also ask

Can Telegram BOT delete messages?

If the bot is an administrator in a supergroup, it can delete messages from any other user and service messages about people joining or leaving the group (other types of service messages may only be removed by the group creator). In channels, bots can only remove their own messages.

How can I delete media from Telegram group?

On the Telegram desktop app: Select “Advanced” from the Settings window that appears on your screen. Under the “Data and Storage” section, select “Manage local storage.” Adjust the slider under the “Clear files” option and click Save on the bottom right corner of the window to apply the changes.


1 Answers

There is no such functionality in Telegram Bot API right now.

UPD 2017-05-19: There is an official method deleteMessage, more info: https://core.telegram.org/bots/api#deletemessage

https://stackoverflow.com/a/43965602/1140438

like image 155
ihoru Avatar answered Sep 22 '22 12:09

ihoru