1 | <?php |
||
2 | |||
3 | namespace BPT\telegram; |
||
4 | |||
5 | use BPT\BPT; |
||
6 | use BPT\types\businessConnection; |
||
7 | use BPT\types\chatFullInfo; |
||
8 | use BPT\types\inputPollOption; |
||
9 | use BPT\types\linkPreviewOptions; |
||
10 | use BPT\types\reactionType; |
||
11 | use BPT\types\replyParameters; |
||
12 | use BPT\types\userChatBoosts; |
||
13 | use BPT\constants\{chatActions, fields, fileTypes, loggerTypes, updateTypes}; |
||
14 | use BPT\exception\bptException; |
||
15 | use BPT\logger; |
||
16 | use BPT\settings; |
||
17 | use BPT\telegram\request\{answer, curl}; |
||
18 | use BPT\tools\tools; |
||
19 | use BPT\types\botCommand; |
||
20 | use BPT\types\botCommandScope; |
||
21 | use BPT\types\botDescription; |
||
22 | use BPT\types\botName; |
||
23 | use BPT\types\botShortDescription; |
||
24 | use BPT\types\chat; |
||
25 | use BPT\types\chatAdministratorRights; |
||
26 | use BPT\types\chatInviteLink; |
||
27 | use BPT\types\chatMember; |
||
28 | use BPT\types\chatPermissions; |
||
29 | use BPT\types\file; |
||
30 | use BPT\types\forceReply; |
||
31 | use BPT\types\forumTopic; |
||
32 | use BPT\types\gameHighScore; |
||
33 | use BPT\types\inlineKeyboardMarkup; |
||
34 | use BPT\types\inlineQueryResult; |
||
35 | use BPT\types\inlineQueryResultsButton; |
||
36 | use BPT\types\inputMedia; |
||
37 | use BPT\types\inputSticker; |
||
38 | use BPT\types\labeledPrice; |
||
39 | use BPT\types\maskPosition; |
||
40 | use BPT\types\menuButton; |
||
41 | use BPT\types\message; |
||
42 | use BPT\types\messageEntity; |
||
43 | use BPT\types\messageId; |
||
44 | use BPT\types\passportElementError; |
||
45 | use BPT\types\poll; |
||
46 | use BPT\types\replyKeyboardMarkup; |
||
47 | use BPT\types\replyKeyboardRemove; |
||
48 | use BPT\types\responseError; |
||
49 | use BPT\types\sentWebAppMessage; |
||
50 | use BPT\types\shippingOption; |
||
51 | use BPT\types\sticker; |
||
52 | use BPT\types\stickerSet; |
||
53 | use BPT\types\update; |
||
54 | use BPT\types\user; |
||
55 | use BPT\types\userProfilePhotos; |
||
56 | use BPT\types\webhookInfo; |
||
57 | use CURLFile; |
||
58 | use stdClass; |
||
59 | |||
60 | /** |
||
61 | * Manage and handle telegram request |
||
62 | * |
||
63 | * @method static update[]|responseError getUpdates (int|array|null $offset = null, int|null $limit = null, int|null $timeout = null, string[]|null $allowed_updates = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects. |
||
64 | * @method static update[]|responseError getUp (int|array|null $offset = null, int|null $limit = null, int|null $timeout = null, string[]|null $allowed_updates = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects. |
||
65 | * @method static update[]|responseError updates (int|array|null $offset = null, int|null $limit = null, int|null $timeout = null, string[]|null $allowed_updates = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects. |
||
66 | * @method static update[]|responseError up (int|array|null $offset = null, int|null $limit = null, int|null $timeout = null, string[]|null $allowed_updates = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to receive incoming updates using long polling (wiki). Returns an Array of Update objects. |
||
67 | * @method static bool|responseError setWebhook (string|array|null $url = null, CURLFile|object|null $certificate = null, string|null $ip_address = null, int|null $max_connections = null, string[]|null $allowed_updates = null, bool|null $drop_pending_updates = null, string|null $secret_token = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content. |
||
68 | * @method static bool|responseError setWeb (string|array|null $url = null, CURLFile|object|null $certificate = null, string|null $ip_address = null, int|null $max_connections = null, string[]|null $allowed_updates = null, bool|null $drop_pending_updates = null, string|null $secret_token = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content. |
||
69 | * @method static bool|responseError webhook (string|array|null $url = null, CURLFile|object|null $certificate = null, string|null $ip_address = null, int|null $max_connections = null, string[]|null $allowed_updates = null, bool|null $drop_pending_updates = null, string|null $secret_token = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to specify a URL and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified URL, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts. Returns True on success.If you'd like to make sure that the webhook was set by you, you can specify secret data in the parameter secret_token. If specified, the request will contain a header “X-Telegram-Bot-Api-Secret-Token” with the secret token as content. |
||
70 | * @method static bool|responseError deleteWebhook (bool|array|null $drop_pending_updates = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success. |
||
71 | * @method static bool|responseError deleteWeb (bool|array|null $drop_pending_updates = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success. |
||
72 | * @method static bool|responseError delWeb (bool|array|null $drop_pending_updates = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to remove webhook integration if you decide to switch back to getUpdates. Returns True on success. |
||
73 | * @method static webhookInfo|responseError getWebhookInfo (string|array|null $token = null, bool|null $forgot = null, bool|null $answer = null) 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. |
||
74 | * @method static webhookInfo|responseError getWebhook (string|array|null $token = null, bool|null $forgot = null, bool|null $answer = null) 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. |
||
75 | * @method static webhookInfo|responseError getWeb (string|array|null $token = null, bool|null $forgot = null, bool|null $answer = null) 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. |
||
76 | * @method static user|responseError getMe (string|array|null $token = null, bool|null $forgot = null, bool|null $answer = null) 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. |
||
77 | * @method static user|responseError me (string|array|null $token = null, bool|null $forgot = null, bool|null $answer = null) 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. |
||
78 | * @method static bool|responseError logOut (string|array|null $token = null, bool|null $forgot = null, bool|null $answer = null) 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. |
||
79 | * @method static bool|responseError close (string|array|null $token = null, bool|null $forgot = null, bool|null $answer = null) 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. |
||
80 | * @method static message|responseError sendMessage (string|array $text, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $parse_mode = null, messageEntity[]|null $entities = null, linkPreviewOptions|object|array|null $link_preview_options = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send text messages. On success, the sent Message is returned. |
||
81 | * @method static message|responseError sendText (string|array $text, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $parse_mode = null, messageEntity[]|null $entities = null, linkPreviewOptions|object|array|null $link_preview_options = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send text messages. On success, the sent Message is returned. |
||
82 | * @method static message|responseError send (string|array $text, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $parse_mode = null, messageEntity[]|null $entities = null, linkPreviewOptions|object|array|null $link_preview_options = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send text messages. On success, the sent Message is returned. |
||
83 | * @method static message|responseError forwardMessage (int|string|array $chat_id, int|null $message_thread_id = null, int|string|null $from_chat_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, int|null $message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) 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. |
||
84 | * @method static message|responseError forward (int|string|array $chat_id, int|null $message_thread_id = null, int|string|null $from_chat_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, int|null $message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) 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. |
||
85 | * @method static messageId[]|responseError forwardMessages (int|string|array $chat_id, int[] $message_ids, int|null $message_thread_id = null, int|string|null $from_chat_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned. |
||
86 | * @method static messageId[]|responseError forwards (int|string|array $chat_id, int[] $message_ids, int|null $message_thread_id = null, int|string|null $from_chat_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to forward multiple messages of any kind. If some of the specified messages can't be found or forwarded, they are skipped. Service messages and messages with protected content can't be forwarded. Album grouping is kept for forwarded messages. On success, an array of MessageId of the sent messages is returned. |
||
87 | * @method static messageId|responseError copyMessage (int|string|array $chat_id, int|null $message_thread_id = null, int|string|null $from_chat_id = null, int|null $message_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to copy messages of any kind. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. |
||
88 | * @method static messageId|responseError copy (int|string|array $chat_id, int|null $message_thread_id = null, int|string|null $from_chat_id = null, int|null $message_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to copy messages of any kind. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessage, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success. |
||
89 | * @method static messageId[]|responseError copyMessages (int|string|array $chat_id, int[] $message_ids, int|null $message_thread_id = null, int|string|null $from_chat_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, bool|null $remove_caption = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned. |
||
90 | * @method static messageId[]|responseError copies (int|string|array $chat_id, int[] $message_ids, int|null $message_thread_id = null, int|string|null $from_chat_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, bool|null $remove_caption = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to copy messages of any kind. If some of the specified messages can't be found or copied, they are skipped. Service messages, giveaway messages, giveaway winners messages, and invoice messages can't be copied. A quiz poll can be copied only if the value of the field correct_option_id is known to the bot. The method is analogous to the method forwardMessages, but the copied messages don't have a link to the original message. Album grouping is kept for copied messages. On success, an array of MessageId of the sent messages is returned. |
||
91 | * @method static message|responseError sendPhoto (CURLFile|string|array|object $photo, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $has_spoiler = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send photos. On success, the sent Message is returned. |
||
92 | * @method static message|responseError photo (CURLFile|string|array|object $photo, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $has_spoiler = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send photos. On success, the sent Message is returned. |
||
93 | * @method static message|responseError sendAudio (CURLFile|string|array|object $audio, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, int|null $duration = null, string|null $performer = null, string|null $title = null, CURLFile|string|object|null $thumbnail = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.For sending voice messages, use the sendVoice method instead. |
||
94 | * @method static message|responseError audio (CURLFile|string|array|object $audio, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, int|null $duration = null, string|null $performer = null, string|null $title = null, CURLFile|string|object|null $thumbnail = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .MP3 or .M4A format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.For sending voice messages, use the sendVoice method instead. |
||
95 | * @method static message|responseError sendDocument (CURLFile|string|array|object $document, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $disable_content_type_detection = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. |
||
96 | * @method static message|responseError sendDoc (CURLFile|string|array|object $document, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $disable_content_type_detection = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. |
||
97 | * @method static message|responseError document (CURLFile|string|array|object $document, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $disable_content_type_detection = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. |
||
98 | * @method static message|responseError doc (CURLFile|string|array|object $document, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $disable_content_type_detection = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send general files. On success, the sent Message is returned. Bots can currently send files of any type of up to 50 MB in size, this limit may be changed in the future. |
||
99 | * @method static message|responseError sendVideo (CURLFile|string|array|object $video, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, int|null $duration = null, int|null $width = null, int|null $height = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $has_spoiler = null, bool|null $supports_streaming = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. |
||
100 | * @method static message|responseError sendMovie (CURLFile|string|array|object $video, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, int|null $duration = null, int|null $width = null, int|null $height = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $has_spoiler = null, bool|null $supports_streaming = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. |
||
101 | * @method static message|responseError video (CURLFile|string|array|object $video, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, int|null $duration = null, int|null $width = null, int|null $height = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $has_spoiler = null, bool|null $supports_streaming = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. |
||
102 | * @method static message|responseError movie (CURLFile|string|array|object $video, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, int|null $duration = null, int|null $width = null, int|null $height = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $has_spoiler = null, bool|null $supports_streaming = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send video files, Telegram clients support MPEG4 videos (other formats may be sent as Document). On success, the sent Message is returned. Bots can currently send video files of up to 50 MB in size, this limit may be changed in the future. |
||
103 | * @method static message|responseError sendAnimation (CURLFile|string|array|object $animation, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, int|null $duration = null, int|null $width = null, int|null $height = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $has_spoiler = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. |
||
104 | * @method static message|responseError sendGif (CURLFile|string|array|object $animation, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, int|null $duration = null, int|null $width = null, int|null $height = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $has_spoiler = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. |
||
105 | * @method static message|responseError animation (CURLFile|string|array|object $animation, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, int|null $duration = null, int|null $width = null, int|null $height = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $has_spoiler = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. |
||
106 | * @method static message|responseError gif (CURLFile|string|array|object $animation, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, int|null $duration = null, int|null $width = null, int|null $height = null, CURLFile|string|object|null $thumbnail = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, bool|null $has_spoiler = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send animation files (GIF or H.264/MPEG-4 AVC video without sound). On success, the sent Message is returned. Bots can currently send animation files of up to 50 MB in size, this limit may be changed in the future. |
||
107 | * @method static message|responseError sendVoice (CURLFile|string|array|object $voice, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, int|null $duration = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. |
||
108 | * @method static message|responseError voice (CURLFile|string|array|object $voice, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, int|null $duration = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send audio files, if you want Telegram clients to display the file as a playable voice message. For this to work, your audio must be in an .OGG file encoded with OPUS, or in .MP3 format, or in .M4A format (other formats may be sent as Audio or Document). On success, the sent Message is returned. Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future. |
||
109 | * @method static message|responseError sendVideoNote (CURLFile|string|array|object $video_note, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, int|null $duration = null, int|null $length = null, CURLFile|string|object|null $thumbnail = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned. |
||
110 | * @method static message|responseError videoNote (CURLFile|string|array|object $video_note, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, int|null $duration = null, int|null $length = null, CURLFile|string|object|null $thumbnail = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) As of v.4.0, Telegram clients support rounded square MPEG4 videos of up to 1 minute long. Use this method to send video messages. On success, the sent Message is returned. |
||
111 | * @method static message[]|responseError sendMediaGroup (inputMedia[]|array $media, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned. |
||
112 | * @method static message[]|responseError mediaGroup (inputMedia[]|array $media, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned. |
||
113 | * @method static message[]|responseError media (inputMedia[]|array $media, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send a group of photos, videos, documents or audios as an album. Documents and audio files can be only grouped in an album with messages of the same type. On success, an array of Messages that were sent is returned. |
||
114 | * @method static message|responseError sendLocation (float|array $latitude, float $longitude, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, float|null $horizontal_accuracy = null, int|null $live_period = null, int|null $heading = null, int|null $proximity_alert_radius = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send point on the map. On success, the sent Message is returned. |
||
115 | * @method static message|responseError sendLoc (float|array $latitude, float $longitude, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, float|null $horizontal_accuracy = null, int|null $live_period = null, int|null $heading = null, int|null $proximity_alert_radius = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send point on the map. On success, the sent Message is returned. |
||
116 | * @method static message|responseError location (float|array $latitude, float $longitude, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, float|null $horizontal_accuracy = null, int|null $live_period = null, int|null $heading = null, int|null $proximity_alert_radius = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send point on the map. On success, the sent Message is returned. |
||
117 | * @method static message|responseError loc (float|array $latitude, float $longitude, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, float|null $horizontal_accuracy = null, int|null $live_period = null, int|null $heading = null, int|null $proximity_alert_radius = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send point on the map. On success, the sent Message is returned. |
||
118 | * @method static message|responseError sendVenue (float|array $latitude, float $longitude, string $title, string $address, int|string|null $chat_id = null, int|null $message_thread_id = null, string|null $foursquare_id = null, string|null $foursquare_type = null, string|null $google_place_id = null, string|null $google_place_type = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send information about a venue. On success, the sent Message is returned. |
||
119 | * @method static message|responseError venue (float|array $latitude, float $longitude, string $title, string $address, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $foursquare_id = null, string|null $foursquare_type = null, string|null $google_place_id = null, string|null $google_place_type = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send information about a venue. On success, the sent Message is returned. |
||
120 | * @method static message|responseError sendContact (string|array $phone_number, string $first_name, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $last_name = null, string|null $vcard = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send phone contacts. On success, the sent Message is returned. |
||
121 | * @method static message|responseError contact (string|array $phone_number, string $first_name, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $last_name = null, string|null $vcard = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send phone contacts. On success, the sent Message is returned. |
||
122 | * @method static message|responseError sendPoll (string|array $question, inputPollOption[] $options, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $question_parse_mode = null, messageEntity[]|null $question_entities = null, bool|null $is_anonymous = null, string|null $type = null, bool|null $allows_multiple_answers = null, int|null $correct_option_id = null, string|null $explanation = null, string|null $explanation_parse_mode = null, messageEntity[]|null $explanation_entities = null, int|null $open_period = null, int|null $close_date = null, bool|null $is_closed = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send a native poll. On success, the sent Message is returned. |
||
123 | * @method static message|responseError poll (string|array $question, inputPollOption[] $options, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $question_parse_mode = null, messageEntity[]|null $question_entities = null, bool|null $is_anonymous = null, string|null $type = null, bool|null $allows_multiple_answers = null, int|null $correct_option_id = null, string|null $explanation = null, string|null $explanation_parse_mode = null, messageEntity[]|null $explanation_entities = null, int|null $open_period = null, int|null $close_date = null, bool|null $is_closed = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send a native poll. On success, the sent Message is returned. |
||
124 | * @method static message|responseError sendDice (int|string|array|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $emoji = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned. |
||
125 | * @method static message|responseError dice (int|string|array|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $emoji = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send an animated emoji that will display a random value. On success, the sent Message is returned. |
||
126 | * @method static bool|responseError sendChatAction (int|string|array|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $action = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive. |
||
127 | * @method static bool|responseError chatAction (int|string|array|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $action = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive. |
||
128 | * @method static bool|responseError action (int|string|array|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $action = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status). Returns True on success.We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive. |
||
129 | * @method static bool|responseError setMessageReaction (int|string|array|null $chat_id = null, int|null $message_id = null, reactionType[]|null $reaction = null, bool|null $is_big = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success. |
||
130 | * @method static bool|responseError setReaction (int|string|array|null $chat_id = null, int|null $message_id = null, reactionType[]|null $reaction = null, bool|null $is_big = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success. |
||
131 | * @method static bool|responseError reaction (int|string|array|null $chat_id = null, int|null $message_id = null, reactionType[]|null $reaction = null, bool|null $is_big = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the chosen reactions on a message. Service messages can't be reacted to. Automatically forwarded messages from a channel to its discussion group have the same available reactions as messages in the channel. Returns True on success. |
||
132 | * @method static userProfilePhotos|responseError getUserProfilePhotos (int|array|null $user_id = null, int|null $offset = null, int|null $limit = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object. |
||
133 | * @method static userProfilePhotos|responseError userPhotos (int|array|null $user_id = null, int|null $offset = null, int|null $limit = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get a list of profile pictures for a user. Returns a UserProfilePhotos object. |
||
134 | * @method static file|responseError getFile (string|array|null $file_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot/, where is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again. |
||
135 | * @method static file|responseError file (string|array|null $file_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get basic information about a file and prepare it for downloading. For the moment, bots can download files of up to 20MB in size. On success, a File object is returned. The file can then be downloaded via the link https://api.telegram.org/file/bot/, where is taken from the response. It is guaranteed that the link will be valid for at least 1 hour. When the link expires, a new one can be requested by calling getFile again. |
||
136 | * @method static bool|responseError banChatMember (int|string|array|null $chat_id = null, int|null $user_id = null, int|null $until_date = null, bool|null $revoke_messages = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. |
||
137 | * @method static bool|responseError ban (int|string|array|null $chat_id = null, int|null $user_id = null, int|null $until_date = null, bool|null $revoke_messages = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to ban a user in a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the chat on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. |
||
138 | * @method static bool|responseError unbanChatMember (int|string|array|null $chat_id = null, int|null $user_id = null, bool|null $only_if_banned = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success. |
||
139 | * @method static bool|responseError kick (int|string|array|null $chat_id = null, int|null $user_id = null, bool|null $only_if_banned = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success. |
||
140 | * @method static bool|responseError unban (int|string|array|null $chat_id = null, int|null $user_id = null, bool|null $only_if_banned = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to unban a previously banned user in a supergroup or channel. The user will not return to the group or channel automatically, but will be able to join via link, etc. The bot must be an administrator for this to work. By default, this method guarantees that after the call the user is not a member of the chat, but will be able to join it. So if the user is a member of the chat they will also be removed from the chat. If you don't want this, use the parameter only_if_banned. Returns True on success. |
||
141 | * @method static bool|responseError restrictChatMember (chatPermissions|array|object $permissions, int|string|null $chat_id = null, int|null $user_id = null, bool|null $use_independent_chat_permissions = null, int|null $until_date = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success. |
||
142 | * @method static bool|responseError restrict (chatPermissions|array|object $permissions, int|string|null $chat_id = null, int|null $user_id = null, bool|null $use_independent_chat_permissions = null, int|null $until_date = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate administrator rights. Pass True for all permissions to lift restrictions from a user. Returns True on success. |
||
143 | * @method static bool|responseError promoteChatMember (int|string|array|null $chat_id = null, int|null $user_id = null, bool|null $is_anonymous = null, bool|null $can_manage_chat = null, bool|null $can_delete_messages = null, bool|null $can_manage_video_chats = null, bool|null $can_restrict_members = null, bool|null $can_promote_members = null, bool|null $can_change_info = null, bool|null $can_invite_users = null, bool|null $can_post_stories = null, bool|null $can_edit_stories = null, bool|null $can_delete_stories = null, bool|null $can_post_messages = null, bool|null $can_edit_messages = null, bool|null $can_pin_messages = null, bool|null $can_manage_topics = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success. |
||
144 | * @method static bool|responseError promote (int|string|array|null $chat_id = null, int|null $user_id = null, bool|null $is_anonymous = null, bool|null $can_manage_chat = null, bool|null $can_delete_messages = null, bool|null $can_manage_video_chats = null, bool|null $can_restrict_members = null, bool|null $can_promote_members = null, bool|null $can_change_info = null, bool|null $can_invite_users = null, bool|null $can_post_stories = null, bool|null $can_edit_stories = null, bool|null $can_delete_stories = null, bool|null $can_post_messages = null, bool|null $can_edit_messages = null, bool|null $can_pin_messages = null, bool|null $can_manage_topics = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Pass False for all boolean parameters to demote a user. Returns True on success. |
||
145 | * @method static bool|responseError setChatAdministratorCustomTitle (string|array $custom_title, int|string|null $chat_id = null, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. |
||
146 | * @method static bool|responseError setCustomTitle (string|array $custom_title, int|string|null $chat_id = null, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success. |
||
147 | * @method static bool|responseError banChatSenderChat (int|array $sender_chat_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success. |
||
148 | * @method static bool|responseError banSender (int|array $sender_chat_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success. |
||
149 | * @method static bool|responseError unbanChatSenderChat (int|array $sender_chat_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success. |
||
150 | * @method static bool|responseError unbanSender (int|array $sender_chat_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success. |
||
151 | * @method static bool|responseError setChatPermissions (chatPermissions|array|object $permissions, int|string|null $chat_id = null, bool|null $use_independent_chat_permissions = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success. |
||
152 | * @method static bool|responseError permissions (chatPermissions|array|object $permissions, int|string|null $chat_id = null, bool|null $use_independent_chat_permissions = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members administrator rights. Returns True on success. |
||
153 | * @method static string|responseError exportChatInviteLink (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to generate a new primary invite link for a chat; |
||
154 | any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success. |
||
155 | * @method static string|responseError link (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to generate a new primary invite link for a chat; |
||
156 | any previously generated primary link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the new invite link as String on success. |
||
157 | * @method static chatInviteLink|responseError createChatInviteLink (int|string|array|null $chat_id = null, string|null $name = null, int|null $expire_date = null, int|null $member_limit = null, bool|null $creates_join_request = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object. |
||
158 | * @method static chatInviteLink|responseError crLink (int|string|array|null $chat_id = null, string|null $name = null, int|null $expire_date = null, int|null $member_limit = null, bool|null $creates_join_request = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object. |
||
159 | * @method static chatInviteLink|responseError editChatInviteLink (string|array $invite_link, int|string|null $chat_id = null, string|null $name = null, int|null $expire_date = null, int|null $member_limit = null, bool|null $creates_join_request = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object. |
||
160 | * @method static chatInviteLink|responseError edLink (string|array $invite_link, int|string|null $chat_id = null, string|null $name = null, int|null $expire_date = null, int|null $member_limit = null, bool|null $creates_join_request = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit a non-primary invite link created by the bot. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the edited invite link as a ChatInviteLink object. |
||
161 | * @method static chatInviteLink|responseError revokeChatInviteLink (string|array $invite_link, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object. |
||
162 | * @method static chatInviteLink|responseError reLink (string|array $invite_link, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to revoke an invite link created by the bot. If the primary link is revoked, a new link is automatically generated. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns the revoked invite link as ChatInviteLink object. |
||
163 | * @method static bool|responseError approveChatJoinRequest (int|string|array|null $chat_id = null, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success. |
||
164 | * @method static bool|responseError acceptJoin (int|string|array|null $chat_id = null, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to approve a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success. |
||
165 | * @method static bool|responseError declineChatJoinRequest (int|string|array|null $chat_id = null, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success. |
||
166 | * @method static bool|responseError denyJoin (int|string|array|null $chat_id = null, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to decline a chat join request. The bot must be an administrator in the chat for this to work and must have the can_invite_users administrator right. Returns True on success. |
||
167 | * @method static bool|responseError setChatPhoto (CURLFile|array|object $photo, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set a new profile photo for the chat. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. |
||
168 | * @method static bool|responseError deleteChatPhoto (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete a chat photo. Photos can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. |
||
169 | * @method static bool|responseError setChatTitle (string|array $title, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. |
||
170 | * @method static bool|responseError title (string|array $title, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the title of a chat. Titles can't be changed for private chats. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. |
||
171 | * @method static bool|responseError setChatDescription (int|string|array|null $chat_id = null, string|null $description = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. |
||
172 | * @method static bool|responseError description (int|string|array|null $chat_id = null, string|null $description = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the description of a group, a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Returns True on success. |
||
173 | * @method static bool|responseError pinChatMessage (int|string|array|null $chat_id = null, int|null $message_id = null, bool|null $disable_notification = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success. |
||
174 | * @method static bool|responseError pin (int|string|array|null $chat_id = null, int|null $message_id = null, bool|null $disable_notification = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to add a message to the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success. |
||
175 | * @method static bool|responseError unpinChatMessage (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success. |
||
176 | * @method static bool|responseError unpin (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to remove a message from the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success. |
||
177 | * @method static bool|responseError unpinAllChatMessages (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success. |
||
178 | * @method static bool|responseError unpinAll (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to clear the list of pinned messages in a chat. If the chat is not a private chat, the bot must be an administrator in the chat for this to work and must have the 'can_pin_messages' administrator right in a supergroup or 'can_edit_messages' administrator right in a channel. Returns True on success. |
||
179 | * @method static bool|responseError leaveChat (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method for your bot to leave a group, supergroup or channel. Returns True on success. |
||
180 | * @method static bool|responseError leave (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method for your bot to leave a group, supergroup or channel. Returns True on success. |
||
181 | * @method static chatFullInfo|responseError getChat (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success. |
||
182 | * @method static chatFullInfo|responseError chat (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get up-to-date information about the chat. Returns a ChatFullInfo object on success. |
||
183 | * @method static chatMember[]|responseError getChatAdministrators (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects. |
||
184 | * @method static chatMember[]|responseError admins (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get a list of administrators in a chat, which aren't bots. Returns an Array of ChatMember objects. |
||
185 | * @method static int|responseError getChatMemberCount (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the number of members in a chat. Returns Int on success. |
||
186 | * @method static int|responseError getChatMembersCount (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the number of members in a chat. Returns Int on success. |
||
187 | * @method static int|responseError membersCount (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the number of members in a chat. Returns Int on success. |
||
188 | * @method static chatMember|responseError getChatMember (int|string|array|null $chat_id = null, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success. |
||
189 | * @method static chatMember|responseError member (int|string|array|null $chat_id = null, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get information about a member of a chat. The method is only guaranteed to work for other users if the bot is an administrator in the chat. Returns a ChatMember object on success. |
||
190 | * @method static bool|responseError setChatStickerSet (string|array $sticker_set_name, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success. |
||
191 | * @method static bool|responseError setSticker (string|array $sticker_set_name, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set a new group sticker set for a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success. |
||
192 | * @method static bool|responseError deleteChatStickerSet (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success. |
||
193 | * @method static bool|responseError delSticker (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate administrator rights. Use the field can_set_sticker_set optionally returned in getChat requests to check if the bot can use this method. Returns True on success. |
||
194 | * @method static sticker[]|responseError getForumTopicIconStickers (string|array|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects. |
||
195 | * @method static sticker[]|responseError getTopicStickers (string|array|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get custom emoji stickers, which can be used as a forum topic icon by any user. Requires no parameters. Returns an Array of Sticker objects. |
||
196 | * @method static forumTopic|responseError createForumTopic (string|array $name, int|string|null $chat_id = null, int|null $icon_color = null, string|null $icon_custom_emoji_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object. |
||
197 | * @method static forumTopic|responseError createTopic (string|array $name, int|string|null $chat_id = null, int|null $icon_color = null, string|null $icon_custom_emoji_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to create a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns information about the created topic as a ForumTopic object. |
||
198 | * @method static bool|responseError editForumTopic (int|array $message_thread_id, int|string|null $chat_id = null, string|null $name = null, string|null $icon_custom_emoji_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. |
||
199 | * @method static bool|responseError editTopic (int|array $message_thread_id, int|string|null $chat_id = null, string|null $name = null, string|null $icon_custom_emoji_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit name and icon of a topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. |
||
200 | * @method static bool|responseError closeForumTopic (int|array $message_thread_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. |
||
201 | * @method static bool|responseError closeTopic (int|array $message_thread_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to close an open topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. |
||
202 | * @method static bool|responseError reopenForumTopic (int|array $message_thread_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. |
||
203 | * @method static bool|responseError reopenTopic (int|array $message_thread_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to reopen a closed topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights, unless it is the creator of the topic. Returns True on success. |
||
204 | * @method static bool|responseError deleteForumTopic (int|array $message_thread_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success. |
||
205 | * @method static bool|responseError deleteTopic (int|array $message_thread_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete a forum topic along with all its messages in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_delete_messages administrator rights. Returns True on success. |
||
206 | * @method static bool|responseError unpinAllForumTopicMessages (int|array $message_thread_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success. |
||
207 | * @method static bool|responseError unpinAllTopicMessages (int|array $message_thread_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success. |
||
208 | * @method static bool|responseError unpinTopicMessages (int|array $message_thread_id, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to clear the list of pinned messages in a forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success. |
||
209 | * @method static bool|responseError editGeneralForumTopic (string|array $name, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success. |
||
210 | * @method static bool|responseError editGeneralTopic (string|array $name, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit the name of the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have can_manage_topics administrator rights. Returns True on success. |
||
211 | * @method static bool|responseError closeGeneralForumTopic (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success. |
||
212 | * @method static bool|responseError closeGeneralTopic (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to close an open 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success. |
||
213 | * @method static bool|responseError reopenGeneralForumTopic (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success. |
||
214 | * @method static bool|responseError reopenGeneralTopic (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to reopen a closed 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically unhidden if it was hidden. Returns True on success. |
||
215 | * @method static bool|responseError hideGeneralForumTopic (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success. |
||
216 | * @method static bool|responseError hideGeneralTopic (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to hide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. The topic will be automatically closed if it was open. Returns True on success. |
||
217 | * @method static bool|responseError unhideGeneralForumTopic (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success. |
||
218 | * @method static bool|responseError unhideGeneralTopic (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to unhide the 'General' topic in a forum supergroup chat. The bot must be an administrator in the chat for this to work and must have the can_manage_topics administrator rights. Returns True on success. |
||
219 | * @method static bool|responseError unpinAllGeneralForumTopicMessages (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success. |
||
220 | * @method static bool|responseError unpinAllGeneralTopicMessages (int|string|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to clear the list of pinned messages in a General forum topic. The bot must be an administrator in the chat for this to work and must have the can_pin_messages administrator right in the supergroup. Returns True on success. |
||
221 | * @method static bool|responseError answerCallbackQuery (string|array|null $callback_query_id = null, string|null $text = null, bool|null $show_alert = null, string|null $url = null, int|null $cache_time = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned. |
||
222 | * @method static bool|responseError answer (string|array|null $callback_query_id = null, string|null $text = null, bool|null $show_alert = null, string|null $url = null, int|null $cache_time = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned. |
||
223 | * @method static userChatBoosts|responseError getUserChatBoosts (int|string|array|null $chat_id = null, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object. |
||
224 | * @method static userChatBoosts|responseError chatBoosts (int|string|array|null $chat_id = null, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the list of boosts added to a chat by a user. Requires administrator rights in the chat. Returns a UserChatBoosts object. |
||
225 | * @method static businessConnection|responseError getBusinessConnection (string|array $business_connection_id, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success. |
||
226 | * @method static businessConnection|responseError getBusiness (string|array $business_connection_id, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get information about the connection of the bot with a business account. Returns a BusinessConnection object on success. |
||
227 | * @method static bool|responseError setMyCommands (botCommand[]|array $commands, botCommandScope|object|array|null $scope = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success. |
||
228 | * @method static bool|responseError setCommands (botCommand[]|array $commands, botCommandScope|object|array|null $scope = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the list of the bot's commands. See this manual for more details about bot commands. Returns True on success. |
||
229 | * @method static bool|responseError deleteMyCommands (botCommandScope|array|object|null $scope = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success. |
||
230 | * @method static bool|responseError deleteCommands (botCommandScope|array|object|null $scope = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete the list of the bot's commands for the given scope and user language. After deletion, higher level commands will be shown to affected users. Returns True on success. |
||
231 | * @method static botCommand[]|responseError getMyCommands (botCommandScope|array|object|null $scope = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned. |
||
232 | * @method static botCommand[]|responseError getCommands (botCommandScope|array|object|null $scope = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current list of the bot's commands for the given scope and user language. Returns an Array of BotCommand objects. If commands aren't set, an empty list is returned. |
||
233 | * @method static bool|responseError setMyName (string|array|null $name = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the bot's name. Returns True on success. |
||
234 | * @method static bool|responseError setName (string|array|null $name = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the bot's name. Returns True on success. |
||
235 | * @method static botName|responseError getMyName (string|array|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current bot name for the given user language. Returns BotName on success. |
||
236 | * @method static botName|responseError getName (string|array|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current bot name for the given user language. Returns BotName on success. |
||
237 | * @method static bool|responseError setMyDescription (string|array|null $description = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success. |
||
238 | * @method static bool|responseError setDescription (string|array|null $description = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the bot's description, which is shown in the chat with the bot if the chat is empty. Returns True on success. |
||
239 | * @method static botDescription|responseError getMyDescription (string|array|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current bot description for the given user language. Returns BotDescription on success. |
||
240 | * @method static botDescription|responseError getDescription (string|array|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current bot description for the given user language. Returns BotDescription on success. |
||
241 | * @method static bool|responseError setMyShortDescription (string|array|null $short_description = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success. |
||
242 | * @method static bool|responseError setShortDescription (string|array|null $short_description = null, string|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the bot's short description, which is shown on the bot's profile page and is sent together with the link when users share the bot. Returns True on success. |
||
243 | * @method static botShortDescription|responseError getMyShortDescription (string|array|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success. |
||
244 | * @method static botShortDescription|responseError getShortDescription (string|array|null $language_code = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current bot short description for the given user language. Returns BotShortDescription on success. |
||
245 | * @method static bool|responseError setChatMenuButton (int|array|null $chat_id = null, menuButton|object|array|null $menu_button = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success. |
||
246 | * @method static bool|responseError setMenuButton (int|array|null $chat_id = null, menuButton|object|array|null $menu_button = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success. |
||
247 | * @method static bool|responseError setMenu (int|array|null $chat_id = null, menuButton|object|array|null $menu_button = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success. |
||
248 | * @method static bool|responseError setButton (int|array|null $chat_id = null, menuButton|object|array|null $menu_button = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the bot's menu button in a private chat, or the default menu button. Returns True on success. |
||
249 | * @method static menuButton|responseError getChatMenuButton (int|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success. |
||
250 | * @method static menuButton|responseError getMenuButton (int|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success. |
||
251 | * @method static menuButton|responseError getMenu (int|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success. |
||
252 | * @method static menuButton|responseError getButton (int|array|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current value of the bot's menu button in a private chat, or the default menu button. Returns MenuButton on success. |
||
253 | * @method static bool|responseError setMyDefaultAdministratorRights (chatAdministratorRights|array|object|null $rights = null, bool|null $for_channels = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success. |
||
254 | * @method static bool|responseError setMyDefaultAdminRights (chatAdministratorRights|array|object|null $rights = null, bool|null $for_channels = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success. |
||
255 | * @method static bool|responseError setMyDefaultRights (chatAdministratorRights|array|object|null $rights = null, bool|null $for_channels = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success. |
||
256 | * @method static bool|responseError setDefaultRights (chatAdministratorRights|array|object|null $rights = null, bool|null $for_channels = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the default administrator rights requested by the bot when it's added as an administrator to groups or channels. These rights will be suggested to users, but they are free to modify the list before adding the bot. Returns True on success. |
||
257 | * @method static chatAdministratorRights|responseError getMyDefaultAdministratorRights (bool|array|null $for_channels = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success. |
||
258 | * @method static chatAdministratorRights|responseError getMyDefaultAdminRights (bool|array|null $for_channels = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success. |
||
259 | * @method static chatAdministratorRights|responseError getMyDefaultRights (bool|array|null $for_channels = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success. |
||
260 | * @method static chatAdministratorRights|responseError getDefaultRights (bool|array|null $for_channels = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get the current default administrator rights of the bot. Returns ChatAdministratorRights on success. |
||
261 | * @method static message|bool|responseError editMessageText (string|array $text, int|string|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $parse_mode = null, messageEntity[]|null $entities = null, linkPreviewOptions|object|array|null $link_preview_options = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
262 | * @method static message|bool|responseError editText (string|array $text, int|string|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $parse_mode = null, messageEntity[]|null $entities = null, linkPreviewOptions|object|array|null $link_preview_options = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
263 | * @method static message|bool|responseError editMessageCaption (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
264 | * @method static message|bool|responseError editCap (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
265 | * @method static message|bool|responseError editCaption (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $caption = null, string|null $parse_mode = null, messageEntity[]|null $caption_entities = null, bool|null $show_caption_above_media = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit captions of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
266 | * @method static message|bool|responseError editMessageMedia (inputMedia|array|object $media, int|string|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
267 | * @method static message|bool|responseError editMedia (inputMedia|array|object $media, int|string|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit animation, audio, document, photo, or video messages. If a message is part of a message album, then it can be edited only to an audio for audio albums, only to a document for document albums and to a photo or a video otherwise. When an inline message is edited, a new file can't be uploaded; use a previously uploaded file via its file_id or specify a URL. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
268 | * @method static message|bool|responseError editMessageLiveLocation (float|array $latitude, float $longitude, int|string|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, int|null $live_period = null, float|null $horizontal_accuracy = null, int|null $heading = null, int|null $proximity_alert_radius = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
269 | * @method static message|bool|responseError editLiveLoc (float|array $latitude, float $longitude, int|string|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, int|null $live_period = null, float|null $horizontal_accuracy = null, int|null $heading = null, int|null $proximity_alert_radius = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit live location messages. A location can be edited until its live_period expires or editing is explicitly disabled by a call to stopMessageLiveLocation. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
270 | * @method static message|bool|responseError stopMessageLiveLocation (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
271 | * @method static message|bool|responseError stopLiveLoc (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to stop updating a live location message before live_period expires. On success, if the message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
272 | * @method static message|bool|responseError editMessageReplyMarkup (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
273 | * @method static message|bool|responseError editReply (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
274 | * @method static message|bool|responseError editKeyboard (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to edit only the reply markup of messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned. |
||
275 | * @method static poll|responseError stopPoll (int|string|array|null $chat_id = null, int|null $message_id = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to stop a poll which was sent by the bot. On success, the stopped Poll is returned. |
||
276 | * @method static bool|responseError deleteMessage (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago.- Service messages about a supergroup, channel, or forum topic creation can't be deleted.- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.- Bots can delete outgoing messages in private chats, groups, and supergroups.- Bots can delete incoming messages in private chats.- Bots granted can_post_messages permissions can delete outgoing messages in channels.- If the bot is an administrator of a group, it can delete any message there.- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.Returns True on success. |
||
277 | * @method static bool|responseError del (int|string|array|null $chat_id = null, int|null $message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete a message, including service messages, with the following limitations:- A message can only be deleted if it was sent less than 48 hours ago.- Service messages about a supergroup, channel, or forum topic creation can't be deleted.- A dice message in a private chat can only be deleted if it was sent more than 24 hours ago.- Bots can delete outgoing messages in private chats, groups, and supergroups.- Bots can delete incoming messages in private chats.- Bots granted can_post_messages permissions can delete outgoing messages in channels.- If the bot is an administrator of a group, it can delete any message there.- If the bot has can_delete_messages permission in a supergroup or a channel, it can delete any message there.Returns True on success. |
||
278 | * @method static bool|responseError deleteMessages (int[]|array $message_ids, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success. |
||
279 | * @method static bool|responseError dels (int[]|array $message_ids, int|string|null $chat_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete multiple messages simultaneously. If some of the specified messages can't be found, they are skipped. Returns True on success. |
||
280 | * @method static message|responseError sendSticker (CURLFile|string|array|object $sticker, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $emoji = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send stable .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned. |
||
281 | * @method static message|responseError sticker (CURLFile|string|array|object $sticker, int|string|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, string|null $emoji = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send stable .WEBP, animated .TGS, or video .WEBM stickers. On success, the sent Message is returned. |
||
282 | * @method static stickerSet|responseError getStickerSet (string|array $name, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get a sticker set. On success, a StickerSet object is returned. |
||
283 | * @method static sticker[]|responseError getCustomEmojiStickers (string[]|array $custom_emoji_ids, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects. |
||
284 | * @method static file|responseError uploadStickerFile (CURLFile|array|object $sticker, string $sticker_format, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success. |
||
285 | * @method static file|responseError uploadSticker (CURLFile|array|object $sticker, string $sticker_format, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to upload a file with a sticker for later use in the createNewStickerSet, addStickerToSet, or replaceStickerInSet methods (the file can be used multiple times). Returns the uploaded File on success. |
||
286 | * @method static bool|responseError createNewStickerSet (string|array $name, string $title, inputSticker[] $stickers, int|null $user_id = null, string|null $sticker_type = null, bool|null $needs_repainting = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success. |
||
287 | * @method static bool|responseError createSticker (string|array $name, string $title, inputSticker[] $stickers, int|null $user_id = null, string|null $sticker_type = null, bool|null $needs_repainting = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to create a new sticker set owned by a user. The bot will be able to edit the sticker set thus created. Returns True on success. |
||
288 | * @method static bool|responseError addStickerToSet (string|array $name, inputSticker|object|array $sticker, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns True on success. |
||
289 | * @method static bool|responseError addSticker (string|array $name, inputSticker|object|array $sticker, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to add a new sticker to a set created by the bot. Emoji sticker sets can have up to 200 stickers. Other sticker sets can have up to 120 stickers. Returns True on success. |
||
290 | * @method static bool|responseError setStickerPositionInSet (string|array $sticker, int $position, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success. |
||
291 | * @method static bool|responseError setStickerPosition (string|array $sticker, int $position, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success. |
||
292 | * @method static bool|responseError setStickerPos (string|array $sticker, int $position, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to move a sticker in a set created by the bot to a specific position. Returns True on success. |
||
293 | * @method static bool|responseError deleteStickerFromSet (string|array $sticker, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete a sticker from a set created by the bot. Returns True on success. |
||
294 | * @method static bool|responseError deleteSticker (string|array $sticker, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete a sticker from a set created by the bot. Returns True on success. |
||
295 | * @method static bool|responseError replaceStickerInSet (string|array $name, string $old_sticker, inputSticker|object|array $sticker, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success. |
||
296 | * @method static bool|responseError replaceSticker (string|array $name, string $old_sticker, inputSticker|object|array $sticker, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to replace an existing sticker in a sticker set with a new one. The method is equivalent to calling deleteStickerFromSet, then addStickerToSet, then setStickerPositionInSet. Returns True on success. |
||
297 | * @method static bool|responseError setStickerEmojiList (string|array $sticker, string[] $emoji_list, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the list of emoji assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success. |
||
298 | * @method static bool|responseError setStickerKeywords (string|array $sticker, string[]|null $keywords = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change search keywords assigned to a regular or custom emoji sticker. The sticker must belong to a sticker set created by the bot. Returns True on success. |
||
299 | * @method static bool|responseError setStickerMaskPosition (string|array $sticker, maskPosition|object|array|null $mask_position = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to change the mask position of a mask sticker. The sticker must belong to a sticker set that was created by the bot. Returns True on success. |
||
300 | * @method static bool|responseError setStickerSetTitle (string|array $name, string $title, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set the title of a created sticker set. Returns True on success. |
||
301 | * @method static bool|responseError setStickerSetThumb (string|array $name, string $format, int|null $user_id = null, string|null $business_connection_id = null, CURLFile|string|object|null $thumbnail = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must be same with the format of the stickers in the set. Returns True on success. |
||
302 | * @method static bool|responseError setStickerThumb (string|array $name, string $format, int|null $user_id = null, string|null $business_connection_id = null, CURLFile|string|object|null $thumbnail = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set the thumbnail of a regular or mask sticker set. The format of the thumbnail file must be same with the format of the stickers in the set. Returns True on success. |
||
303 | * @method static bool|responseError setCustomEmojiStickerSetThumbnail (string|array $name, string|null $custom_emoji_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set the thumbnail of a custom emoji sticker set. Returns True on success. |
||
304 | * @method static bool|responseError deleteStickerSet (string|array $name, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to delete a sticker set that was created by the bot. Returns True on success. |
||
305 | * @method static bool|responseError answerInlineQuery (inlineQueryResult[]|array $results, string|null $inline_query_id = null, int|null $cache_time = null, bool|null $is_personal = null, string|null $next_offset = null, inlineQueryResultsButton|object|array|null $button = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to send answers to an inline query. On success, True is returned.No more than 50 results per query are allowed. |
||
306 | * @method static bool|responseError answerInline (inlineQueryResult[]|array $results, string|null $inline_query_id = null, int|null $cache_time = null, bool|null $is_personal = null, string|null $next_offset = null, inlineQueryResultsButton|object|array|null $button = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to send answers to an inline query. On success, True is returned.No more than 50 results per query are allowed. |
||
307 | * @method static sentWebAppMessage|responseError answerWebAppQuery (string|array $web_app_query_id, inlineQueryResult|object|array $result, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned. |
||
308 | * @method static sentWebAppMessage|responseError answerWebApp (string|array $web_app_query_id, inlineQueryResult|object|array $result, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned. |
||
309 | * @method static sentWebAppMessage|responseError answerWeb (string|array $web_app_query_id, inlineQueryResult|object|array $result, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set the result of an interaction with a Web App and send a corresponding message on behalf of the user to the chat from which the query originated. On success, a SentWebAppMessage object is returned. |
||
310 | * @method static message|responseError sendInvoice (string|array $title, string $description, string $payload, string $currency, labeledPrice[] $prices, int|string|null $chat_id = null, int|null $message_thread_id = null, string|null $provider_token = null, int|null $max_tip_amount = null, int[]|null $suggested_tip_amounts = null, string|null $start_parameter = null, string|null $provider_data = null, string|null $photo_url = null, int|null $photo_size = null, int|null $photo_width = null, int|null $photo_height = null, bool|null $need_name = null, bool|null $need_phone_number = null, bool|null $need_email = null, bool|null $need_shipping_address = null, bool|null $send_phone_number_to_provider = null, bool|null $send_email_to_provider = null, bool|null $is_flexible = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send invoices. On success, the sent Message is returned. |
||
311 | * @method static message|responseError invoice (string|array $title, string $description, string $payload, string $currency, labeledPrice[] $prices, int|string|null $chat_id = null, int|null $message_thread_id = null, string|null $provider_token = null, int|null $max_tip_amount = null, int[]|null $suggested_tip_amounts = null, string|null $start_parameter = null, string|null $provider_data = null, string|null $photo_url = null, int|null $photo_size = null, int|null $photo_width = null, int|null $photo_height = null, bool|null $need_name = null, bool|null $need_phone_number = null, bool|null $need_email = null, bool|null $need_shipping_address = null, bool|null $send_phone_number_to_provider = null, bool|null $send_email_to_provider = null, bool|null $is_flexible = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send invoices. On success, the sent Message is returned. |
||
312 | * @method static string|responseError createInvoiceLink (string|array $title, string $description, string $payload, string $currency, labeledPrice[] $prices, string|null $provider_token = null, int|null $max_tip_amount = null, int[]|null $suggested_tip_amounts = null, string|null $provider_data = null, string|null $photo_url = null, int|null $photo_size = null, int|null $photo_width = null, int|null $photo_height = null, bool|null $need_name = null, bool|null $need_phone_number = null, bool|null $need_email = null, bool|null $need_shipping_address = null, bool|null $send_phone_number_to_provider = null, bool|null $send_email_to_provider = null, bool|null $is_flexible = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to create a link for an invoice. Returns the created invoice link as String on success. |
||
313 | * @method static string|responseError createInvoice (string|array $title, string $description, string $payload, string $currency, labeledPrice[] $prices, string|null $provider_token = null, int|null $max_tip_amount = null, int[]|null $suggested_tip_amounts = null, string|null $provider_data = null, string|null $photo_url = null, int|null $photo_size = null, int|null $photo_width = null, int|null $photo_height = null, bool|null $need_name = null, bool|null $need_phone_number = null, bool|null $need_email = null, bool|null $need_shipping_address = null, bool|null $send_phone_number_to_provider = null, bool|null $send_email_to_provider = null, bool|null $is_flexible = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to create a link for an invoice. Returns the created invoice link as String on success. |
||
314 | * @method static bool|responseError answerShippingQuery (bool|array $ok, string|null $shipping_query_id = null, shippingOption[]|null $shipping_options = null, string|null $error_message = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned. |
||
315 | * @method static bool|responseError answerShipping (bool|array $ok, string|null $shipping_query_id = null, shippingOption[]|null $shipping_options = null, string|null $error_message = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) If you sent an invoice requesting a shipping address and the parameter is_flexible was specified, the Bot API will send an Update with a shipping_query field to the bot. Use this method to reply to shipping queries. On success, True is returned. |
||
316 | * @method static bool|responseError answerPreCheckoutQuery (bool|array $ok, string|null $pre_checkout_query_id = null, string|null $error_message = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. |
||
317 | * @method static bool|responseError answerPreCheckout (bool|array $ok, string|null $pre_checkout_query_id = null, string|null $error_message = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. |
||
318 | * @method static bool|responseError answerPreCheck (bool|array $ok, string|null $pre_checkout_query_id = null, string|null $error_message = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Once the user has confirmed their payment and shipping details, the Bot API sends the final confirmation in the form of an Update with the field pre_checkout_query. Use this method to respond to such pre-checkout queries. On success, True is returned. Note: The Bot API must receive an answer within 10 seconds after the pre-checkout query was sent. |
||
319 | * @method static bool|responseError refundStarPayment (string|array $telegram_payment_charge_id, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Refunds a successful payment in Telegram Stars. Returns True on success. |
||
320 | * @method static bool|responseError refundPayment (string|array $telegram_payment_charge_id, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Refunds a successful payment in Telegram Stars. Returns True on success. |
||
321 | * @method static bool|responseError refundStar (string|array $telegram_payment_charge_id, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Refunds a successful payment in Telegram Stars. Returns True on success. |
||
322 | * @method static bool|responseError setPassportDataErrors (passportElementError[]|array $errors, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. |
||
323 | * @method static bool|responseError setPassport (passportElementError[]|array $errors, int|null $user_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns True on success.Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues. |
||
324 | * @method static message|responseError sendGame (string|array $game_short_name, int|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send a game. On success, the sent Message is returned. |
||
325 | * @method static message|responseError game (string|array $game_short_name, int|null $chat_id = null, string|null $business_connection_id = null, int|null $message_thread_id = null, bool|null $disable_notification = null, bool|null $protect_content = null, string|null $message_effect_id = null, replyParameters|object|array|null $reply_parameters = null, inlineKeyboardMarkup|object|array|null $reply_markup = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null) Use this method to send a game. On success, the sent Message is returned. |
||
326 | * @method static message|bool|responseError setGameScore (int|array $score, int|null $user_id = null, bool|null $force = null, bool|null $disable_edit_message = null, int|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False. |
||
327 | * @method static message|bool|responseError gameScore (int|array $score, int|null $user_id = null, bool|null $force = null, bool|null $disable_edit_message = null, int|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to set the score of the specified user in a game message. On success, if the message is not an inline message, the Message is returned, otherwise True is returned. Returns an error, if the new score is not greater than the user's current score in the chat and force is False. |
||
328 | * @method static gameHighScore[]|responseError getGameHighScores (int|array|null $user_id = null, int|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects. |
||
329 | * @method static gameHighScore[]|responseError getGameHigh (int|array|null $user_id = null, int|null $chat_id = null, int|null $message_id = null, string|null $inline_message_id = null, string|null $token = null, bool|null $forgot = null, bool|null $answer = null) Use this method to get data for high score tables. Will return the score of the specified user and several of their neighbors in a game. Returns an Array of GameHighScore objects. |
||
330 | */ |
||
331 | class request { |
||
332 | /** Result of telegram request */ |
||
333 | public static bool $status = false; |
||
334 | |||
335 | /** Telegram request response without any change */ |
||
336 | public static stdClass $pure_response; |
||
337 | |||
338 | private const METHODS_ACTION = [ |
||
339 | 'getupdates' => 'getUpdates', |
||
340 | 'getup' => 'getUpdates', |
||
341 | 'updates' => 'getUpdates', |
||
342 | 'up' => 'getUpdates', |
||
343 | 'setwebhook' => 'setWebhook', |
||
344 | 'setweb' => 'setWebhook', |
||
345 | 'webhook' => 'setWebhook', |
||
346 | 'deletewebhook' => 'deleteWebhook', |
||
347 | 'deleteweb' => 'deleteWebhook', |
||
348 | 'delweb' => 'deleteWebhook', |
||
349 | 'getwebhookinfo' => 'getWebhookInfo', |
||
350 | 'getwebhook' => 'getWebhookInfo', |
||
351 | 'getweb' => 'getWebhookInfo', |
||
352 | 'getme' => 'getMe', |
||
353 | 'me' => 'getMe', |
||
354 | 'logout' => 'logOut', |
||
355 | 'close' => 'close', |
||
356 | 'sendmessage' => 'sendMessage', |
||
357 | 'sendtext' => 'sendMessage', |
||
358 | 'send' => 'sendMessage', |
||
359 | 'forwardmessage' => 'forwardMessage', |
||
360 | 'forward' => 'forwardMessage', |
||
361 | 'forwardmessages' => 'forwardMessages', |
||
362 | 'forwards' => 'forwardMessages', |
||
363 | 'copymessage' => 'copyMessage', |
||
364 | 'copy' => 'copyMessage', |
||
365 | 'copymessages' => 'copyMessages', |
||
366 | 'copies' => 'copyMessages', |
||
367 | 'sendphoto' => 'sendPhoto', |
||
368 | 'photo' => 'sendPhoto', |
||
369 | 'sendaudio' => 'sendAudio', |
||
370 | 'audio' => 'sendAudio', |
||
371 | 'senddocument' => 'sendDocument', |
||
372 | 'senddoc' => 'sendDocument', |
||
373 | 'document' => 'sendDocument', |
||
374 | 'doc' => 'sendDocument', |
||
375 | 'sendvideo' => 'sendVideo', |
||
376 | 'sendmovie' => 'sendVideo', |
||
377 | 'video' => 'sendVideo', |
||
378 | 'movie' => 'sendVideo', |
||
379 | 'sendanimation' => 'sendAnimation', |
||
380 | 'sendgif' => 'sendAnimation', |
||
381 | 'animation' => 'sendAnimation', |
||
382 | 'gif' => 'sendAnimation', |
||
383 | 'sendvoice' => 'sendVoice', |
||
384 | 'voice' => 'sendVoice', |
||
385 | 'sendvideonote' => 'sendVideoNote', |
||
386 | 'videonote' => 'sendVideoNote', |
||
387 | 'sendmediagroup' => 'sendMediaGroup', |
||
388 | 'mediagroup' => 'sendMediaGroup', |
||
389 | 'media' => 'sendMediaGroup', |
||
390 | 'sendlocation' => 'sendLocation', |
||
391 | 'sendloc' => 'sendLocation', |
||
392 | 'location' => 'sendLocation', |
||
393 | 'loc' => 'sendLocation', |
||
394 | 'sendvenue' => 'sendVenue', |
||
395 | 'venue' => 'sendVenue', |
||
396 | 'sendcontact' => 'sendContact', |
||
397 | 'contact' => 'sendContact', |
||
398 | 'sendpoll' => 'sendPoll', |
||
399 | 'poll' => 'sendPoll', |
||
400 | 'senddice' => 'sendDice', |
||
401 | 'dice' => 'sendDice', |
||
402 | 'sendchataction' => 'sendChatAction', |
||
403 | 'chataction' => 'sendChatAction', |
||
404 | 'action' => 'sendChatAction', |
||
405 | 'setmessagereaction' => 'setMessageReaction', |
||
406 | 'setreaction' => 'setMessageReaction', |
||
407 | 'reaction' => 'setMessageReaction', |
||
408 | 'getuserprofilephotos' => 'getUserProfilePhotos', |
||
409 | 'userphotos' => 'getUserProfilePhotos', |
||
410 | 'getfile' => 'getFile', |
||
411 | 'file' => 'getFile', |
||
412 | 'banchatmember' => 'banChatMember', |
||
413 | 'ban' => 'banChatMember', |
||
414 | 'unbanchatmember' => 'unbanChatMember', |
||
415 | 'kick' => 'unbanChatMember', |
||
416 | 'unban' => 'unbanChatMember', |
||
417 | 'restrictchatmember' => 'restrictChatMember', |
||
418 | 'restrict' => 'restrictChatMember', |
||
419 | 'promotechatmember' => 'promoteChatMember', |
||
420 | 'promote' => 'promoteChatMember', |
||
421 | 'setchatadministratorcustomtitle' => 'setChatAdministratorCustomTitle', |
||
422 | 'setcustomtitle' => 'setChatAdministratorCustomTitle', |
||
423 | 'banchatsenderchat' => 'banChatSenderChat', |
||
424 | 'bansender' => 'banChatSenderChat', |
||
425 | 'unbanchatsenderchat' => 'unbanChatSenderChat', |
||
426 | 'unbansender' => 'unbanChatSenderChat', |
||
427 | 'setchatpermissions' => 'setChatPermissions', |
||
428 | 'permissions' => 'setChatPermissions', |
||
429 | 'exportchatinvitelink' => 'exportChatInviteLink', |
||
430 | 'link' => 'exportChatInviteLink', |
||
431 | 'createchatinvitelink' => 'createChatInviteLink', |
||
432 | 'crlink' => 'createChatInviteLink', |
||
433 | 'editchatinvitelink' => 'editChatInviteLink', |
||
434 | 'edlink' => 'editChatInviteLink', |
||
435 | 'revokechatinvitelink' => 'revokeChatInviteLink', |
||
436 | 'relink' => 'revokeChatInviteLink', |
||
437 | 'approvechatjoinrequest' => 'approveChatJoinRequest', |
||
438 | 'acceptjoin' => 'approveChatJoinRequest', |
||
439 | 'declinechatjoinrequest' => 'declineChatJoinRequest', |
||
440 | 'denyjoin' => 'declineChatJoinRequest', |
||
441 | 'setchatphoto' => 'setChatPhoto', |
||
442 | 'deletechatphoto' => 'deleteChatPhoto', |
||
443 | 'setchattitle' => 'setChatTitle', |
||
444 | 'title' => 'setChatTitle', |
||
445 | 'setchatdescription' => 'setChatDescription', |
||
446 | 'description' => 'setChatDescription', |
||
447 | 'pinchatmessage' => 'pinChatMessage', |
||
448 | 'pin' => 'pinChatMessage', |
||
449 | 'unpinchatmessage' => 'unpinChatMessage', |
||
450 | 'unpin' => 'unpinChatMessage', |
||
451 | 'unpinallchatmessages' => 'unpinAllChatMessages', |
||
452 | 'unpinall' => 'unpinAllChatMessages', |
||
453 | 'leavechat' => 'leaveChat', |
||
454 | 'leave' => 'leaveChat', |
||
455 | 'getchat' => 'getChat', |
||
456 | 'chat' => 'getChat', |
||
457 | 'getchatadministrators' => 'getChatAdministrators', |
||
458 | 'admins' => 'getChatAdministrators', |
||
459 | 'getchatmembercount' => 'getChatMemberCount', |
||
460 | 'getchatmemberscount' => 'getChatMemberCount', |
||
461 | 'memberscount' => 'getChatMemberCount', |
||
462 | 'getchatmember' => 'getChatMember', |
||
463 | 'member' => 'getChatMember', |
||
464 | 'setchatstickerset' => 'setChatStickerSet', |
||
465 | 'setsticker' => 'setChatStickerSet', |
||
466 | 'deletechatstickerset' => 'deleteChatStickerSet', |
||
467 | 'delsticker' => 'deleteChatStickerSet', |
||
468 | 'getforumtopiciconstickers' => 'getForumTopicIconStickers', |
||
469 | 'gettopicstickers' => 'getForumTopicIconStickers', |
||
470 | 'createforumtopic' => 'createForumTopic', |
||
471 | 'createtopic' => 'createForumTopic', |
||
472 | 'editforumtopic' => 'editForumTopic', |
||
473 | 'edittopic' => 'editForumTopic', |
||
474 | 'closeforumtopic' => 'closeForumTopic', |
||
475 | 'closetopic' => 'closeForumTopic', |
||
476 | 'reopenforumtopic' => 'reopenForumTopic', |
||
477 | 'reopentopic' => 'reopenForumTopic', |
||
478 | 'deleteforumtopic' => 'deleteForumTopic', |
||
479 | 'deletetopic' => 'deleteForumTopic', |
||
480 | 'unpinallforumtopicmessages' => 'unpinAllForumTopicMessages', |
||
481 | 'unpinalltopicmessages' => 'unpinAllForumTopicMessages', |
||
482 | 'unpintopicmessages' => 'unpinAllForumTopicMessages', |
||
483 | 'editgeneralforumtopic' => 'editGeneralForumTopic', |
||
484 | 'editgeneraltopic' => 'editGeneralForumTopic', |
||
485 | 'closegeneralforumtopic' => 'closeGeneralForumTopic', |
||
486 | 'closegeneraltopic' => 'closeGeneralForumTopic', |
||
487 | 'reopengeneralforumtopic' => 'reopenGeneralForumTopic', |
||
488 | 'reopengeneraltopic' => 'reopenGeneralForumTopic', |
||
489 | 'hidegeneralforumtopic' => 'hideGeneralForumTopic', |
||
490 | 'hidegeneraltopic' => 'hideGeneralForumTopic', |
||
491 | 'unhidegeneralforumtopic' => 'unhideGeneralForumTopic', |
||
492 | 'unhidegeneraltopic' => 'unhideGeneralForumTopic', |
||
493 | 'unpinallgeneralforumtopicmessages' => 'unpinAllGeneralForumTopicMessages', |
||
494 | 'unpinallgeneraltopicmessages' => 'unpinAllGeneralForumTopicMessages', |
||
495 | 'answercallbackquery' => 'answerCallbackQuery', |
||
496 | 'answer' => 'answerCallbackQuery', |
||
497 | 'getuserchatboosts' => 'getUserChatBoosts', |
||
498 | 'chatboosts' => 'getUserChatBoosts', |
||
499 | 'getbusinessconnection' => 'getBusinessConnection', |
||
500 | 'getbusiness' => 'getBusinessConnection', |
||
501 | 'setmycommands' => 'setMyCommands', |
||
502 | 'setcommands' => 'setMyCommands', |
||
503 | 'deletemycommands' => 'deleteMyCommands', |
||
504 | 'deletecommands' => 'deleteMyCommands', |
||
505 | 'getmycommands' => 'getMyCommands', |
||
506 | 'getcommands' => 'getMyCommands', |
||
507 | 'setmyname' => 'setMyName', |
||
508 | 'setname' => 'setMyName', |
||
509 | 'getmyname' => 'getMyName', |
||
510 | 'getname' => 'getMyName', |
||
511 | 'setmydescription' => 'setMyDescription', |
||
512 | 'setdescription' => 'setMyDescription', |
||
513 | 'getmydescription' => 'getMyDescription', |
||
514 | 'getdescription' => 'getMyDescription', |
||
515 | 'setmyshortdescription' => 'setMyShortDescription', |
||
516 | 'setshortdescription' => 'setMyShortDescription', |
||
517 | 'getmyshortdescription' => 'getMyShortDescription', |
||
518 | 'getshortdescription' => 'getMyShortDescription', |
||
519 | 'setchatmenubutton' => 'setChatMenuButton', |
||
520 | 'setmenubutton' => 'setChatMenuButton', |
||
521 | 'setmenu' => 'setChatMenuButton', |
||
522 | 'setbutton' => 'setChatMenuButton', |
||
523 | 'getchatmenubutton' => 'getChatMenuButton', |
||
524 | 'getmenubutton' => 'getChatMenuButton', |
||
525 | 'getmenu' => 'getChatMenuButton', |
||
526 | 'getbutton' => 'getChatMenuButton', |
||
527 | 'setmydefaultadministratorrights' => 'setMyDefaultAdministratorRights', |
||
528 | 'setmydefaultadminrights' => 'setMyDefaultAdministratorRights', |
||
529 | 'setmydefaultrights' => 'setMyDefaultAdministratorRights', |
||
530 | 'setdefaultrights' => 'setMyDefaultAdministratorRights', |
||
531 | 'getmydefaultadministratorrights' => 'getMyDefaultAdministratorRights', |
||
532 | 'getmydefaultadminrights' => 'getMyDefaultAdministratorRights', |
||
533 | 'getmydefaultrights' => 'getMyDefaultAdministratorRights', |
||
534 | 'getdefaultrights' => 'getMyDefaultAdministratorRights', |
||
535 | 'editmessagetext' => 'editMessageText', |
||
536 | 'edittext' => 'editMessageText', |
||
537 | 'editmessagecaption' => 'editMessageCaption', |
||
538 | 'editcap' => 'editMessageCaption', |
||
539 | 'editcaption' => 'editMessageCaption', |
||
540 | 'editmessagemedia' => 'editMessageMedia', |
||
541 | 'editmedia' => 'editMessageMedia', |
||
542 | 'editmessagelivelocation' => 'editMessageLiveLocation', |
||
543 | 'editliveloc' => 'editMessageLiveLocation', |
||
544 | 'stopmessagelivelocation' => 'stopMessageLiveLocation', |
||
545 | 'stopliveloc' => 'stopMessageLiveLocation', |
||
546 | 'editmessagereplymarkup' => 'editMessageReplyMarkup', |
||
547 | 'editreply' => 'editMessageReplyMarkup', |
||
548 | 'editkeyboard' => 'editMessageReplyMarkup', |
||
549 | 'stoppoll' => 'stopPoll', |
||
550 | 'deletemessage' => 'deleteMessage', |
||
551 | 'del' => 'deleteMessage', |
||
552 | 'deletemessages' => 'deleteMessages', |
||
553 | 'dels' => 'deleteMessages', |
||
554 | 'sendsticker' => 'sendSticker', |
||
555 | 'sticker' => 'sendSticker', |
||
556 | 'getstickerset' => 'getStickerSet', |
||
557 | 'getcustomemojistickers' => 'getCustomEmojiStickers', |
||
558 | 'uploadstickerfile' => 'uploadStickerFile', |
||
559 | 'uploadsticker' => 'uploadStickerFile', |
||
560 | 'createnewstickerset' => 'createNewStickerSet', |
||
561 | 'createsticker' => 'createNewStickerSet', |
||
562 | 'addstickertoset' => 'addStickerToSet', |
||
563 | 'addsticker' => 'addStickerToSet', |
||
564 | 'setstickerpositioninset' => 'setStickerPositionInSet', |
||
565 | 'setstickerposition' => 'setStickerPositionInSet', |
||
566 | 'setstickerpos' => 'setStickerPositionInSet', |
||
567 | 'deletestickerfromset' => 'deleteStickerFromSet', |
||
568 | 'deletesticker' => 'deleteStickerFromSet', |
||
569 | 'replacestickerinset' => 'replaceStickerInSet', |
||
570 | 'replacesticker' => 'replaceStickerInSet', |
||
571 | 'setstickeremojilist' => 'setStickerEmojiList', |
||
572 | 'setstickerkeywords' => 'setStickerKeywords', |
||
573 | 'setstickermaskposition' => 'setStickerMaskPosition', |
||
574 | 'setstickersettitle' => 'setStickerSetTitle', |
||
575 | 'setstickersetthumb' => 'setStickerSetThumbnail', |
||
576 | 'setstickerthumb' => 'setStickerSetThumbnail', |
||
577 | 'setcustomemojistickersetthumbnail' => 'setCustomEmojiStickerSetThumbnail', |
||
578 | 'deletestickerset' => 'deleteStickerSet', |
||
579 | 'answerinlinequery' => 'answerInlineQuery', |
||
580 | 'answerinline' => 'answerInlineQuery', |
||
581 | 'answerwebappquery' => 'answerWebAppQuery', |
||
582 | 'answerwebapp' => 'answerWebAppQuery', |
||
583 | 'answerweb' => 'answerWebAppQuery', |
||
584 | 'sendinvoice' => 'sendInvoice', |
||
585 | 'invoice' => 'sendInvoice', |
||
586 | 'createinvoicelink' => 'createInvoiceLink', |
||
587 | 'createinvoice' => 'createInvoiceLink', |
||
588 | 'answershippingquery' => 'answerShippingQuery', |
||
589 | 'answershipping' => 'answerShippingQuery', |
||
590 | 'answerprecheckoutquery' => 'answerPreCheckoutQuery', |
||
591 | 'answerprecheckout' => 'answerPreCheckoutQuery', |
||
592 | 'answerprecheck' => 'answerPreCheckoutQuery', |
||
593 | 'refundstarpayment' => 'refundStarPayment', |
||
594 | 'refundpayment' => 'refundStarPayment', |
||
595 | 'refundstar' => 'refundStarPayment', |
||
596 | 'setpassportdataerrors' => 'setPassportDataErrors', |
||
597 | 'setpassport' => 'setPassportDataErrors', |
||
598 | 'sendgame' => 'sendGame', |
||
599 | 'game' => 'sendGame', |
||
600 | 'setgamescore' => 'setGameScore', |
||
601 | 'gamescore' => 'setGameScore', |
||
602 | 'getgamehighscores' => 'getGameHighScores', |
||
603 | 'getgamehigh' => 'getGameHighScores', |
||
604 | ]; |
||
605 | |||
606 | private const METHODS_KEYS = [ |
||
607 | 'getUpdates' => ['offset', 'limit', 'timeout', 'allowed_updates', 'token', 'forgot', 'answer'], |
||
608 | 'setWebhook' => ['url', 'certificate', 'ip_address', 'max_connections', 'allowed_updates', 'drop_pending_updates', 'secret_token', 'token', 'forgot', 'answer'], |
||
609 | 'deleteWebhook' => ['drop_pending_updates', 'token', 'forgot', 'answer'], |
||
610 | 'getWebhookInfo' => ['token', 'forgot', 'answer'], |
||
611 | 'getMe' => ['token', 'forgot', 'answer'], |
||
612 | 'logOut' => ['token', 'forgot', 'answer'], |
||
613 | 'close' => ['token', 'forgot', 'answer'], |
||
614 | 'sendMessage' => ['text', 'chat_id', 'business_connection_id', 'message_thread_id', 'parse_mode', 'entities', 'link_preview_options', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
615 | 'forwardMessage' => ['chat_id', 'message_thread_id', 'from_chat_id', 'disable_notification', 'protect_content', 'message_id', 'token', 'forgot', 'answer'], |
||
616 | 'forwardMessages' => ['chat_id', 'message_ids', 'message_thread_id', 'from_chat_id', 'disable_notification', 'protect_content', 'token', 'forgot', 'answer'], |
||
617 | 'copyMessage' => ['chat_id', 'message_thread_id', 'from_chat_id', 'message_id', 'caption', 'parse_mode', 'caption_entities', 'show_caption_above_media', 'disable_notification', 'protect_content', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
618 | 'copyMessages' => ['chat_id', 'message_ids', 'message_thread_id', 'from_chat_id', 'disable_notification', 'protect_content', 'remove_caption', 'token', 'forgot', 'answer'], |
||
619 | 'sendPhoto' => ['photo', 'chat_id', 'business_connection_id', 'message_thread_id', 'caption', 'parse_mode', 'caption_entities', 'show_caption_above_media', 'has_spoiler', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
620 | 'sendAudio' => ['audio', 'chat_id', 'business_connection_id', 'message_thread_id', 'caption', 'parse_mode', 'caption_entities', 'duration', 'performer', 'title', 'thumbnail', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
621 | 'sendDocument' => ['document', 'chat_id', 'business_connection_id', 'message_thread_id', 'thumbnail', 'caption', 'parse_mode', 'caption_entities', 'disable_content_type_detection', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
622 | 'sendVideo' => ['video', 'chat_id', 'business_connection_id', 'message_thread_id', 'duration', 'width', 'height', 'thumbnail', 'caption', 'parse_mode', 'caption_entities', 'show_caption_above_media', 'has_spoiler', 'supports_streaming', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
623 | 'sendAnimation' => ['animation', 'chat_id', 'business_connection_id', 'message_thread_id', 'duration', 'width', 'height', 'thumbnail', 'caption', 'parse_mode', 'caption_entities', 'show_caption_above_media', 'has_spoiler', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
624 | 'sendVoice' => ['voice', 'chat_id', 'business_connection_id', 'message_thread_id', 'caption', 'parse_mode', 'caption_entities', 'duration', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
625 | 'sendVideoNote' => ['video_note', 'chat_id', 'business_connection_id', 'message_thread_id', 'duration', 'length', 'thumbnail', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
626 | 'sendMediaGroup' => ['media', 'chat_id', 'business_connection_id', 'message_thread_id', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
627 | 'sendLocation' => ['latitude', 'longitude', 'chat_id', 'business_connection_id', 'message_thread_id', 'horizontal_accuracy', 'live_period', 'heading', 'proximity_alert_radius', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
628 | 'sendVenue' => ['latitude', 'longitude', 'title', 'address', 'chat_id', 'business_connection_id', 'message_thread_id', 'foursquare_id', 'foursquare_type', 'google_place_id', 'google_place_type', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
629 | 'sendContact' => ['phone_number', 'first_name', 'chat_id', 'business_connection_id', 'message_thread_id', 'last_name', 'vcard', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
630 | 'sendPoll' => ['question', 'options', 'chat_id', 'business_connection_id', 'message_thread_id', 'question_parse_mode', 'question_entities', 'is_anonymous', 'type', 'allows_multiple_answers', 'correct_option_id', 'explanation', 'explanation_parse_mode', 'explanation_entities', 'open_period', 'close_date', 'is_closed', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
631 | 'sendDice' => ['chat_id', 'business_connection_id', 'message_thread_id', 'emoji', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
632 | 'sendChatAction' => ['chat_id', 'business_connection_id', 'message_thread_id', 'action', 'token', 'forgot', 'answer'], |
||
633 | 'setMessageReaction' => ['chat_id', 'message_id', 'reaction', 'is_big', 'token', 'forgot', 'answer'], |
||
634 | 'getUserProfilePhotos' => ['user_id', 'offset', 'limit', 'token', 'forgot', 'answer'], |
||
635 | 'getFile' => ['file_id', 'token', 'forgot', 'answer'], |
||
636 | 'banChatMember' => ['chat_id', 'user_id', 'until_date', 'revoke_messages', 'token', 'forgot', 'answer'], |
||
637 | 'unbanChatMember' => ['chat_id', 'user_id', 'only_if_banned', 'token', 'forgot', 'answer'], |
||
638 | 'restrictChatMember' => ['permissions', 'chat_id', 'user_id', 'use_independent_chat_permissions', 'until_date', 'token', 'forgot', 'answer'], |
||
639 | 'promoteChatMember' => ['chat_id', 'user_id', 'is_anonymous', 'can_manage_chat', 'can_delete_messages', 'can_manage_video_chats', 'can_restrict_members', 'can_promote_members', 'can_change_info', 'can_invite_users', 'can_post_stories', 'can_edit_stories', 'can_delete_stories', 'can_post_messages', 'can_edit_messages', 'can_pin_messages', 'can_manage_topics', 'token', 'forgot', 'answer'], |
||
640 | 'setChatAdministratorCustomTitle' => ['custom_title', 'chat_id', 'user_id', 'token', 'forgot', 'answer'], |
||
641 | 'banChatSenderChat' => ['sender_chat_id', 'chat_id', 'token', 'forgot', 'answer'], |
||
642 | 'unbanChatSenderChat' => ['sender_chat_id', 'chat_id', 'token', 'forgot', 'answer'], |
||
643 | 'setChatPermissions' => ['permissions', 'chat_id', 'use_independent_chat_permissions', 'token', 'forgot', 'answer'], |
||
644 | 'exportChatInviteLink' => ['chat_id', 'token', 'forgot', 'answer'], |
||
645 | 'createChatInviteLink' => ['chat_id', 'name', 'expire_date', 'member_limit', 'creates_join_request', 'token', 'forgot', 'answer'], |
||
646 | 'editChatInviteLink' => ['invite_link', 'chat_id', 'name', 'expire_date', 'member_limit', 'creates_join_request', 'token', 'forgot', 'answer'], |
||
647 | 'revokeChatInviteLink' => ['invite_link', 'chat_id', 'token', 'forgot', 'answer'], |
||
648 | 'approveChatJoinRequest' => ['chat_id', 'user_id', 'token', 'forgot', 'answer'], |
||
649 | 'declineChatJoinRequest' => ['chat_id', 'user_id', 'token', 'forgot', 'answer'], |
||
650 | 'setChatPhoto' => ['photo', 'chat_id', 'token', 'forgot', 'answer'], |
||
651 | 'deleteChatPhoto' => ['chat_id', 'token', 'forgot', 'answer'], |
||
652 | 'setChatTitle' => ['title', 'chat_id', 'token', 'forgot', 'answer'], |
||
653 | 'setChatDescription' => ['chat_id', 'description', 'token', 'forgot', 'answer'], |
||
654 | 'pinChatMessage' => ['chat_id', 'message_id', 'disable_notification', 'token', 'forgot', 'answer'], |
||
655 | 'unpinChatMessage' => ['chat_id', 'message_id', 'token', 'forgot', 'answer'], |
||
656 | 'unpinAllChatMessages' => ['chat_id', 'token', 'forgot', 'answer'], |
||
657 | 'leaveChat' => ['chat_id', 'token', 'forgot', 'answer'], |
||
658 | 'getChat' => ['chat_id', 'token', 'forgot', 'answer'], |
||
659 | 'getChatAdministrators' => ['chat_id', 'token', 'forgot', 'answer'], |
||
660 | 'getChatMemberCount' => ['chat_id', 'token', 'forgot', 'answer'], |
||
661 | 'getChatMember' => ['chat_id', 'user_id', 'token', 'forgot', 'answer'], |
||
662 | 'setChatStickerSet' => ['sticker_set_name', 'chat_id', 'token', 'forgot', 'answer'], |
||
663 | 'deleteChatStickerSet' => ['chat_id', 'token', 'forgot', 'answer'], |
||
664 | 'getForumTopicIconStickers' => ['token', 'forgot', 'answer'], |
||
665 | 'createForumTopic' => ['name', 'chat_id', 'icon_color', 'icon_custom_emoji_id', 'token', 'forgot', 'answer'], |
||
666 | 'editForumTopic' => ['message_thread_id', 'chat_id', 'name', 'icon_custom_emoji_id', 'token', 'forgot', 'answer'], |
||
667 | 'closeForumTopic' => ['message_thread_id', 'chat_id', 'token', 'forgot', 'answer'], |
||
668 | 'reopenForumTopic' => ['message_thread_id', 'chat_id', 'token', 'forgot', 'answer'], |
||
669 | 'deleteForumTopic' => ['message_thread_id', 'chat_id', 'token', 'forgot', 'answer'], |
||
670 | 'unpinAllForumTopicMessages' => ['message_thread_id', 'chat_id', 'token', 'forgot', 'answer'], |
||
671 | 'editGeneralForumTopic' => ['name', 'chat_id', 'token', 'forgot', 'answer'], |
||
672 | 'closeGeneralForumTopic' => ['chat_id', 'token', 'forgot', 'answer'], |
||
673 | 'reopenGeneralForumTopic' => ['chat_id', 'token', 'forgot', 'answer'], |
||
674 | 'hideGeneralForumTopic' => ['chat_id', 'token', 'forgot', 'answer'], |
||
675 | 'unhideGeneralForumTopic' => ['chat_id', 'token', 'forgot', 'answer'], |
||
676 | 'unpinAllGeneralForumTopicMessages' => ['chat_id', 'token', 'forgot', 'answer'], |
||
677 | 'answerCallbackQuery' => ['callback_query_id', 'text', 'show_alert', 'url', 'cache_time', 'token', 'forgot', 'answer'], |
||
678 | 'getUserChatBoosts' => ['chat_id', 'user_id', 'token', 'forgot', 'answer'], |
||
679 | 'getBusinessConnection' => ['business_connection_id', 'token', 'forgot', 'answer'], |
||
680 | 'setMyCommands' => ['commands', 'scope', 'language_code', 'token', 'forgot', 'answer'], |
||
681 | 'deleteMyCommands' => ['scope', 'language_code', 'token', 'forgot', 'answer'], |
||
682 | 'getMyCommands' => ['scope', 'language_code', 'token', 'forgot', 'answer'], |
||
683 | 'setMyName' => ['name', 'language_code', 'token', 'forgot', 'answer'], |
||
684 | 'getMyName' => ['language_code', 'token', 'forgot', 'answer'], |
||
685 | 'setMyDescription' => ['description', 'language_code', 'token', 'forgot', 'answer'], |
||
686 | 'getMyDescription' => ['language_code', 'token', 'forgot', 'answer'], |
||
687 | 'setMyShortDescription' => ['short_description', 'language_code', 'token', 'forgot', 'answer'], |
||
688 | 'getMyShortDescription' => ['language_code', 'token', 'forgot', 'answer'], |
||
689 | 'setChatMenuButton' => ['chat_id', 'menu_button', 'token', 'forgot', 'answer'], |
||
690 | 'getChatMenuButton' => ['chat_id', 'token', 'forgot', 'answer'], |
||
691 | 'setMyDefaultAdministratorRights' => ['rights', 'for_channels', 'token', 'forgot', 'answer'], |
||
692 | 'getMyDefaultAdministratorRights' => ['for_channels', 'token', 'forgot', 'answer'], |
||
693 | 'editMessageText' => ['text', 'chat_id', 'message_id', 'inline_message_id', 'parse_mode', 'entities', 'link_preview_options', 'reply_markup', 'token', 'forgot', 'answer'], |
||
694 | 'editMessageCaption' => ['chat_id', 'message_id', 'inline_message_id', 'caption', 'parse_mode', 'caption_entities', 'show_caption_above_media', 'reply_markup', 'token', 'forgot', 'answer'], |
||
695 | 'editMessageMedia' => ['media', 'chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'forgot', 'answer'], |
||
696 | 'editMessageLiveLocation' => ['latitude', 'longitude', 'chat_id', 'message_id', 'inline_message_id', 'live_period', 'horizontal_accuracy', 'heading', 'proximity_alert_radius', 'reply_markup', 'token', 'forgot', 'answer'], |
||
697 | 'stopMessageLiveLocation' => ['chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'forgot', 'answer'], |
||
698 | 'editMessageReplyMarkup' => ['chat_id', 'message_id', 'inline_message_id', 'reply_markup', 'token', 'forgot', 'answer'], |
||
699 | 'stopPoll' => ['chat_id', 'message_id', 'reply_markup', 'token', 'forgot', 'answer'], |
||
700 | 'deleteMessage' => ['chat_id', 'message_id', 'token', 'forgot', 'answer'], |
||
701 | 'deleteMessages' => ['message_ids', 'chat_id', 'token', 'forgot', 'answer'], |
||
702 | 'sendSticker' => ['sticker', 'chat_id', 'business_connection_id', 'message_thread_id', 'emoji', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
703 | 'getStickerSet' => ['name', 'token', 'forgot', 'answer'], |
||
704 | 'getCustomEmojiStickers' => ['custom_emoji_ids', 'token', 'forgot', 'answer'], |
||
705 | 'uploadStickerFile' => ['sticker', 'sticker_format', 'user_id', 'token', 'forgot', 'answer'], |
||
706 | 'createNewStickerSet' => ['name', 'title', 'stickers', 'user_id', 'sticker_type', 'needs_repainting', 'token', 'forgot', 'answer'], |
||
707 | 'addStickerToSet' => ['name', 'sticker', 'user_id', 'token', 'forgot', 'answer'], |
||
708 | 'setStickerPositionInSet' => ['sticker', 'position', 'token', 'forgot', 'answer'], |
||
709 | 'deleteStickerFromSet' => ['sticker', 'token', 'forgot', 'answer'], |
||
710 | 'replaceStickerInSet' => ['name', 'old_sticker', 'sticker', 'user_id', 'token', 'forgot', 'answer'], |
||
711 | 'setStickerEmojiList' => ['sticker', 'emoji_list', 'token', 'forgot', 'answer'], |
||
712 | 'setStickerKeywords' => ['sticker', 'keywords', 'token', 'forgot', 'answer'], |
||
713 | 'setStickerMaskPosition' => ['sticker', 'mask_position', 'token', 'forgot', 'answer'], |
||
714 | 'setStickerSetTitle' => ['name', 'title', 'token', 'forgot', 'answer'], |
||
715 | 'setStickerSetThumbnail' => ['name', 'format', 'user_id', 'thumbnail', 'token', 'forgot', 'answer'], |
||
716 | 'setCustomEmojiStickerSetThumbnail' => ['name', 'custom_emoji_id', 'token', 'forgot', 'answer'], |
||
717 | 'deleteStickerSet' => ['name', 'token', 'forgot', 'answer'], |
||
718 | 'answerInlineQuery' => ['results', 'inline_query_id', 'cache_time', 'is_personal', 'next_offset', 'button', 'token', 'forgot', 'answer'], |
||
719 | 'answerWebAppQuery' => ['web_app_query_id', 'result', 'token', 'forgot', 'answer'], |
||
720 | 'sendInvoice' => ['title', 'description', 'payload', 'currency', 'prices', 'chat_id', 'message_thread_id', 'provider_token', 'max_tip_amount', 'suggested_tip_amounts', 'start_parameter', 'provider_data', 'photo_url', 'photo_size', 'photo_width', 'photo_height', 'need_name', 'need_phone_number', 'need_email', 'need_shipping_address', 'send_phone_number_to_provider', 'send_email_to_provider', 'is_flexible', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
721 | 'createInvoiceLink' => ['title', 'description', 'payload', 'currency', 'prices', 'provider_token', 'max_tip_amount', 'suggested_tip_amounts', 'provider_data', 'photo_url', 'photo_size', 'photo_width', 'photo_height', 'need_name', 'need_phone_number', 'need_email', 'need_shipping_address', 'send_phone_number_to_provider', 'send_email_to_provider', 'is_flexible', 'token', 'forgot', 'answer'], |
||
722 | 'answerShippingQuery' => ['ok', 'shipping_query_id', 'shipping_options', 'error_message', 'token', 'forgot', 'answer'], |
||
723 | 'answerPreCheckoutQuery' => ['ok', 'pre_checkout_query_id', 'error_message', 'token', 'forgot', 'answer'], |
||
724 | 'refundStarPayment' => ['telegram_payment_charge_id', 'user_id', 'token', 'forgot', 'answer'], |
||
725 | 'setPassportDataErrors' => ['errors', 'user_id', 'token', 'forgot', 'answer'], |
||
726 | 'sendGame' => ['game_short_name', 'chat_id', 'business_connection_id', 'message_thread_id', 'disable_notification', 'protect_content', 'message_effect_id', 'reply_parameters', 'reply_markup', 'token', 'forgot', 'answer', 'reply_to_message_id', 'allow_sending_without_reply'], |
||
727 | 'setGameScore' => ['score', 'user_id', 'force', 'disable_edit_message', 'chat_id', 'message_id', 'inline_message_id', 'token', 'forgot', 'answer'], |
||
728 | 'getGameHighScores' => ['user_id', 'chat_id', 'message_id', 'inline_message_id', 'token', 'forgot', 'answer'] |
||
729 | ]; |
||
730 | |||
731 | private const METHODS_WITH_FILE = [ |
||
732 | 'setWebhook' => ['certificate'], |
||
733 | 'sendPhoto' => ['photo'], |
||
734 | 'sendAudio' => ['audio', 'thumbnail'], |
||
735 | 'sendDocument' => ['document', 'thumbnail'], |
||
736 | 'sendVideo' => ['video', 'thumbnail'], |
||
737 | 'sendAnimation' => ['animation', 'thumbnail'], |
||
738 | 'sendVoice' => ['voice'], |
||
739 | 'sendVideoNote' => ['video_note', 'thumbnail'], |
||
740 | 'setChatPhoto' => ['photo'], |
||
741 | 'sendSticker' => ['sticker'], |
||
742 | 'uploadStickerFile' => ['sticker'], |
||
743 | 'setStickerSetThumbnail' => ['thumbnail'] |
||
744 | ]; |
||
745 | |||
746 | private const METHODS_EXTRA_DEFAULTS = [ |
||
747 | 'setWebhook' => ['url'], |
||
748 | 'sendMessage' => ['chat_id'], |
||
749 | 'forwardMessage' => ['from_chat_id', 'message_id'], |
||
750 | 'forwardMessages' => ['from_chat_id'], |
||
751 | 'copyMessage' => ['from_chat_id', 'message_id'], |
||
752 | 'copyMessages' => ['from_chat_id'], |
||
753 | 'sendPhoto' => ['chat_id'], |
||
754 | 'sendAudio' => ['chat_id'], |
||
755 | 'sendDocument' => ['chat_id'], |
||
756 | 'sendVideo' => ['chat_id'], |
||
757 | 'sendAnimation' => ['chat_id'], |
||
758 | 'sendVoice' => ['chat_id'], |
||
759 | 'sendVideoNote' => ['chat_id'], |
||
760 | 'sendMediaGroup' => ['chat_id'], |
||
761 | 'sendLocation' => ['chat_id'], |
||
762 | 'sendVenue' => ['chat_id'], |
||
763 | 'sendContact' => ['chat_id'], |
||
764 | 'sendPoll' => ['chat_id'], |
||
765 | 'sendDice' => ['chat_id'], |
||
766 | 'sendChatAction' => ['action', 'chat_id'], |
||
767 | 'setMessageReaction' => ['chat_id', 'message_id'], |
||
768 | 'getUserProfilePhotos' => ['user_id'], |
||
769 | 'getFile' => ['file_id'], |
||
770 | 'banChatMember' => ['user_id', 'chat_id'], |
||
771 | 'unbanChatMember' => ['user_id', 'chat_id'], |
||
772 | 'restrictChatMember' => ['user_id', 'chat_id'], |
||
773 | 'promoteChatMember' => ['user_id', 'chat_id'], |
||
774 | 'setChatAdministratorCustomTitle' => ['user_id', 'chat_id'], |
||
775 | 'banChatSenderChat' => ['chat_id'], |
||
776 | 'unbanChatSenderChat' => ['chat_id'], |
||
777 | 'setChatPermissions' => ['chat_id'], |
||
778 | 'exportChatInviteLink' => ['chat_id'], |
||
779 | 'createChatInviteLink' => ['chat_id'], |
||
780 | 'editChatInviteLink' => ['chat_id'], |
||
781 | 'revokeChatInviteLink' => ['chat_id'], |
||
782 | 'approveChatJoinRequest' => ['user_id', 'chat_id'], |
||
783 | 'declineChatJoinRequest' => ['user_id', 'chat_id'], |
||
784 | 'setChatPhoto' => ['chat_id'], |
||
785 | 'deleteChatPhoto' => ['chat_id'], |
||
786 | 'setChatTitle' => ['chat_id'], |
||
787 | 'setChatDescription' => ['chat_id'], |
||
788 | 'pinChatMessage' => ['chat_id', 'message_id'], |
||
789 | 'unpinChatMessage' => ['chat_id', 'message_id'], |
||
790 | 'unpinAllChatMessages' => ['chat_id'], |
||
791 | 'leaveChat' => ['chat_id'], |
||
792 | 'getChat' => ['chat_id'], |
||
793 | 'getChatAdministrators' => ['chat_id'], |
||
794 | 'getChatMemberCount' => ['chat_id'], |
||
795 | 'getChatMember' => ['user_id', 'chat_id'], |
||
796 | 'setChatStickerSet' => ['chat_id'], |
||
797 | 'deleteChatStickerSet' => ['chat_id'], |
||
798 | 'createForumTopic' => ['chat_id'], |
||
799 | 'editForumTopic' => ['chat_id'], |
||
800 | 'closeForumTopic' => ['chat_id'], |
||
801 | 'reopenForumTopic' => ['chat_id'], |
||
802 | 'deleteForumTopic' => ['chat_id'], |
||
803 | 'unpinAllForumTopicMessages' => ['chat_id'], |
||
804 | 'editGeneralForumTopic' => ['chat_id'], |
||
805 | 'closeGeneralForumTopic' => ['chat_id'], |
||
806 | 'reopenGeneralForumTopic' => ['chat_id'], |
||
807 | 'hideGeneralForumTopic' => ['chat_id'], |
||
808 | 'unhideGeneralForumTopic' => ['chat_id'], |
||
809 | 'unpinAllGeneralForumTopicMessages' => ['chat_id'], |
||
810 | 'answerCallbackQuery' => ['callback_query_id'], |
||
811 | 'getUserChatBoosts' => ['user_id', 'chat_id'], |
||
812 | 'setChatMenuButton' => ['chat_id'], |
||
813 | 'getChatMenuButton' => ['chat_id'], |
||
814 | 'editMessageText' => ['inline_query' => ['inline_message_id'], 'other' => ['chat_id', 'message_id']], |
||
815 | 'editMessageCaption' => ['inline_query' => ['inline_message_id'], 'other' => ['chat_id', 'message_id']], |
||
816 | 'editMessageMedia' => ['inline_query' => ['inline_message_id'], 'other' => ['chat_id', 'message_id']], |
||
817 | 'editMessageLiveLocation' => ['inline_query' => ['inline_message_id'], 'other' => ['chat_id', 'message_id']], |
||
818 | 'stopMessageLiveLocation' => ['inline_query' => ['inline_message_id'], 'other' => ['chat_id', 'message_id']], |
||
819 | 'editMessageReplyMarkup' => ['inline_query' => ['inline_message_id'], 'other' => ['chat_id', 'message_id']], |
||
820 | 'stopPoll' => ['chat_id', 'message_id'], |
||
821 | 'deleteMessage' => ['chat_id', 'message_id'], |
||
822 | 'deleteMessages' => ['chat_id'], |
||
823 | 'sendSticker' => ['chat_id'], |
||
824 | 'uploadStickerFile' => ['user_id'], |
||
825 | 'createNewStickerSet' => ['user_id'], |
||
826 | 'addStickerToSet' => ['user_id'], |
||
827 | 'replaceStickerInSet' => ['user_id'], |
||
828 | 'setStickerSetThumbnail' => ['user_id'], |
||
829 | 'answerInlineQuery' => ['inline_query_id'], |
||
830 | 'sendInvoice' => ['chat_id'], |
||
831 | 'answerShippingQuery' => ['shipping_query_id'], |
||
832 | 'answerPreCheckoutQuery' => ['pre_checkout_query_id'], |
||
833 | 'refundStarPayment' => ['user_id'], |
||
834 | 'setPassportDataErrors' => ['user_id'], |
||
835 | 'sendGame' => ['chat_id'], |
||
836 | 'setGameScore' => ['user_id', 'inline_query' => ['inline_message_id'], 'other' => ['chat_id', 'message_id']], |
||
837 | 'getGameHighScores' => ['user_id', 'inline_query' => ['inline_message_id'], 'other' => ['chat_id', 'message_id']], |
||
838 | ]; |
||
839 | |||
840 | private const METHODS_RETURN = [ |
||
841 | 'getUpdates' => ['BPT\types\update'], |
||
842 | 'getWebhookInfo' => 'BPT\types\webhookInfo', |
||
843 | 'getMe' => 'BPT\types\user', |
||
844 | 'sendMessage' => 'BPT\types\message', |
||
845 | 'forwardMessage' => 'BPT\types\message', |
||
846 | 'forwardMessages' => ['BPT\types\messageId'], |
||
847 | 'copyMessage' => 'BPT\types\messageId', |
||
848 | 'copyMessages' => ['BPT\types\messageId'], |
||
849 | 'sendPhoto' => 'BPT\types\message', |
||
850 | 'sendAudio' => 'BPT\types\message', |
||
851 | 'sendDocument' => 'BPT\types\message', |
||
852 | 'sendVideo' => 'BPT\types\message', |
||
853 | 'sendAnimation' => 'BPT\types\message', |
||
854 | 'sendVoice' => 'BPT\types\message', |
||
855 | 'sendVideoNote' => 'BPT\types\message', |
||
856 | 'sendMediaGroup' => ['BPT\types\message'], |
||
857 | 'sendLocation' => 'BPT\types\message', |
||
858 | 'sendVenue' => 'BPT\types\message', |
||
859 | 'sendContact' => 'BPT\types\message', |
||
860 | 'sendPoll' => 'BPT\types\message', |
||
861 | 'sendDice' => 'BPT\types\message', |
||
862 | 'getUserProfilePhotos' => 'BPT\types\userProfilePhotos', |
||
863 | 'getFile' => 'BPT\types\file', |
||
864 | 'createChatInviteLink' => 'BPT\types\chatInviteLink', |
||
865 | 'editChatInviteLink' => 'BPT\types\chatInviteLink', |
||
866 | 'revokeChatInviteLink' => 'BPT\types\chatInviteLink', |
||
867 | 'getChat' => 'BPT\types\chatFullInfo', |
||
868 | 'getChatAdministrators' => ['BPT\types\chatMember'], |
||
869 | 'getChatMember' => 'BPT\types\chatMember', |
||
870 | 'getForumTopicIconStickers' => ['BPT\types\sticker'], |
||
871 | 'createForumTopic' => 'BPT\types\forumTopic', |
||
872 | 'getUserChatBoosts' => 'BPT\types\userChatBoosts', |
||
873 | 'getBusinessConnection' => 'BPT\types\businessConnection', |
||
874 | 'getMyCommands' => ['BPT\types\botCommand'], |
||
875 | 'getMyName' => 'BPT\types\botName', |
||
876 | 'getMyDescription' => 'BPT\types\botDescription', |
||
877 | 'getMyShortDescription' => 'BPT\types\botShortDescription', |
||
878 | 'getChatMenuButton' => 'BPT\types\menuButton', |
||
879 | 'getMyDefaultAdministratorRights' => 'BPT\types\chatAdministratorRights', |
||
880 | 'editMessageText' => 'BPT\types\message', |
||
881 | 'editMessageCaption' => 'BPT\types\message', |
||
882 | 'editMessageMedia' => 'BPT\types\message', |
||
883 | 'editMessageLiveLocation' => 'BPT\types\message', |
||
884 | 'stopMessageLiveLocation' => 'BPT\types\message', |
||
885 | 'editMessageReplyMarkup' => 'BPT\types\message', |
||
886 | 'stopPoll' => 'BPT\types\poll', |
||
887 | 'sendSticker' => 'BPT\types\message', |
||
888 | 'getStickerSet' => 'BPT\types\stickerSet', |
||
889 | 'getCustomEmojiStickers' => ['BPT\types\sticker'], |
||
890 | 'uploadStickerFile' => 'BPT\types\file', |
||
891 | 'answerWebAppQuery' => 'BPT\types\sentWebAppMessage', |
||
892 | 'sendInvoice' => 'BPT\types\message', |
||
893 | 'sendGame' => 'BPT\types\message', |
||
894 | 'setGameScore' => 'BPT\types\message', |
||
895 | 'getGameHighScores' => ['BPT\types\gameHighScore'] |
||
896 | ]; |
||
897 | |||
898 | public static function __callStatic (string $name, array $arguments) { |
||
899 | if (!$action = self::methodAction($name)) { |
||
900 | logger::write("$name method is not supported",loggerTypes::ERROR); |
||
901 | throw new bptException('METHOD_NOT_FOUND'); |
||
902 | } |
||
903 | self::checkArguments($arguments); |
||
904 | self::keysName($action,$arguments); |
||
905 | self::readyFile($action,$arguments); |
||
906 | self::cleanArguments($arguments); |
||
907 | self::setDefaults($action,$arguments); |
||
908 | |||
909 | if (isset($arguments['answer']) && $arguments['answer'] === true) { |
||
910 | unset($arguments['answer']); |
||
911 | if (!answer::isAnswered()) { |
||
912 | return answer::init($action,$arguments); |
||
913 | } |
||
914 | logger::write('you can use answer mode only once for each webhook update, Others will be called like normal',loggerTypes::WARNING); |
||
915 | } |
||
916 | $result = curl::init($action,$arguments); |
||
917 | if (!is_object($result)) { |
||
918 | logger::write("Telegram $action method failed : " . $result, loggerTypes::WARNING); |
||
919 | return false; |
||
920 | } |
||
921 | return self::processResponse($action,$result); |
||
922 | } |
||
923 | |||
924 | private static function checkArguments(array &$arguments): void { |
||
925 | if (isset($arguments[0]) && count($arguments) === 1 && is_array($arguments[0]) && !isset($arguments[0][0])) { |
||
926 | $arguments = $arguments[0]; |
||
927 | } |
||
928 | } |
||
929 | |||
930 | private static function keysName (string $name, array &$arguments): void { |
||
931 | foreach ($arguments as $key => $argument) { |
||
932 | if (is_numeric($key) && isset(self::METHODS_KEYS[$name][$key])) { |
||
933 | $arguments[self::METHODS_KEYS[$name][$key]] = $argument; |
||
934 | unset($arguments[$key]); |
||
935 | } |
||
936 | } |
||
937 | } |
||
938 | |||
939 | private static function methodAction(string $name): string|false { |
||
940 | return self::METHODS_ACTION[str_replace('_', '', strtolower($name))] ?? false; |
||
941 | } |
||
942 | |||
943 | private static function readyFile(string $name, array &$arguments): void { |
||
944 | if ($name === 'sendMediaGroup') { |
||
945 | foreach ($arguments['media'] as $key => $media) { |
||
946 | if ($media['media'] instanceof CURLFile) { |
||
947 | $remove_answer = true; |
||
948 | } |
||
949 | elseif (is_string($media['media']) && file_exists(realpath($media['media']))) { |
||
950 | $arguments['media'][$key]['media'] = new CURLFile($media['media']); |
||
951 | $remove_answer = true; |
||
952 | } |
||
953 | } |
||
954 | } |
||
955 | elseif ($file_params = self::methodFile($name)) { |
||
956 | foreach ($file_params as $param) { |
||
957 | if (isset($arguments[$param])) { |
||
958 | if ($arguments[$param] instanceof CURLFile) { |
||
959 | $remove_answer = true; |
||
960 | } |
||
961 | elseif (is_string($arguments[$param]) && file_exists(realpath($arguments[$param]))) { |
||
962 | $arguments[$param] = new CURLFile($arguments[$param]); |
||
963 | $remove_answer = true; |
||
964 | } |
||
965 | } |
||
966 | |||
967 | } |
||
968 | } |
||
969 | if (isset($remove_answer) && isset($arguments['answer'])) { |
||
970 | unset($arguments['answer']); |
||
971 | logger::write('You can not use answer while sending file', loggerTypes::WARNING); |
||
972 | } |
||
973 | } |
||
974 | |||
975 | private static function methodFile(string $name): array|false { |
||
976 | return self::METHODS_WITH_FILE[$name] ?? false; |
||
977 | } |
||
978 | |||
979 | private static function methodReturn(string $name,stdClass $response) { |
||
980 | if (!settings::$use_types_classes) { |
||
981 | return $response; |
||
982 | } |
||
983 | if (!isset(self::METHODS_RETURN[$name])) { |
||
984 | return $response->result; |
||
985 | } |
||
986 | $return = self::METHODS_RETURN[$name]; |
||
987 | if (!is_array($return)) { |
||
988 | return new ($return) ($response->result); |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
989 | } |
||
990 | $response = $response->result; |
||
991 | foreach ($response as &$value) { |
||
992 | $value = new ($return[0]) ($value); |
||
993 | } |
||
994 | return $response; |
||
995 | } |
||
996 | |||
997 | private static function setDefaults(string $name, array &$arguments): void { |
||
998 | $defaults = self::METHODS_EXTRA_DEFAULTS[$name] ?? []; |
||
999 | foreach ($defaults as $key => $default) { |
||
1000 | if (is_numeric($key)) { |
||
1001 | if (!isset($arguments[$default])){ |
||
1002 | $arguments[$default] = self::catchFields($default); |
||
1003 | } |
||
1004 | } |
||
1005 | elseif (isset(BPT::$update->{$key}) || $key === 'other') { |
||
1006 | foreach ($default as $def) { |
||
1007 | if (!isset($arguments[$def])){ |
||
1008 | $arguments[$def] = self::catchFields($def); |
||
1009 | } |
||
1010 | } |
||
1011 | break; |
||
1012 | } |
||
1013 | } |
||
1014 | if (!isset($arguments['parse_mode']) && !empty(settings::$default_parse_mode) && in_array('parse_mode', self::METHODS_KEYS[$name])) { |
||
1015 | $arguments['parse_mode'] = settings::$default_parse_mode; |
||
1016 | } |
||
1017 | if (!isset($arguments['protect_content']) && !empty(settings::$default_protect_content) && in_array('protect_content', self::METHODS_KEYS[$name])) { |
||
1018 | $arguments['protect_content'] = settings::$default_protect_content; |
||
1019 | } |
||
1020 | } |
||
1021 | |||
1022 | private static function processResponse(string $name, stdClass $response) { |
||
1023 | self::$status = $response->ok; |
||
1024 | self::$pure_response = $response; |
||
1025 | if (!$response->ok) { |
||
1026 | logger::write("Telegram $name method failed : " . json_encode($response), loggerTypes::WARNING); |
||
1027 | unset($response->ok); |
||
1028 | return new responseError($response); |
||
1029 | } |
||
1030 | return self::methodReturn($name,$response); |
||
1031 | } |
||
1032 | |||
1033 | private static function cleanArguments (array &$arguments): void { |
||
1034 | foreach ($arguments as $key => $argument) { |
||
1035 | if ($argument == [] || $argument === null) { |
||
1036 | unset($arguments[$key]); |
||
1037 | } |
||
1038 | } |
||
1039 | } |
||
1040 | |||
1041 | /** |
||
1042 | * easy method for getting fields from update |
||
1043 | * |
||
1044 | * @param string $field |
||
1045 | * |
||
1046 | * @return int|string|bool |
||
1047 | */ |
||
1048 | public static function catchFields (string $field): int|string|bool { |
||
1049 | switch ($field) { |
||
1050 | case fields::CHAT_ID : |
||
1051 | case fields::FROM_CHAT_ID : |
||
1052 | return match (true) { |
||
1053 | isset(BPT::$update->message) => BPT::$update->message->chat->id, |
||
1054 | isset(BPT::$update->edited_message) => BPT::$update->edited_message->chat->id, |
||
1055 | isset(BPT::$update->inline_query) => BPT::$update->inline_query->from->id, |
||
1056 | isset(BPT::$update->callback_query) => BPT::$update->callback_query->from->id, |
||
1057 | isset(BPT::$update->chat_join_request) => BPT::$update->chat_join_request->chat->id, |
||
1058 | default => false |
||
1059 | }; |
||
1060 | case fields::USER_ID : |
||
1061 | return match(true) { |
||
1062 | isset(BPT::$update->message) => BPT::$update->message->from->id, |
||
1063 | isset(BPT::$update->edited_message) => BPT::$update->edited_message->from->id, |
||
1064 | isset(BPT::$update->inline_query) => BPT::$update->inline_query->from->id, |
||
1065 | isset(BPT::$update->callback_query) => BPT::$update->callback_query->from->id, |
||
1066 | isset(BPT::$update->chat_join_request) => BPT::$update->chat_join_request->from->id, |
||
1067 | default => false |
||
1068 | }; |
||
1069 | case fields::MESSAGE_ID : |
||
1070 | return match(true) { |
||
1071 | isset(BPT::$update->message) => BPT::$update->message->message_id, |
||
1072 | isset(BPT::$update->edited_message) => BPT::$update->edited_message->message_id, |
||
1073 | isset(BPT::$update->callback_query) => BPT::$update->callback_query->message->message_id, |
||
1074 | default => false |
||
1075 | }; |
||
1076 | case fields::FILE_ID : |
||
1077 | if (isset(BPT::$update->message)) $type = 'message'; |
||
1078 | elseif (isset(BPT::$update->edited_message)) $type = 'edited_message'; |
||
1079 | else return false; |
||
1080 | |||
1081 | return match(true) { |
||
1082 | isset(BPT::$update->{$type}->animation) => BPT::$update->{$type}->animation->file_id, |
||
1083 | isset(BPT::$update->{$type}->audio) => BPT::$update->{$type}->audio->file_id, |
||
1084 | isset(BPT::$update->{$type}->document) => BPT::$update->{$type}->document->file_id, |
||
1085 | isset(BPT::$update->{$type}->photo) => end(BPT::$update->{$type}->photo)->file_id, |
||
1086 | isset(BPT::$update->{$type}->sticker) => BPT::$update->{$type}->sticker->file_id, |
||
1087 | isset(BPT::$update->{$type}->video) => BPT::$update->{$type}->video->file_id, |
||
1088 | isset(BPT::$update->{$type}->video_note) => BPT::$update->{$type}->video_note->file_id, |
||
1089 | isset(BPT::$update->{$type}->voice) => BPT::$update->{$type}->voice->file_id, |
||
1090 | default => false |
||
1091 | }; |
||
1092 | case fields::CALLBACK_QUERY_ID : |
||
1093 | return match (true) { |
||
1094 | isset(BPT::$update->callback_query) => BPT::$update->callback_query->id, |
||
1095 | default => false |
||
1096 | }; |
||
1097 | case fields::SHIPPING_QUERY_ID : |
||
1098 | return match(true) { |
||
1099 | isset(BPT::$update->shipping_query) => BPT::$update->shipping_query->id, |
||
1100 | default => false |
||
1101 | }; |
||
1102 | case fields::PRE_CHECKOUT_QUERY_ID : |
||
1103 | return match(true) { |
||
1104 | isset(BPT::$update->pre_checkout_query) => BPT::$update->pre_checkout_query->id, |
||
1105 | default => false |
||
1106 | }; |
||
1107 | case fields::INLINE_QUERY_ID : |
||
1108 | return match(true) { |
||
1109 | isset(BPT::$update->inline_query) => BPT::$update->inline_query->id, |
||
1110 | default => false |
||
1111 | }; |
||
1112 | case fields::TYPE : |
||
1113 | return match(true) { |
||
1114 | isset(BPT::$update->message) => BPT::$update->message->chat->type, |
||
1115 | isset(BPT::$update->edited_message) => BPT::$update->edited_message->chat->type, |
||
1116 | isset(BPT::$update->inline_query) => BPT::$update->inline_query->chat_type, |
||
1117 | isset(BPT::$update->callback_query) => BPT::$update->callback_query->message->chat->type, |
||
1118 | default => false |
||
1119 | }; |
||
1120 | case fields::ACTION : |
||
1121 | return chatActions::TYPING; |
||
1122 | case fields::NAME : |
||
1123 | return match(true) { |
||
1124 | isset(BPT::$update->message) => BPT::$update->message->from->first_name, |
||
1125 | isset(BPT::$update->edited_message) => BPT::$update->edited_message->from->first_name, |
||
1126 | isset(BPT::$update->inline_query) => BPT::$update->inline_query->from->first_name, |
||
1127 | isset(BPT::$update->callback_query) => BPT::$update->callback_query->from->first_name, |
||
1128 | isset(BPT::$update->chat_join_request) => BPT::$update->chat_join_request->from->first_name, |
||
1129 | default => false |
||
1130 | }; |
||
1131 | case fields::LAST_NAME : |
||
1132 | return match(true) { |
||
1133 | isset(BPT::$update->message) => BPT::$update->message->from->last_name ?? '', |
||
1134 | isset(BPT::$update->edited_message) => BPT::$update->edited_message->from->last_name ?? '', |
||
1135 | isset(BPT::$update->inline_query) => BPT::$update->inline_query->from->last_name ?? '', |
||
1136 | isset(BPT::$update->callback_query) => BPT::$update->callback_query->from->last_name ?? '', |
||
1137 | isset(BPT::$update->chat_join_request) => BPT::$update->chat_join_request->from->last_name ?? '', |
||
1138 | default => false |
||
1139 | }; |
||
1140 | case fields::USERNAME : |
||
1141 | return match(true) { |
||
1142 | isset(BPT::$update->message) => BPT::$update->message->from->username ?? '', |
||
1143 | isset(BPT::$update->edited_message) => BPT::$update->edited_message->from->username ?? '', |
||
1144 | isset(BPT::$update->inline_query) => BPT::$update->inline_query->from->username ?? '', |
||
1145 | isset(BPT::$update->callback_query) => BPT::$update->callback_query->from->username ?? '', |
||
1146 | isset(BPT::$update->chat_join_request) => BPT::$update->chat_join_request->from->username ?? '', |
||
1147 | default => false |
||
1148 | }; |
||
1149 | case fields::GROUP_NAME : |
||
1150 | return match(true) { |
||
1151 | isset(BPT::$update->message) => BPT::$update->message->chat->first_name, |
||
1152 | isset(BPT::$update->edited_message) => BPT::$update->edited_message->chat->first_name, |
||
1153 | isset(BPT::$update->callback_query) => BPT::$update->callback_query->message->chat->first_name, |
||
1154 | isset(BPT::$update->chat_join_request) => BPT::$update->chat_join_request->chat->first_name, |
||
1155 | default => false |
||
1156 | }; |
||
1157 | case fields::GROUP_USERNAME : |
||
1158 | return match(true) { |
||
1159 | isset(BPT::$update->message) => BPT::$update->message->chat->username, |
||
1160 | isset(BPT::$update->edited_message) => BPT::$update->edited_message->chat->username, |
||
1161 | isset(BPT::$update->callback_query) => BPT::$update->callback_query->message->chat->username, |
||
1162 | isset(BPT::$update->chat_join_request) => BPT::$update->chat_join_request->chat->username, |
||
1163 | default => false |
||
1164 | }; |
||
1165 | case fields::UPDATE_TYPE : |
||
1166 | return match(true) { |
||
1167 | isset(BPT::$update->message) => updateTypes::MESSAGE, |
||
1168 | isset(BPT::$update->edited_message) => updateTypes::EDITED_MESSAGE, |
||
1169 | isset(BPT::$update->inline_query) => updateTypes::INLINE_QUERY, |
||
1170 | isset(BPT::$update->callback_query) => updateTypes::CALLBACK_QUERY, |
||
1171 | isset(BPT::$update->chat_join_request) => updateTypes::CHAT_JOIN_REQUEST, |
||
1172 | isset(BPT::$update->my_chat_member) => updateTypes::MY_CHAT_MEMBER, |
||
1173 | isset(BPT::$update->chat_member) => updateTypes::CHAT_MEMBER, |
||
1174 | isset(BPT::$update->channel_post) => updateTypes::CHANNEL_POST, |
||
1175 | isset(BPT::$update->edited_channel_post) => updateTypes::EDITED_CHANNEL_POST, |
||
1176 | isset(BPT::$update->chosen_inline_result) => updateTypes::CHOSEN_INLINE_RESULT, |
||
1177 | isset(BPT::$update->shipping_query) => updateTypes::SHIPPING_QUERY, |
||
1178 | isset(BPT::$update->pre_checkout_query) => updateTypes::PRE_CHECKOUT_QUERY, |
||
1179 | isset(BPT::$update->poll) => updateTypes::POLL, |
||
1180 | isset(BPT::$update->poll_answer) => updateTypes::POLL_ANSWER, |
||
1181 | default => false |
||
1182 | }; |
||
1183 | case fields::UPDATE_DATE : |
||
1184 | return match(true) { |
||
1185 | isset(BPT::$update->message) => BPT::$update->message->date, |
||
1186 | isset(BPT::$update->edited_message) => BPT::$update->edited_message->date, |
||
1187 | isset(BPT::$update->chat_join_request) => BPT::$update->chat_join_request->date, |
||
1188 | isset(BPT::$update->my_chat_member) => BPT::$update->my_chat_member->date, |
||
1189 | isset(BPT::$update->chat_member) => BPT::$update->chat_member->date, |
||
1190 | isset(BPT::$update->channel_post) => BPT::$update->channel_post->date, |
||
1191 | isset(BPT::$update->edited_channel_post) => BPT::$update->edited_channel_post->date, |
||
1192 | default => false |
||
1193 | }; |
||
1194 | case fields::URL : |
||
1195 | return 'https://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; |
||
1196 | default: |
||
1197 | return false; |
||
1198 | } |
||
1199 | } |
||
1200 | |||
1201 | public static function fileLink (string|null $file_id = null): bool|string { |
||
1202 | $file = request::getFile($file_id); |
||
1203 | if (!isset($file->file_path)) { |
||
1204 | return false; |
||
1205 | } |
||
1206 | return $file->link(); |
||
1207 | } |
||
1208 | |||
1209 | /** |
||
1210 | * download telegram file with file_id to destination location |
||
1211 | * |
||
1212 | * It has 20MB download limit(same as telegram) |
||
1213 | * |
||
1214 | * e.g. => tools::downloadFile('test.mp4'); |
||
1215 | * |
||
1216 | * e.g. => tools::downloadFile('test.mp4','file_id_asdadadadadadad); |
||
1217 | * |
||
1218 | * @param string $destination destination for save the file |
||
1219 | * @param string|null $file_id file_id for download, if not set, will generate by request::catchFields method |
||
1220 | * |
||
1221 | * @return bool |
||
1222 | */ |
||
1223 | public static function downloadFile (string $destination, string|null $file_id = null): bool { |
||
1224 | return tools::downloadFile(self::fileLink($file_id), $destination); |
||
1225 | } |
||
1226 | |||
1227 | /** |
||
1228 | * send file with only file_id |
||
1229 | * |
||
1230 | * e.g. => request::sendFile('file_id_asdadsadadadadadada'); |
||
1231 | * |
||
1232 | * e.g. => request::sendFile('file_id_asdadsadadadadadada','hello'); |
||
1233 | * |
||
1234 | * @param string $file_id |
||
1235 | * @param int|string|null $chat_id |
||
1236 | * @param int|null $message_thread_id default : null |
||
1237 | * @param string|null $caption |
||
1238 | * |
||
1239 | * @return message|bool|responseError |
||
1240 | */ |
||
1241 | public static function sendFile (string $file_id, int|string $chat_id = null, string|null $business_connection_id = null, int $message_thread_id = null, string $caption = null, string $parse_mode = null, array $caption_entities = null, bool $disable_notification = null, bool $protect_content = null, array|object $reply_parameters = null, inlineKeyboardMarkup|replyKeyboardMarkup|replyKeyboardRemove|forceReply|stdClass|array $reply_markup = null, string $token = null, bool $forgot = null, bool $answer = null, int|null $reply_to_message_id = null, bool|null $allow_sending_without_reply = null): message|bool|responseError { |
||
1242 | $type = tools::fileType($file_id); |
||
1243 | return match ($type) { |
||
1244 | fileTypes::VIDEO => request::sendVideo(video: $file_id, chat_id: $chat_id, business_connection_id: $business_connection_id, message_thread_id: $message_thread_id, caption: $caption, parse_mode: $parse_mode, caption_entities: $caption_entities, has_spoiler: false, disable_notification: $disable_notification, protect_content: $protect_content, reply_parameters: $reply_parameters, reply_markup: $reply_markup, token: $token, forgot: $forgot, answer: $answer, reply_to_message_id: $reply_to_message_id, allow_sending_without_reply: $allow_sending_without_reply), |
||
1245 | fileTypes::VIDEO_NOTE => request::sendVideoNote(video_note: $file_id, chat_id: $chat_id, business_connection_id: $business_connection_id, message_thread_id: $message_thread_id, disable_notification: $disable_notification, protect_content: $protect_content, reply_parameters: $reply_parameters, reply_markup: $reply_markup, token: $token, forgot: $forgot, answer: $answer, reply_to_message_id: $reply_to_message_id, allow_sending_without_reply: $allow_sending_without_reply), |
||
1246 | fileTypes::ANIMATION => request::sendAnimation(animation: $file_id, chat_id: $chat_id, business_connection_id: $business_connection_id, message_thread_id: $message_thread_id, caption: $caption, parse_mode: $parse_mode, caption_entities: $caption_entities, has_spoiler: false, disable_notification: $disable_notification, protect_content: $protect_content, reply_parameters: $reply_parameters, reply_markup: $reply_markup, token: $token, forgot: $forgot, answer: $answer, reply_to_message_id: $reply_to_message_id, allow_sending_without_reply: $allow_sending_without_reply), |
||
1247 | fileTypes::AUDIO => request::sendAudio(audio: $file_id, chat_id: $chat_id, business_connection_id: $business_connection_id, message_thread_id: $message_thread_id, caption: $caption, parse_mode: $parse_mode, caption_entities: $caption_entities, disable_notification: $disable_notification, protect_content: $protect_content, reply_parameters: $reply_parameters, reply_markup: $reply_markup, token: $token, forgot: $forgot, answer: $answer, reply_to_message_id: $reply_to_message_id, allow_sending_without_reply: $allow_sending_without_reply), |
||
1248 | fileTypes::PHOTO, fileTypes::PROFILE_PHOTO => request::sendPhoto(photo: $file_id, chat_id: $chat_id, business_connection_id: $business_connection_id, message_thread_id: $message_thread_id, caption: $caption, parse_mode: $parse_mode, caption_entities: $caption_entities, has_spoiler: false, disable_notification: $disable_notification, protect_content: $protect_content, reply_parameters: $reply_parameters, reply_markup: $reply_markup, token: $token, forgot: $forgot, answer: $answer, reply_to_message_id: $reply_to_message_id, allow_sending_without_reply: $allow_sending_without_reply), |
||
1249 | fileTypes::VOICE => request::sendVoice(voice: $file_id, chat_id: $chat_id, business_connection_id: $business_connection_id, message_thread_id: $message_thread_id, caption: $caption, parse_mode: $parse_mode, caption_entities: $caption_entities, disable_notification: $disable_notification, protect_content: $protect_content, reply_parameters: $reply_parameters, reply_markup: $reply_markup, token: $token, forgot: $forgot, answer: $answer, reply_to_message_id: $reply_to_message_id, allow_sending_without_reply: $allow_sending_without_reply), |
||
1250 | fileTypes::STICKER => request::sendSticker(sticker: $file_id, chat_id: $chat_id, business_connection_id: $business_connection_id, message_thread_id: $message_thread_id, disable_notification: $disable_notification, protect_content: $protect_content, reply_parameters: $reply_parameters, reply_markup: $reply_markup, token: $token, forgot: $forgot, answer: $answer, reply_to_message_id: $reply_to_message_id, allow_sending_without_reply: $allow_sending_without_reply), |
||
1251 | fileTypes::DOCUMENT => request::sendDocument(document: $file_id, chat_id: $chat_id, business_connection_id: $business_connection_id, message_thread_id: $message_thread_id, caption: $caption, parse_mode: $parse_mode, caption_entities: $caption_entities, disable_notification: $disable_notification, protect_content: $protect_content, reply_parameters: $reply_parameters, reply_markup: $reply_markup, token: $token, forgot: $forgot, answer: $answer, reply_to_message_id: $reply_to_message_id, allow_sending_without_reply: $allow_sending_without_reply), |
||
1252 | default => false, |
||
1253 | }; |
||
1254 | } |
||
1255 | } |
||
1256 |