From f4c48a5d6b9a93c0bf2412dbe0faea15d987ebef Mon Sep 17 00:00:00 2001 From: Mirmuxsin Khamroev Date: Sun, 10 Dec 2023 01:17:01 +0500 Subject: [PATCH] minor fix with type hints --- src/Methods/Methods.php | 108 +++++++++++++------------- src/app/Console/Commands/laragram.php | 15 ++-- 2 files changed, 62 insertions(+), 61 deletions(-) diff --git a/src/Methods/Methods.php b/src/Methods/Methods.php index 6809b27..269c7ed 100644 --- a/src/Methods/Methods.php +++ b/src/Methods/Methods.php @@ -37,7 +37,7 @@ public static function getUpdates (int $offset = null, int $limit = null, int $t * @var string|null $secret_token *(min length: 1)**(max length: 1)*

A secret token to be sent in a header “X-Telegram-Bot-Api-Secret-Token” in every webhook request, 1-256 characters. Only characters `A-Z`, `a-z`, `0-9`, `_` and `-` are allowed. The header is useful to ensure that the request comes from a webhook set by you.

* */ - public static function setWebhook (string $url, \Milly\Laragram\Types\InputFile $certificate = null, string $ip_address = null, int $max_connections = null, array $allowed_updates = null, bool $drop_pending_updates = null, string $secret_token = null, ) { + public static function setWebhook (string $url, string|\Milly\Laragram\Types\InputFile $certificate = null, string $ip_address = null, int $max_connections = null, array $allowed_updates = null, bool $drop_pending_updates = null, string $secret_token = null, ) { return static::request('setWebhook', func_get_args_associative()); } @@ -80,10 +80,10 @@ public static function close () { * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendMessage (int|string $chat_id, int $message_thread_id = null, string $text = null, string $parse_mode = null, array $entities = null, bool $disable_web_page_preview = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendMessage (int|string $chat_id, int $message_thread_id = null, string $text = null, string $parse_mode = null, array $entities = null, bool $disable_web_page_preview = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendMessage', func_get_args_associative()); } @@ -112,10 +112,10 @@ public static function forwardMessage (int|string $chat_id, int $message_thread * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function copyMessage (int|string $chat_id, int $message_thread_id = null, int|string $from_chat_id = null, int $message_id = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function copyMessage (int|string $chat_id, int $message_thread_id = null, int|string $from_chat_id = null, int $message_id = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('copyMessage', func_get_args_associative()); } @@ -131,10 +131,10 @@ public static function copyMessage (int|string $chat_id, int $message_thread_id * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendPhoto (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $photo = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $has_spoiler = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendPhoto (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $photo = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $has_spoiler = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendPhoto', func_get_args_associative()); } @@ -153,10 +153,10 @@ public static function sendPhoto (int|string $chat_id, int $message_thread_id = * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendAudio (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $audio = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, int $duration = null, string $performer = null, string $title = null, \Milly\Laragram\Types\InputFile|string $thumbnail = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendAudio (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $audio = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, int $duration = null, string $performer = null, string $title = null, \Milly\Laragram\Types\InputFile|string $thumbnail = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendAudio', func_get_args_associative()); } @@ -173,10 +173,10 @@ public static function sendAudio (int|string $chat_id, int $message_thread_id = * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendDocument (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $document = null, \Milly\Laragram\Types\InputFile|string $thumbnail = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $disable_content_type_detection = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendDocument (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $document = null, \Milly\Laragram\Types\InputFile|string $thumbnail = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $disable_content_type_detection = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendDocument', func_get_args_associative()); } @@ -197,10 +197,10 @@ public static function sendDocument (int|string $chat_id, int $message_thread_i * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendVideo (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $video = null, int $duration = null, int $width = null, int $height = null, \Milly\Laragram\Types\InputFile|string $thumbnail = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $has_spoiler = null, bool $supports_streaming = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendVideo (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $video = null, int $duration = null, int $width = null, int $height = null, \Milly\Laragram\Types\InputFile|string $thumbnail = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $has_spoiler = null, bool $supports_streaming = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendVideo', func_get_args_associative()); } @@ -220,10 +220,10 @@ public static function sendVideo (int|string $chat_id, int $message_thread_id = * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendAnimation (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $animation = null, int $duration = null, int $width = null, int $height = null, \Milly\Laragram\Types\InputFile|string $thumbnail = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $has_spoiler = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendAnimation (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $animation = null, int $duration = null, int $width = null, int $height = null, \Milly\Laragram\Types\InputFile|string $thumbnail = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $has_spoiler = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendAnimation', func_get_args_associative()); } @@ -239,10 +239,10 @@ public static function sendAnimation (int|string $chat_id, int $message_thread_ * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendVoice (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $voice = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, int $duration = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendVoice (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $voice = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, int $duration = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendVoice', func_get_args_associative()); } @@ -257,10 +257,10 @@ public static function sendVoice (int|string $chat_id, int $message_thread_id = * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendVideoNote (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $video_note = null, int $duration = null, int $length = null, \Milly\Laragram\Types\InputFile|string $thumbnail = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendVideoNote (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $video_note = null, int $duration = null, int $length = null, \Milly\Laragram\Types\InputFile|string $thumbnail = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendVideoNote', func_get_args_associative()); } @@ -291,10 +291,10 @@ public static function sendMediaGroup (int|string $chat_id, int $message_thread * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendLocation (int|string $chat_id, int $message_thread_id = null, float $latitude = null, float $longitude = null, float $horizontal_accuracy = null, int $live_period = null, int $heading = null, int $proximity_alert_radius = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendLocation (int|string $chat_id, int $message_thread_id = null, float $latitude = null, float $longitude = null, float $horizontal_accuracy = null, int $live_period = null, int $heading = null, int $proximity_alert_radius = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendLocation', func_get_args_associative()); } @@ -313,10 +313,10 @@ public static function sendLocation (int|string $chat_id, int $message_thread_i * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendVenue (int|string $chat_id, int $message_thread_id = null, float $latitude = null, float $longitude = null, string $title = null, string $address = null, string $foursquare_id = null, string $foursquare_type = null, string $google_place_id = null, string $google_place_type = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendVenue (int|string $chat_id, int $message_thread_id = null, float $latitude = null, float $longitude = null, string $title = null, string $address = null, string $foursquare_id = null, string $foursquare_type = null, string $google_place_id = null, string $google_place_type = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendVenue', func_get_args_associative()); } @@ -331,10 +331,10 @@ public static function sendVenue (int|string $chat_id, int $message_thread_id = * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendContact (int|string $chat_id, int $message_thread_id = null, string $phone_number = null, string $first_name = null, string $last_name = null, string $vcard = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendContact (int|string $chat_id, int $message_thread_id = null, string $phone_number = null, string $first_name = null, string $last_name = null, string $vcard = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendContact', func_get_args_associative()); } @@ -357,10 +357,10 @@ public static function sendContact (int|string $chat_id, int $message_thread_id * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendPoll (int|string $chat_id, int $message_thread_id = null, string $question = null, array $options = null, bool $is_anonymous = null, string $type = null, bool $allows_multiple_answers = null, int $correct_option_id = null, string $explanation = null, string $explanation_parse_mode = null, array $explanation_entities = null, int $open_period = null, int $close_date = null, bool $is_closed = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendPoll (int|string $chat_id, int $message_thread_id = null, string $question = null, array $options = null, bool $is_anonymous = null, string $type = null, bool $allows_multiple_answers = null, int $correct_option_id = null, string $explanation = null, string $explanation_parse_mode = null, array $explanation_entities = null, int $open_period = null, int $close_date = null, bool $is_closed = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendPoll', func_get_args_associative()); } @@ -372,10 +372,10 @@ public static function sendPoll (int|string $chat_id, int $message_thread_id = * @var bool|null $protect_content

Protects the contents of the sent message from forwarding

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendDice (int|string $chat_id, int $message_thread_id = null, string $emoji = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendDice (int|string $chat_id, int $message_thread_id = null, string $emoji = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendDice', func_get_args_associative()); } @@ -436,7 +436,7 @@ public static function unbanChatMember (int|string $chat_id, int $user_id, bool * @var int|null $until_date

Date when restrictions will be lifted for the user; Unix time. If user is restricted for more than 366 days or less than 30 seconds from the current time, they are considered to be restricted forever

* */ - public static function restrictChatMember (int|string $chat_id, int $user_id, \Milly\Laragram\Types\ChatPermissions $permissions, bool $use_independent_chat_permissions = null, int $until_date = null, ) { + public static function restrictChatMember (int|string $chat_id, int $user_id, string|\Milly\Laragram\Types\ChatPermissions $permissions, bool $use_independent_chat_permissions = null, int $until_date = null, ) { return static::request('restrictChatMember', func_get_args_associative()); } @@ -498,7 +498,7 @@ public static function unbanChatSenderChat (int|string $chat_id, int $sender_ch * @var bool|null $use_independent_chat_permissions

Pass *True* if chat permissions are set independently. Otherwise, the *can\send\other\messages* and *can\add\web\page\previews* permissions will imply the *can\send\messages*, *can\send\audios*, *can\send\documents*, *can\send\photos*, *can\send\videos*, *can\send\video\notes*, and *can\send\voice\notes* permissions; the *can\send\polls* permission will imply the *can\send\_messages* permission.

* */ - public static function setChatPermissions (int|string $chat_id, \Milly\Laragram\Types\ChatPermissions $permissions, bool $use_independent_chat_permissions = null, ) { + public static function setChatPermissions (int|string $chat_id, string|\Milly\Laragram\Types\ChatPermissions $permissions, bool $use_independent_chat_permissions = null, ) { return static::request('setChatPermissions', func_get_args_associative()); } @@ -567,7 +567,7 @@ public static function declineChatJoinRequest (int|string $chat_id, int $user_i * @var \Milly\Laragram\Types\InputFile $photo

New chat photo, uploaded using multipart/form-data

* */ - public static function setChatPhoto (int|string $chat_id, \Milly\Laragram\Types\InputFile $photo, ) { + public static function setChatPhoto (int|string $chat_id, string|\Milly\Laragram\Types\InputFile $photo, ) { return static::request('setChatPhoto', func_get_args_associative()); } @@ -812,7 +812,7 @@ public static function answerCallbackQuery (string $callback_query_id, string $t * @var string|null $language_code

A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands

* */ - public static function setMyCommands (array $commands, \Milly\Laragram\Types\BotCommandScope $scope = null, string $language_code = null, ) { + public static function setMyCommands (array $commands, string|\Milly\Laragram\Types\BotCommandScope $scope = null, string $language_code = null, ) { return static::request('setMyCommands', func_get_args_associative()); } @@ -821,7 +821,7 @@ public static function setMyCommands (array $commands, \Milly\Laragram\Types\Bot * @var string|null $language_code

A two-letter ISO 639-1 language code. If empty, commands will be applied to all users from the given scope, for whose language there are no dedicated commands

* */ - public static function deleteMyCommands (\Milly\Laragram\Types\BotCommandScope $scope = null, string $language_code = null, ) { + public static function deleteMyCommands (string|\Milly\Laragram\Types\BotCommandScope $scope = null, string $language_code = null, ) { return static::request('deleteMyCommands', func_get_args_associative()); } @@ -830,7 +830,7 @@ public static function deleteMyCommands (\Milly\Laragram\Types\BotCommandScope $ * @var string|null $language_code

A two-letter ISO 639-1 language code or an empty string

* */ - public static function getMyCommands (\Milly\Laragram\Types\BotCommandScope $scope = null, string $language_code = null, ) { + public static function getMyCommands (string|\Milly\Laragram\Types\BotCommandScope $scope = null, string $language_code = null, ) { return static::request('getMyCommands', func_get_args_associative()); } @@ -890,7 +890,7 @@ public static function getMyShortDescription (string $language_code = null, ) { * @var \Milly\Laragram\Types\MenuButton|null $menu_button

A JSON-serialized object for the bot's new menu button. Defaults to MenuButtonDefault

* */ - public static function setChatMenuButton (int $chat_id = null, \Milly\Laragram\Types\MenuButton $menu_button = null, ) { + public static function setChatMenuButton (int $chat_id = null, string|\Milly\Laragram\Types\MenuButton $menu_button = null, ) { return static::request('setChatMenuButton', func_get_args_associative()); } @@ -907,7 +907,7 @@ public static function getChatMenuButton (int $chat_id = null, ) { * @var bool|null $for_channels

Pass *True* to change the default administrator rights of the bot in channels. Otherwise, the default administrator rights of the bot for groups and supergroups will be changed.

* */ - public static function setMyDefaultAdministratorRights (\Milly\Laragram\Types\ChatAdministratorRights $rights = null, bool $for_channels = null, ) { + public static function setMyDefaultAdministratorRights (string|\Milly\Laragram\Types\ChatAdministratorRights $rights = null, bool $for_channels = null, ) { return static::request('setMyDefaultAdministratorRights', func_get_args_associative()); } @@ -927,7 +927,7 @@ public static function getMyDefaultAdministratorRights (bool $for_channels = nul * @var string|null $parse_mode

Mode for parsing entities in the message text. See formatting options for more details.

* @var array|null $entities

A JSON-serialized list of special entities that appear in message text, which can be specified instead of *parse\_mode*

* @var bool|null $disable_web_page_preview

Disables link previews for links in this message

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for an inline keyboard.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for an inline keyboard.

* */ public static function editMessageText (int|string $chat_id = null, int $message_id = null, string $inline_message_id = null, string $text = null, string $parse_mode = null, array $entities = null, bool $disable_web_page_preview = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup $reply_markup = null, ) { @@ -941,7 +941,7 @@ public static function editMessageText (int|string $chat_id = null, int $messag * @var string|null $caption *(min length: 0)**(max length: 0)*

New caption of the message, 0-1024 characters after entities parsing

* @var string|null $parse_mode

Mode for parsing entities in the message caption. See formatting options for more details.

* @var array|null $caption_entities

A JSON-serialized list of special entities that appear in the caption, which can be specified instead of *parse\_mode*

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for an inline keyboard.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for an inline keyboard.

* */ public static function editMessageCaption (int|string $chat_id = null, int $message_id = null, string $inline_message_id = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup $reply_markup = null, ) { @@ -953,10 +953,10 @@ public static function editMessageCaption (int|string $chat_id = null, int $mes * @var int|null $message_id

Required if *inline\message\id* is not specified. Identifier of the message to edit

* @var string|null $inline_message_id

Required if *chat\id* and *message\id* are not specified. Identifier of the inline message

* @var \Milly\Laragram\Types\InputMedia $media

A JSON-serialized object for a new media content of the message

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for a new inline keyboard.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for a new inline keyboard.

* */ - public static function editMessageMedia (int|string $chat_id = null, int $message_id = null, string $inline_message_id = null, \Milly\Laragram\Types\InputMedia $media = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup $reply_markup = null, ) { + public static function editMessageMedia (int|string $chat_id = null, int $message_id = null, string $inline_message_id = null, string|\Milly\Laragram\Types\InputMedia $media = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup $reply_markup = null, ) { return static::request('editMessageMedia', func_get_args_associative()); } @@ -969,7 +969,7 @@ public static function editMessageMedia (int|string $chat_id = null, int $messa * @var float|null $horizontal_accuracy

The radius of uncertainty for the location, measured in meters; 0-1500

* @var int|null $heading

Direction in which the user is moving, in degrees. Must be between 1 and 360 if specified.

* @var int|null $proximity_alert_radius

The maximum distance for proximity alerts about approaching another chat member, in meters. Must be between 1 and 100000 if specified.

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for a new inline keyboard.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for a new inline keyboard.

* */ public static function editMessageLiveLocation (int|string $chat_id = null, int $message_id = null, string $inline_message_id = null, float $latitude = null, float $longitude = null, float $horizontal_accuracy = null, int $heading = null, int $proximity_alert_radius = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup $reply_markup = null, ) { @@ -980,7 +980,7 @@ public static function editMessageLiveLocation (int|string $chat_id = null, int * @var int|string |null $chat_id

Required if *inline\message\id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)

* @var int|null $message_id

Required if *inline\message\id* is not specified. Identifier of the message with live location to stop

* @var string|null $inline_message_id

Required if *chat\id* and *message\id* are not specified. Identifier of the inline message

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for a new inline keyboard.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for a new inline keyboard.

* */ public static function stopMessageLiveLocation (int|string $chat_id = null, int $message_id = null, string $inline_message_id = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup $reply_markup = null, ) { @@ -991,7 +991,7 @@ public static function stopMessageLiveLocation (int|string $chat_id = null, int * @var int|string |null $chat_id

Required if *inline\message\id* is not specified. Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)

* @var int|null $message_id

Required if *inline\message\id* is not specified. Identifier of the message to edit

* @var string|null $inline_message_id

Required if *chat\id* and *message\id* are not specified. Identifier of the inline message

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for an inline keyboard.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for an inline keyboard.

* */ public static function editMessageReplyMarkup (int|string $chat_id = null, int $message_id = null, string $inline_message_id = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup $reply_markup = null, ) { @@ -1001,7 +1001,7 @@ public static function editMessageReplyMarkup (int|string $chat_id = null, int /** * @var int|string $chat_id

Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)

* @var int $message_id

Identifier of the original message with the poll

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for a new message inline keyboard.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for a new message inline keyboard.

* */ public static function stopPoll (int|string $chat_id, int $message_id, string|\Milly\Laragram\Types\InlineKeyboardMarkup $reply_markup = null, ) { @@ -1026,10 +1026,10 @@ public static function deleteMessage (int|string $chat_id, int $message_id, ) { * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string |null $reply_markup

Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user.

* */ - public static function sendSticker (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $sticker = null, string $emoji = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|\Milly\Laragram\Types\ForceReply $reply_markup = null, ) { + public static function sendSticker (int|string $chat_id, int $message_thread_id = null, \Milly\Laragram\Types\InputFile|string $sticker = null, string $emoji = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, \Milly\Laragram\Types\InlineKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardMarkup|\Milly\Laragram\Types\ReplyKeyboardRemove|string $reply_markup = null, ) { return static::request('sendSticker', func_get_args_associative()); } @@ -1055,7 +1055,7 @@ public static function getCustomEmojiStickers (array $custom_emoji_ids, ) { * @var string $sticker_format

Format of the sticker, must be one of “static”, “animated”, “video”

* */ - public static function uploadStickerFile (int $user_id, \Milly\Laragram\Types\InputFile $sticker, string $sticker_format, ) { + public static function uploadStickerFile (int $user_id, string|\Milly\Laragram\Types\InputFile $sticker, string $sticker_format, ) { return static::request('uploadStickerFile', func_get_args_associative()); } @@ -1079,7 +1079,7 @@ public static function createNewStickerSet (int $user_id, string $name, string $ * @var \Milly\Laragram\Types\InputSticker $sticker

A JSON-serialized object with information about the added sticker. If exactly the same sticker had already been added to the set, then the set isn't changed.

* */ - public static function addStickerToSet (int $user_id, string $name, \Milly\Laragram\Types\InputSticker $sticker, ) { + public static function addStickerToSet (int $user_id, string $name, string|\Milly\Laragram\Types\InputSticker $sticker, ) { return static::request('addStickerToSet', func_get_args_associative()); } @@ -1123,7 +1123,7 @@ public static function setStickerKeywords (string $sticker, array $keywords = nu * @var \Milly\Laragram\Types\MaskPosition|null $mask_position

A JSON-serialized object with the position where the mask should be placed on faces. Omit the parameter to remove the mask position.

* */ - public static function setStickerMaskPosition (string $sticker, \Milly\Laragram\Types\MaskPosition $mask_position = null, ) { + public static function setStickerMaskPosition (string $sticker, string|\Milly\Laragram\Types\MaskPosition $mask_position = null, ) { return static::request('setStickerMaskPosition', func_get_args_associative()); } @@ -1172,7 +1172,7 @@ public static function deleteStickerSet (string $name, ) { * @var \Milly\Laragram\Types\InlineQueryResultsButton|null $button

A JSON-serialized object describing a button to be shown above inline query results

* */ - public static function answerInlineQuery (string $inline_query_id, array $results, int $cache_time = null, bool $is_personal = null, string $next_offset = null, \Milly\Laragram\Types\InlineQueryResultsButton $button = null, ) { + public static function answerInlineQuery (string $inline_query_id, array $results, int $cache_time = null, bool $is_personal = null, string $next_offset = null, string|\Milly\Laragram\Types\InlineQueryResultsButton $button = null, ) { return static::request('answerInlineQuery', func_get_args_associative()); } @@ -1181,7 +1181,7 @@ public static function answerInlineQuery (string $inline_query_id, array $result * @var \Milly\Laragram\Types\InlineQueryResult $result

A JSON-serialized object describing the message to be sent

* */ - public static function answerWebAppQuery (string $web_app_query_id, \Milly\Laragram\Types\InlineQueryResult $result, ) { + public static function answerWebAppQuery (string $web_app_query_id, string|\Milly\Laragram\Types\InlineQueryResult $result, ) { return static::request('answerWebAppQuery', func_get_args_associative()); } @@ -1213,7 +1213,7 @@ public static function answerWebAppQuery (string $web_app_query_id, \Milly\Larag * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for an inline keyboard. If empty, one 'Pay `total price`' button will be shown. If not empty, the first button must be a Pay button.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for an inline keyboard. If empty, one 'Pay `total price`' button will be shown. If not empty, the first button must be a Pay button.

* */ public static function sendInvoice (int|string $chat_id, int $message_thread_id = null, string $title = null, string $description = null, string $payload = null, string $provider_token = null, string $currency = null, array $prices = null, int $max_tip_amount = null, array $suggested_tip_amounts = null, string $start_parameter = null, string $provider_data = null, string $photo_url = null, int $photo_size = null, int $photo_width = null, int $photo_height = null, bool $need_name = null, bool $need_phone_number = null, bool $need_email = null, bool $need_shipping_address = null, bool $send_phone_number_to_provider = null, bool $send_email_to_provider = null, bool $is_flexible = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup $reply_markup = null, ) { @@ -1285,7 +1285,7 @@ public static function setPassportDataErrors (int $user_id, array $errors, ) { * @var bool|null $protect_content

Protects the contents of the sent message from forwarding and saving

* @var int|null $reply_to_message_id

If the message is a reply, ID of the original message

* @var bool|null $allow_sending_without_reply

Pass *True* if the message should be sent even if the specified replied-to message is not found

- * @var string|\Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for an inline keyboard. If empty, one 'Play game\_title' button will be shown. If not empty, the first button must launch the game.

+ * @var \Milly\Laragram\Types\InlineKeyboardMarkup|null $reply_markup

A JSON-serialized object for an inline keyboard. If empty, one 'Play game\_title' button will be shown. If not empty, the first button must launch the game.

* */ public static function sendGame (int $chat_id, int $message_thread_id = null, string $game_short_name = null, bool $disable_notification = null, bool $protect_content = null, int $reply_to_message_id = null, bool $allow_sending_without_reply = null, string|\Milly\Laragram\Types\InlineKeyboardMarkup $reply_markup = null, ) { diff --git a/src/app/Console/Commands/laragram.php b/src/app/Console/Commands/laragram.php index 6bd58b9..b42e7f5 100644 --- a/src/app/Console/Commands/laragram.php +++ b/src/app/Console/Commands/laragram.php @@ -70,11 +70,12 @@ private function putMethod ($methods, $bar) { foreach ($method['arguments'] as $count_arg => $argument) { $arguments .= "@var "; - if($argument['name'] == 'reply_markup') { - $function .= "string|"; - $arguments .= "string|"; - } +// if($argument['name'] == 'reply_markup') { +// $function .= "string|"; +// $arguments .= "string|"; +// } + $has_reference = false; if ( $argument['type'] == 'any_of') { foreach ($argument['any_of'] as $key => $type) { @@ -88,15 +89,15 @@ private function putMethod ($methods, $bar) { $function .= $type['type'].'|'; } else { - $arguments .= $type['type'].' '; - $function .= $type['type'].' '; + $arguments .= $type['type']. $has_reference ? 'string ' : ' '; + $function .= $type['type']. $has_reference ? 'string ' :' '; } } $argument['type'] = null; } elseif ($argument['type']== 'reference'){ $argument['type'] = "\Milly\Laragram\Types\\".$argument['reference']; - $function .= $argument['type']; + $function .= "string|".$argument['type']; } elseif ($argument['type'] == 'integer') { $argument['type'] = 'int'; $function .= $argument['type'];