@@ -812,14 +812,17 @@ public function sendAnimation(
812812 * On success, the sent Message is returned.
813813 * Bots can currently send voice messages of up to 50 MB in size, this limit may be changed in the future.
814814 *
815- * @param int|string $chatId chat_id or @channel_name
815+ * @param int|string $chatId chat_id or @channel_name
816816 * @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
819820 * @param Types\ReplyKeyboardMarkup|Types\ReplyKeyboardHide|Types\ForceReply|
820821 * 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
823826 *
824827 * @return \TelegramBot\Api\Types\Message
825828 * @throws \TelegramBot\Api\InvalidArgumentException
@@ -828,19 +831,23 @@ public function sendAnimation(
828831 public function sendVoice (
829832 $ chatId ,
830833 $ voice ,
834+ $ caption = null ,
831835 $ duration = null ,
832836 $ replyToMessageId = null ,
833837 $ replyMarkup = null ,
834838 $ disableNotification = false ,
839+ $ allowSendingWithoutReply = false ,
835840 $ parseMode = null
836841 ) {
837842 return Message::fromResponse ($ this ->call ('sendVoice ' , [
838843 'chat_id ' => $ chatId ,
839844 'voice ' => $ voice ,
845+ 'caption ' => $ caption ,
840846 'duration ' => $ duration ,
841847 'reply_to_message_id ' => $ replyToMessageId ,
842848 'reply_markup ' => is_null ($ replyMarkup ) ? $ replyMarkup : $ replyMarkup ->toJson (),
843849 'disable_notification ' => (bool )$ disableNotification ,
850+ 'allow_sending_without_reply ' => $ allowSendingWithoutReply ,
844851 'parse_mode ' => $ parseMode
845852 ]));
846853 }
@@ -1943,28 +1950,38 @@ public function sendPoll(
19431950 * On success, the sent Message is returned. (Yes, we're aware of the “proper” singular of die.
19441951 * But it's awkward, and we decided to help it change. One dice at a time!)
19451952 *
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
19471954 * (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 “🎲
19481958 * @param bool $disableNotification Sends the message silently. Users will receive a notification with no sound.
19491959 * @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,
19501962 * @param null $replyMarkup Additional interface options. A JSON-serialized object for an inline keyboard,
19511963 * custom reply keyboard, instructions to remove reply
19521964 * keyboard or to force a reply from the user.
1965+ *
19531966 * @return bool|Message
19541967 * @throws Exception
19551968 * @throws HttpException
19561969 * @throws InvalidJsonException
19571970 */
19581971 public function sendDice (
19591972 $ chatId ,
1973+ $ emoji ,
19601974 $ disableNotification = false ,
19611975 $ replyToMessageId = null ,
1976+ $ allowSendingWithoutReply = false ,
19621977 $ replyMarkup = null
19631978 ) {
19641979 return Message::fromResponse ($ this ->call ('sendDice ' , [
19651980 'chat_id ' => $ chatId ,
1981+ 'emoji ' => $ emoji ,
19661982 'disable_notification ' => (bool ) $ disableNotification ,
19671983 'reply_to_message_id ' => (int ) $ replyToMessageId ,
1984+ 'allow_sending_without_reply ' => (bool ) $ allowSendingWithoutReply ,
19681985 'reply_markup ' => $ replyMarkup === null ? $ replyMarkup : $ replyMarkup ->toJson (),
19691986 ]));
19701987 }
0 commit comments