From 41f99514db1fff939cc972005cd03941718ecf99 Mon Sep 17 00:00:00 2001 From: Oleg A Date: Sun, 8 Nov 2020 14:08:39 +0300 Subject: [PATCH] AIOG-T-93 added allow_sending_without_reply to send_voice shortcuts --- aiogram/types/message.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/aiogram/types/message.py b/aiogram/types/message.py index 4c20298a..8f15a1bd 100644 --- a/aiogram/types/message.py +++ b/aiogram/types/message.py @@ -738,6 +738,7 @@ class Message(base.TelegramObject): parse_mode: typing.Optional[base.String] = None, duration: typing.Optional[base.Integer] = None, disable_notification: typing.Optional[base.Boolean] = None, + allow_sending_without_reply: typing.Optional[base.Boolean] = None, reply_markup: typing.Union[ InlineKeyboardMarkup, ReplyKeyboardMarkup, @@ -758,21 +759,32 @@ class Message(base.TelegramObject): :param voice: Audio file to send. :type voice: :obj:`typing.Union[base.InputFile, base.String]` + :param caption: Voice message caption, 0-200 characters :type caption: :obj:`typing.Optional[base.String]` + :param parse_mode: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption :type parse_mode: :obj:`typing.Optional[base.String]` + :param duration: Duration of the voice message in seconds :type duration: :obj:`typing.Optional[base.Integer]` + :param disable_notification: Sends the message silently. Users will receive a notification with no sound. :type disable_notification: :obj:`typing.Optional[base.Boolean]` + + :param allow_sending_without_reply: Pass True, if the message should be sent + even if the specified replied-to message is not found + :type allow_sending_without_reply: :obj:`typing.Optional[base.Boolean]` + :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user :type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]` + :param reply: fill 'reply_to_message_id' :type reply: :obj:`base.Boolean` + :return: On success, the sent Message is returned. :rtype: :obj:`types.Message` """ @@ -784,6 +796,7 @@ class Message(base.TelegramObject): duration=duration, disable_notification=disable_notification, reply_to_message_id=self.message_id if reply else None, + allow_sending_without_reply=allow_sending_without_reply, reply_markup=reply_markup, ) @@ -1654,6 +1667,7 @@ class Message(base.TelegramObject): parse_mode: typing.Optional[base.String] = None, duration: typing.Optional[base.Integer] = None, disable_notification: typing.Optional[base.Boolean] = None, + allow_sending_without_reply: typing.Optional[base.Boolean] = None, reply_markup: typing.Union[ InlineKeyboardMarkup, ReplyKeyboardMarkup, @@ -1674,21 +1688,32 @@ class Message(base.TelegramObject): :param voice: Audio file to send. :type voice: :obj:`typing.Union[base.InputFile, base.String]` + :param caption: Voice message caption, 0-200 characters :type caption: :obj:`typing.Optional[base.String]` + :param parse_mode: Send Markdown or HTML, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in the media caption :type parse_mode: :obj:`typing.Optional[base.String]` + :param duration: Duration of the voice message in seconds :type duration: :obj:`typing.Optional[base.Integer]` + :param disable_notification: Sends the message silently. Users will receive a notification with no sound. :type disable_notification: :obj:`typing.Optional[base.Boolean]` + + :param allow_sending_without_reply: Pass True, if the message should be sent + even if the specified replied-to message is not found + :type allow_sending_without_reply: :obj:`typing.Optional[base.Boolean]` + :param reply_markup: Additional interface options. A JSON-serialized object for an inline keyboard, custom reply keyboard, instructions to remove reply keyboard or to force a reply from the user :type reply_markup: :obj:`typing.Union[types.InlineKeyboardMarkup, types.ReplyKeyboardMarkup, types.ReplyKeyboardRemove, types.ForceReply, None]` + :param reply: fill 'reply_to_message_id' :type reply: :obj:`base.Boolean` + :return: On success, the sent Message is returned. :rtype: :obj:`types.Message` """ @@ -1700,6 +1725,7 @@ class Message(base.TelegramObject): duration=duration, disable_notification=disable_notification, reply_to_message_id=self.message_id if reply else None, + allow_sending_without_reply=allow_sending_without_reply, reply_markup=reply_markup, )