title: Clear "pending_update_count" in Telegram Bot
body: <p>I want to clear all <code>pending_update_count</code> in my bot!</p>
  
  <p>The output of below command :</p>
  
  <pre><code>https://api.telegram.org/botxxxxxxxxxxxxxxxx/getWebhookInfo
  </code></pre>
  
  <p><em>Obviously I replaced the real API token with xxx</em></p>
  
  <p>is this :</p>
  
  <pre><code>{
   "ok":true,"result":
      {
       "url":"",
       "has_custom_certificate":false,
       "pending_update_count":5154
      }
  }
  </code></pre>
  
  <p>As you can see, I have <code>5154</code> unread updates til now!! ( I'm pretty sure this pending updates are errors! Because no one uses this Bot! It's just a test Bot)</p>
  
  <p>By the way, this <code>pending_update_count</code> number are increasing so fast!
  Now that I'm writing this post the number increased <code>51</code> and reached to 5205 !</p>
  
  <p>I just want to clear this pending updates.
  I'm pretty sure this Bot have been stuck in an infinite loop!</p>
  
  <p>Is there any way to get rid of it?</p>
  
  <p>P.S:</p>
  
  <p>I also cleared the webhook url. But nothing changed!</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>The output of <code>getWebhookInfo</code> is this :</p>
  
  <pre><code>{
     "ok":true,
     "result":{
        "url":"https://somewhere.com/telegram/webhook",
        "has_custom_certificate":false,
        "pending_update_count":23,
        "last_error_date":1482910173,
        "last_error_message":"Wrong response from the webhook: 500 Internal Server Error",
        "max_connections":40
     }
  }
  </code></pre>
  
  <p>Why I get <code>Wrong response from the webhook: 500 Internal Server Error</code> ?</p>