Added \TgBotLib > Bot > deleteWebhook()

This commit is contained in:
Netkas 2023-02-14 21:04:16 -05:00
parent 998b7825d1
commit 5064aed99f

View file

@ -184,4 +184,21 @@
])); ]));
return true; return true;
} }
/**
* Use this method to remove webhook integration if you decide to switch back to getUpdates.
* Returns True on success.
*
* @param bool $drop_pending_updates
* @return bool
* @throws TelegramException
*/
public function deleteWebhook(bool $drop_pending_updates=false): bool
{
$this->sendRequest('deleteWebhook', [
'drop_pending_updates' => $drop_pending_updates
]);
return true;
}
} }