Skip to content

deleteChatHistory

Sahri Riza Umami edited this page Dec 8, 2016 · 3 revisions

Deletes all messages in the chat.

deleteChatHistory(chat_id, remove_from_chat_list)

Can't be used for channel chats.

Option Description
chat_id Chat identifier.
remove_from_chat_list Pass true, if chat should be removed from the chat list.

Example

Deletes all messages in the 1234567890 chat, and removed 1234567890 from the chat list.

deleteChatHistory(1234567890, 1)

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally