Added method \TgBotLib > Bot > getWebhookInfo()
This commit is contained in:
parent
71dc0b5bb6
commit
1c32980541
1 changed files with 13 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
use TgBotLib\Exceptions\TelegramException;
|
||||
use TgBotLib\Objects\Telegram\Update;
|
||||
use TgBotLib\Objects\Telegram\WebhookInfo;
|
||||
|
||||
class Bot
|
||||
{
|
||||
|
@ -201,4 +202,16 @@
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this method to get current webhook status. Requires no parameters. On success, returns a WebhookInfo
|
||||
* object. If the bot is using getUpdates, will return an object with the url field empty.
|
||||
*
|
||||
* @return WebhookInfo
|
||||
* @throws TelegramException
|
||||
*/
|
||||
public function getWebhookInfo(): WebHookInfo
|
||||
{
|
||||
return WebhookInfo::fromArray($this->sendRequest('getWebhookInfo'));
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue