diff --git a/src/TgBotLib/Methods/Close.php b/src/TgBotLib/Methods/Close.php index e349116..f6f9951 100644 --- a/src/TgBotLib/Methods/Close.php +++ b/src/TgBotLib/Methods/Close.php @@ -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 { diff --git a/src/TgBotLib/Methods/ForwardMessage.php b/src/TgBotLib/Methods/ForwardMessage.php index ffed81f..adffb80 100644 --- a/src/TgBotLib/Methods/ForwardMessage.php +++ b/src/TgBotLib/Methods/ForwardMessage.php @@ -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 { diff --git a/src/TgBotLib/Methods/GetMe.php b/src/TgBotLib/Methods/GetMe.php index eaca635..e97613c 100644 --- a/src/TgBotLib/Methods/GetMe.php +++ b/src/TgBotLib/Methods/GetMe.php @@ -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 { diff --git a/src/TgBotLib/Methods/Logout.php b/src/TgBotLib/Methods/Logout.php index 6f1f50b..d7d39ca 100644 --- a/src/TgBotLib/Methods/Logout.php +++ b/src/TgBotLib/Methods/Logout.php @@ -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 { diff --git a/src/TgBotLib/Methods/SendMessage.php b/src/TgBotLib/Methods/SendMessage.php index e5d3366..dfc9a8c 100644 --- a/src/TgBotLib/Methods/SendMessage.php +++ b/src/TgBotLib/Methods/SendMessage.php @@ -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 {