How can i Clear the Chat History, in my case the Bot Chat history with Telegraf.js? I saw in Telegram API that is there a way to clear History of a chat: https://core.telegram.org/method/messages.deleteHistory
WIth messages.deleteHistory()
, but i cannot find nothing on Telegraf docs.
So how can i do with Telegraf to clear the history?
Thank you
3
Answers
Telegraf.js uses the official Telegram BOT Api behind the scenes (accessed using HTTP).
And
messages.deleteHistory()
is a core API method (accessed using MTProto protocol). Also note that the method can only be invoked by Regular Users and not Bots (even if you consider using a mtproto based libs. to call it)In other words, Bots can’t do that and there isn’t such method in the HTTP bot API. The best you can do is use
deleteMessage
.I’ve tried such a way, but it won’t be enough.