@@ -812,14 +812,17 @@ public function sendAnimation(
812
812
* On success, the sent Message is returned.
813
813
* Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
814
814
*
815
- * @param int|string $chatId chat_id or @channel_name
815
+ * @param int|string $chatId chat_id or @channel_name
816
816
* @param \CURLFile|string $voice
817
- * @param int|null $duration
818
- * @param int|null $replyToMessageId
817
+ * @param string $caption Voice message caption, 0-1024 characters after entities parsing
818
+ * @param int|null $duration
819
+ * @param int|null $replyToMessageId
819
820
* @param Types\ReplyKeyboardMarkup|Types\ReplyKeyboardHide|Types\ForceReply|
820
821
* Types\ReplyKeyboardRemove|null $replyMarkup
821
- * @param bool $disableNotification
822
- * @param string|null $parseMode
822
+ * @param bool $disableNotification
823
+ * @param bool $allowSendingWithoutReply Pass True, if the message should be sent even if the specified
824
+ * replied-to message is not found
825
+ * @param string|null $parseMode
823
826
*
824
827
* @return \TelegramBot\Api\Types\Message
825
828
* @throws \TelegramBot\Api\InvalidArgumentException
@@ -828,19 +831,23 @@ public function sendAnimation(
828
831
public function sendVoice (
829
832
$ chatId ,
830
833
$ voice ,
834
+ $ caption = null ,
831
835
$ duration = null ,
832
836
$ replyToMessageId = null ,
833
837
$ replyMarkup = null ,
834
838
$ disableNotification = false ,
839
+ $ allowSendingWithoutReply = false ,
835
840
$ parseMode = null
836
841
) {
837
842
return Message::fromResponse ($ this ->call ('sendVoice ' , [
838
843
'chat_id ' => $ chatId ,
839
844
'voice ' => $ voice ,
845
+ 'caption ' => $ caption ,
840
846
'duration ' => $ duration ,
841
847
'reply_to_message_id ' => $ replyToMessageId ,
842
848
'reply_markup ' => is_null ($ replyMarkup ) ? $ replyMarkup : $ replyMarkup ->toJson (),
843
849
'disable_notification ' => (bool )$ disableNotification ,
850
+ 'allow_sending_without_reply ' => $ allowSendingWithoutReply ,
844
851
'parse_mode ' => $ parseMode
845
852
]));
846
853
}
@@ -1943,28 +1950,38 @@ public function sendPoll(
1943
1950
* On success, the sent Message is returned. (Yes, we're aware of the “proper” singular of die.
1944
1951
* But it's awkward, and we decided to help it change. One dice at a time!)
1945
1952
*
1946
- * @param $chatId string|int Unique identifier for the target chat or username of the target channel
1953
+ * @param $chatId string|int Unique identifier for the target chat or username of the target channel
1947
1954
* (in the format @channelusername)
1955
+ * @param $emoji string Emoji on which the dice throw animation is based. Currently, must be one of “🎲”,
1956
+ * “🎯”, “🏀”, “⚽”, or “🎰”. Dice can have values 1-6 for “🎲” and “🎯”, values 1-5 for “🏀” and “⚽”, and
1957
+ * values 1-64 for “🎰”. Defaults to “🎲
1948
1958
* @param bool $disableNotification Sends the message silently. Users will receive a notification with no sound.
1949
1959
* @param null $replyToMessageId If the message is a reply, ID of the original message
1960
+ * @param bool $$allowSendingWithoutReply Pass True, if the message should be sent even if the specified replied-to
1961
+ * message is not found,
1950
1962
* @param null $replyMarkup Additional interface options. A JSON-serialized object for an inline keyboard,
1951
1963
* custom reply keyboard, instructions to remove reply
1952
1964
* keyboard or to force a reply from the user.
1965
+ *
1953
1966
* @return bool|Message
1954
1967
* @throws Exception
1955
1968
* @throws HttpException
1956
1969
* @throws InvalidJsonException
1957
1970
*/
1958
1971
public function sendDice (
1959
1972
$ chatId ,
1973
+ $ emoji ,
1960
1974
$ disableNotification = false ,
1961
1975
$ replyToMessageId = null ,
1976
+ $ allowSendingWithoutReply = false ,
1962
1977
$ replyMarkup = null
1963
1978
) {
1964
1979
return Message::fromResponse ($ this ->call ('sendDice ' , [
1965
1980
'chat_id ' => $ chatId ,
1981
+ 'emoji ' => $ emoji ,
1966
1982
'disable_notification ' => (bool ) $ disableNotification ,
1967
1983
'reply_to_message_id ' => (int ) $ replyToMessageId ,
1984
+ 'allow_sending_without_reply ' => (bool ) $ allowSendingWithoutReply ,
1968
1985
'reply_markup ' => $ replyMarkup === null ? $ replyMarkup : $ replyMarkup ->toJson (),
1969
1986
]));
1970
1987
}
0 commit comments