Updated PhpDocs
This commit is contained in:
parent
17ff223461
commit
5e52ceea4b
5 changed files with 44 additions and 5 deletions
|
@ -5,11 +5,20 @@
|
|||
use TgBotLib\Abstracts\Method;
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\Methods;
|
||||
use TgBotLib\Exceptions\TelegramException;
|
||||
|
||||
class Close extends Method
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Use this method to close the bot instance before moving it from one local server to another.
|
||||
* You need to delete the webhook before calling this method to ensure that the bot isn't launched again
|
||||
* after server restart. The method will return error 429 in the first 10 minutes after the bot is launched.
|
||||
* Returns True on success. Requires no parameters.
|
||||
*
|
||||
* @param Bot $bot
|
||||
* @param array $parameters
|
||||
* @return bool
|
||||
* @throws TelegramException
|
||||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): bool
|
||||
{
|
||||
|
|
|
@ -6,12 +6,19 @@ use InvalidArgumentException;
|
|||
use TgBotLib\Abstracts\Method;
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\Methods;
|
||||
use TgBotLib\Exceptions\TelegramException;
|
||||
use TgBotLib\Objects\Message;
|
||||
|
||||
class ForwardMessage extends Method
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Use this method to forward messages of any kind. Service messages and messages with protected content can't be
|
||||
* forwarded. On success, the sent Message is returned.
|
||||
*
|
||||
* @param Bot $bot
|
||||
* @param array $parameters
|
||||
* @return Message
|
||||
* @throws TelegramException
|
||||
*/
|
||||
public static function execute(Bot $bot, array $parameters = []): Message
|
||||
{
|
||||
|
|
|
@ -5,12 +5,19 @@
|
|||
use TgBotLib\Abstracts\Method;
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\Methods;
|
||||
use TgBotLib\Exceptions\TelegramException;
|
||||
use TgBotLib\Objects\User;
|
||||
|
||||
class GetMe extends Method
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
* A simple method for testing your bot's authentication token. Requires no parameters.
|
||||
* Returns basic information about the bot in form of a User object.
|
||||
*
|
||||
* @param Bot $bot
|
||||
* @param array $parameters
|
||||
* @return User
|
||||
* @throws TelegramException
|
||||
*/
|
||||
public static function execute(Bot $bot, array $parameters=[]): User
|
||||
{
|
||||
|
|
|
@ -5,11 +5,21 @@
|
|||
use TgBotLib\Abstracts\Method;
|
||||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\Methods;
|
||||
use TgBotLib\Exceptions\TelegramException;
|
||||
|
||||
class Logout extends Method
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Use this method to log out from the cloud Bot API server before launching the bot locally. You must log out
|
||||
* the bot before running it locally, otherwise there is no guarantee that the bot will receive updates.
|
||||
* After a successful call, you can immediately log in on a local server, but will not be able to log in back
|
||||
* to the cloud Bot API server for 10 minutes. Returns True on success. Requires no parameters.
|
||||
*
|
||||
* @param Bot $bot
|
||||
* @param array $parameters
|
||||
* @return bool
|
||||
* @throws TelegramException
|
||||
*/
|
||||
public static function execute(Bot $bot, array $parameters=[]): bool
|
||||
{
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
use TgBotLib\Bot;
|
||||
use TgBotLib\Enums\Methods;
|
||||
use TgBotLib\Enums\Types\ParseMode;
|
||||
use TgBotLib\Exceptions\TelegramException;
|
||||
use TgBotLib\Interfaces\ObjectTypeInterface;
|
||||
use TgBotLib\Objects\LinkPreviewOptions;
|
||||
use TgBotLib\Objects\Message;
|
||||
|
@ -16,7 +17,12 @@
|
|||
class SendMessage extends Method
|
||||
{
|
||||
/**
|
||||
* @inheritDoc
|
||||
* Use this method to send text messages. On success, the sent Message is returned.
|
||||
*
|
||||
* @param Bot $bot
|
||||
* @param array $parameters
|
||||
* @return Message
|
||||
* @throws TelegramException
|
||||
*/
|
||||
public static function execute(Bot $bot, array $parameters=[]): Message
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue