diff --git a/src/Layer/Generated.php b/src/Layer/Generated.php index 1e0fd51..81568d5 100644 --- a/src/Layer/Generated.php +++ b/src/Layer/Generated.php @@ -7,7 +7,6 @@ namespace Tii\Telepath\Layer; use Tii\Telepath\InputFile; -use Tii\Telepath\Telegram; use Tii\Telepath\Telegram\BotCommand; use Tii\Telepath\Telegram\BotCommandScope; use Tii\Telepath\Telegram\ChatAdministratorRights; @@ -29,7 +28,7 @@ use Tii\Telepath\Telegram\ReplyKeyboardRemove; use Tii\Telepath\Telegram\ShippingOption; -class Generated extends Base +abstract class Generated extends Base { /** * Use this method to receive incoming updates using long polling (wiki). An Array of Update objects is returned. @@ -38,7 +37,7 @@ class Generated extends Base * @param int $limit Limits the number of updates to be retrieved. Values between 1-100 are accepted. Defaults to 100. * @param int $timeout Timeout in seconds for long polling. Defaults to 0, i.e. usual short polling. Should be positive, short polling should be used for testing purposes only. * @param string[] $allowed_updates A JSON-serialized list of the update types you want your bot to receive. For example, specify [“message”, “edited_channel_post”, “callback_query”] to only receive updates of these types. See Update for a complete list of available update types. Specify an empty list to receive all update types except chat_member (default). If not specified, the previous setting will be used.Please note that this parameter doesn't affect updates created before the call to the getUpdates, so unwanted updates may be received for a short period of time. - * @return Telegram\Update[] + * @return \Tii\Telepath\Telegram\Update[] */ public function getUpdates( ?int $offset = null, @@ -83,7 +82,7 @@ public function deleteWebhook(?bool $drop_pending_updates = null): bool /** * 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. */ - public function getWebhookInfo(): Telegram\WebhookInfo + public function getWebhookInfo(): \Tii\Telepath\Telegram\WebhookInfo { return $this->raw('getWebhookInfo', func_get_args()); } @@ -91,7 +90,7 @@ public function getWebhookInfo(): Telegram\WebhookInfo /** * 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. */ - public function getMe(): Telegram\User + public function getMe(): \Tii\Telepath\Telegram\User { return $this->raw('getMe', func_get_args()); } @@ -137,7 +136,7 @@ public function sendMessage( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendMessage', func_get_args()); } @@ -156,7 +155,7 @@ public function forwardMessage( int $message_id, ?bool $disable_notification = null, ?bool $protect_content = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('forwardMessage', func_get_args()); } @@ -187,7 +186,7 @@ public function copyMessage( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\MessageId { + ): \Tii\Telepath\Telegram\MessageId { return $this->raw('copyMessage', func_get_args()); } @@ -216,7 +215,7 @@ public function sendPhoto( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendPhoto', func_get_args()); } @@ -253,7 +252,7 @@ public function sendAudio( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendAudio', func_get_args()); } @@ -286,7 +285,7 @@ public function sendDocument( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendDocument', func_get_args()); } @@ -325,7 +324,7 @@ public function sendVideo( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendVideo', func_get_args()); } @@ -362,7 +361,7 @@ public function sendAnimation( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendAnimation', func_get_args()); } @@ -393,7 +392,7 @@ public function sendVoice( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendVoice', func_get_args()); } @@ -422,7 +421,7 @@ public function sendVideoNote( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendVideoNote', func_get_args()); } @@ -435,7 +434,7 @@ public function sendVideoNote( * @param bool $protect_content Protects the contents of the sent messages from forwarding and saving * @param int $reply_to_message_id If the messages are a reply, ID of the original message * @param bool $allow_sending_without_reply Pass True, if the message should be sent even if the specified replied-to message is not found - * @return Telegram\Message[] + * @return \Tii\Telepath\Telegram\Message[] */ public function sendMediaGroup( int|string $chat_id, @@ -477,7 +476,7 @@ public function sendLocation( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendLocation', func_get_args()); } @@ -504,7 +503,7 @@ public function editMessageLiveLocation( ?int $heading = null, ?int $proximity_alert_radius = null, ?InlineKeyboardMarkup $reply_markup = null - ): Telegram\Message|bool { + ): \Tii\Telepath\Telegram\Message|bool { return $this->raw('editMessageLiveLocation', func_get_args()); } @@ -521,7 +520,7 @@ public function stopMessageLiveLocation( ?int $message_id = null, ?string $inline_message_id = null, ?InlineKeyboardMarkup $reply_markup = null - ): Telegram\Message|bool { + ): \Tii\Telepath\Telegram\Message|bool { return $this->raw('stopMessageLiveLocation', func_get_args()); } @@ -558,7 +557,7 @@ public function sendVenue( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendVenue', func_get_args()); } @@ -587,7 +586,7 @@ public function sendContact( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendContact', func_get_args()); } @@ -632,7 +631,7 @@ public function sendPoll( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendPoll', func_get_args()); } @@ -655,7 +654,7 @@ public function sendDice( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendDice', func_get_args()); } @@ -681,7 +680,7 @@ public function getUserProfilePhotos( int $user_id, ?int $offset = null, ?int $limit = null - ): Telegram\UserProfilePhotos { + ): \Tii\Telepath\Telegram\UserProfilePhotos { return $this->raw('getUserProfilePhotos', func_get_args()); } @@ -690,7 +689,7 @@ public function getUserProfilePhotos( * * @param string $file_id File identifier to get info about */ - public function getFile(string $file_id): Telegram\File + public function getFile(string $file_id): \Tii\Telepath\Telegram\File { return $this->raw('getFile', func_get_args()); } @@ -846,7 +845,7 @@ public function createChatInviteLink( ?int $expire_date = null, ?int $member_limit = null, ?bool $creates_join_request = null - ): Telegram\ChatInviteLink { + ): \Tii\Telepath\Telegram\ChatInviteLink { return $this->raw('createChatInviteLink', func_get_args()); } @@ -867,7 +866,7 @@ public function editChatInviteLink( ?int $expire_date = null, ?int $member_limit = null, ?bool $creates_join_request = null - ): Telegram\ChatInviteLink { + ): \Tii\Telepath\Telegram\ChatInviteLink { return $this->raw('editChatInviteLink', func_get_args()); } @@ -877,8 +876,10 @@ public function editChatInviteLink( * @param int|string $chat_id Unique identifier of the target chat or username of the target channel (in the format @channelusername) * @param string $invite_link The invite link to revoke */ - public function revokeChatInviteLink(int|string $chat_id, string $invite_link): Telegram\ChatInviteLink - { + public function revokeChatInviteLink( + int|string $chat_id, + string $invite_link + ): \Tii\Telepath\Telegram\ChatInviteLink { return $this->raw('revokeChatInviteLink', func_get_args()); } @@ -995,7 +996,7 @@ public function leaveChat(int|string $chat_id): bool * * @param int|string $chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) */ - public function getChat(int|string $chat_id): Telegram\Chat + public function getChat(int|string $chat_id): \Tii\Telepath\Telegram\Chat { return $this->raw('getChat', func_get_args()); } @@ -1004,7 +1005,7 @@ public function getChat(int|string $chat_id): Telegram\Chat * Use this method to get a list of administrators in a chat. On success, returns an Array of ChatMember objects that contains information about all chat administrators except other bots. If the chat is a group or a supergroup and no administrators were appointed, only the creator will be returned. * * @param int|string $chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) - * @return Telegram\ChatMember[] + * @return \Tii\Telepath\Telegram\ChatMember[] */ public function getChatAdministrators(int|string $chat_id): array { @@ -1027,7 +1028,7 @@ public function getChatMemberCount(int|string $chat_id): int * @param int|string $chat_id Unique identifier for the target chat or username of the target supergroup or channel (in the format @channelusername) * @param int $user_id Unique identifier of the target user */ - public function getChatMember(int|string $chat_id, int $user_id): Telegram\ChatMember + public function getChatMember(int|string $chat_id, int $user_id): \Tii\Telepath\Telegram\ChatMember { return $this->raw('getChatMember', func_get_args()); } @@ -1172,7 +1173,7 @@ public function editMessageText( ?array $entities = null, ?bool $disable_web_page_preview = null, ?InlineKeyboardMarkup $reply_markup = null - ): Telegram\Message|bool { + ): \Tii\Telepath\Telegram\Message|bool { return $this->raw('editMessageText', func_get_args()); } @@ -1195,7 +1196,7 @@ public function editMessageCaption( ?string $parse_mode = null, ?array $caption_entities = null, ?InlineKeyboardMarkup $reply_markup = null - ): Telegram\Message|bool { + ): \Tii\Telepath\Telegram\Message|bool { return $this->raw('editMessageCaption', func_get_args()); } @@ -1214,7 +1215,7 @@ public function editMessageMedia( ?int $message_id = null, ?string $inline_message_id = null, ?InlineKeyboardMarkup $reply_markup = null - ): Telegram\Message|bool { + ): \Tii\Telepath\Telegram\Message|bool { return $this->raw('editMessageMedia', func_get_args()); } @@ -1231,7 +1232,7 @@ public function editMessageReplyMarkup( ?int $message_id = null, ?string $inline_message_id = null, ?InlineKeyboardMarkup $reply_markup = null - ): Telegram\Message|bool { + ): \Tii\Telepath\Telegram\Message|bool { return $this->raw('editMessageReplyMarkup', func_get_args()); } @@ -1246,7 +1247,7 @@ public function stopPoll( int|string $chat_id, int $message_id, ?InlineKeyboardMarkup $reply_markup = null - ): Telegram\Poll { + ): \Tii\Telepath\Telegram\Poll { return $this->raw('stopPoll', func_get_args()); } @@ -1280,7 +1281,7 @@ public function sendSticker( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, InlineKeyboardMarkup|ReplyKeyboardMarkup|ReplyKeyboardRemove|ForceReply|null $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendSticker', func_get_args()); } @@ -1289,7 +1290,7 @@ public function sendSticker( * * @param string $name Name of the sticker set */ - public function getStickerSet(string $name): Telegram\StickerSet + public function getStickerSet(string $name): \Tii\Telepath\Telegram\StickerSet { return $this->raw('getStickerSet', func_get_args()); } @@ -1300,7 +1301,7 @@ public function getStickerSet(string $name): Telegram\StickerSet * @param int $user_id User identifier of sticker file owner * @param InputFile $png_sticker PNG image with the sticker, must be up to 512 kilobytes in size, dimensions must not exceed 512px, and either width or height must be exactly 512px. More info on Sending Files » */ - public function uploadStickerFile(int $user_id, InputFile $png_sticker): Telegram\File + public function uploadStickerFile(int $user_id, InputFile $png_sticker): \Tii\Telepath\Telegram\File { return $this->raw('uploadStickerFile', func_get_args()); } @@ -1417,8 +1418,10 @@ public function answerInlineQuery( * @param string $web_app_query_id Unique identifier for the query to be answered * @param InlineQueryResult $result A JSON-serialized object describing the message to be sent */ - public function answerWebAppQuery(string $web_app_query_id, InlineQueryResult $result): Telegram\SentWebAppMessage - { + public function answerWebAppQuery( + string $web_app_query_id, + InlineQueryResult $result + ): \Tii\Telepath\Telegram\SentWebAppMessage { return $this->raw('answerWebAppQuery', func_get_args()); } @@ -1481,7 +1484,7 @@ public function sendInvoice( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, ?InlineKeyboardMarkup $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendInvoice', func_get_args()); } @@ -1544,7 +1547,7 @@ public function sendGame( ?int $reply_to_message_id = null, ?bool $allow_sending_without_reply = null, ?InlineKeyboardMarkup $reply_markup = null - ): Telegram\Message { + ): \Tii\Telepath\Telegram\Message { return $this->raw('sendGame', func_get_args()); } @@ -1567,7 +1570,7 @@ public function setGameScore( ?int $chat_id = null, ?int $message_id = null, ?string $inline_message_id = null - ): Telegram\Message|bool { + ): \Tii\Telepath\Telegram\Message|bool { return $this->raw('setGameScore', func_get_args()); } @@ -1578,7 +1581,7 @@ public function setGameScore( * @param int $chat_id Required if inline_message_id is not specified. Unique identifier for the target chat * @param int $message_id Required if inline_message_id is not specified. Identifier of the sent message * @param string $inline_message_id Required if chat_id and message_id are not specified. Identifier of the inline message - * @return Telegram\GameHighScore[] + * @return \Tii\Telepath\Telegram\GameHighScore[] */ public function getGameHighScores( int $user_id, diff --git a/telepathy b/telepathy index 7f7876d..84bac79 100755 Binary files a/telepathy and b/telepathy differ