Skip to content

Commit d70ff98

Browse files
committed
Bot API 7.0 - Multiple Message Actions
1 parent 5677512 commit d70ff98

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/Request.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
* @method static ServerResponse logOut() Use this method to log out from the cloud Bot API server before launching the bot locally. Requires no parameters. Returns True on success.
3535
* @method static ServerResponse close() Use this method to close the bot instance before moving it from one local server to another. Requires no parameters. Returns True on success.
3636
* @method static ServerResponse forwardMessage(array $data) Use this method to forward messages of any kind. On success, the sent Message is returned.
37+
* @method static ServerResponse forwardMessages(array $data) 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.
3738
* @method static ServerResponse copyMessage(array $data) Use this method to copy messages of any kind. The method is analogous to the method forwardMessages, but the copied message doesn't have a link to the original message. Returns the MessageId of the sent message on success.
39+
* @method static ServerResponse copyMessages(array $data) 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.
3840
* @method static ServerResponse sendPhoto(array $data) Use this method to send photos. On success, the sent Message is returned.
3941
* @method static ServerResponse sendAudio(array $data) 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 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.
4042
* @method static ServerResponse sendDocument(array $data) 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.
@@ -117,6 +119,7 @@
117119
* @method static ServerResponse editMessageReplyMarkup(array $data) Use this method to edit only the reply markup of messages sent by the bot or via the bot (for inline bots). On success, if edited message is sent by the bot, the edited Message is returned, otherwise True is returned.
118120
* @method static ServerResponse stopPoll(array $data) Use this method to stop a poll which was sent by the bot. On success, the stopped Poll with the final results is returned.
119121
* @method static ServerResponse deleteMessage(array $data) Use this method to delete a message, including service messages, with certain limitations. Returns True on success.
122+
* @method static ServerResponse deleteMessages(array $data) 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.
120123
* @method static ServerResponse getStickerSet(array $data) Use this method to get a sticker set. On success, a StickerSet object is returned.
121124
* @method static ServerResponse getCustomEmojiStickers(array $data) Use this method to get information about custom emoji stickers by their identifiers. Returns an Array of Sticker objects.
122125
* @method static ServerResponse uploadStickerFile(array $data) Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times). Returns the uploaded File on success.
@@ -211,7 +214,9 @@ class Request
211214
'close',
212215
'sendMessage',
213216
'forwardMessage',
217+
'forwardMessages',
214218
'copyMessage',
219+
'copyMessages',
215220
'sendPhoto',
216221
'sendAudio',
217222
'sendDocument',
@@ -294,6 +299,7 @@ class Request
294299
'editMessageReplyMarkup',
295300
'stopPoll',
296301
'deleteMessage',
302+
'deleteMessages',
297303
'getStickerSet',
298304
'getCustomEmojiStickers',
299305
'uploadStickerFile',
@@ -935,7 +941,9 @@ private static function limitTelegramRequests(string $action, array $data = []):
935941
$limited_methods = [
936942
'sendMessage',
937943
'forwardMessage',
944+
'forwardMessages',
938945
'copyMessage',
946+
'copyMessages',
939947
'sendPhoto',
940948
'sendAudio',
941949
'sendDocument',
@@ -963,6 +971,8 @@ private static function limitTelegramRequests(string $action, array $data = []):
963971
'editMessageMedia',
964972
'editMessageReplyMarkup',
965973
'stopPoll',
974+
'deleteMessage',
975+
'deleteMessages',
966976
'setChatTitle',
967977
'setChatDescription',
968978
'setChatStickerSet',

0 commit comments

Comments
 (0)