title: how to delete all messages in telegram chat with python
body: <p>I am writing a telegram bot in python.
  One of my bot functionalities is to delete all of the messages in the chat. I find the function <code>bot.delete_message</code> however it delete only one message according to message id and I don't have the ids for every message.</p>
  
  <p>I also saw in the telegram api some functions that can help me, like <a href="https://core.telegram.org/method/channels.deleteHistory" rel="nofollow noreferrer">https://core.telegram.org/method/channels.deleteHistory</a> or <a href="https://core.telegram.org/method/messages.getHistory" rel="nofollow noreferrer">https://core.telegram.org/method/messages.getHistory</a> (will allow me to get the id of every message and then delete them). but I don't see how I can call these functions in the python api.</p>
  
  <p>Is there a way to call these functions with the python api? or perhaps is there another way to delete entire chat history?</p>