AIOG-T-93 added allow_sending_without_reply to send_sticker shortcuts

This commit is contained in:
Oleg A 2020-11-08 14:01:15 +03:00
parent 1f4a863f71
commit 35ad58a348

View file

@ -1020,6 +1020,7 @@ class Message(base.TelegramObject):
self,
sticker: typing.Union[base.InputFile, base.String],
disable_notification: typing.Optional[base.Boolean] = None,
allow_sending_without_reply: typing.Optional[base.Boolean] = None,
reply_markup: typing.Union[
InlineKeyboardMarkup,
ReplyKeyboardMarkup,
@ -1036,14 +1037,22 @@ class Message(base.TelegramObject):
:param sticker: Sticker to send.
:type sticker: :obj:`typing.Union[base.InputFile, base.String]`
: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`
"""
@ -1052,6 +1061,7 @@ class Message(base.TelegramObject):
sticker=sticker,
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,
)
@ -1993,6 +2003,7 @@ class Message(base.TelegramObject):
self,
sticker: typing.Union[base.InputFile, base.String],
disable_notification: typing.Optional[base.Boolean] = None,
allow_sending_without_reply: typing.Optional[base.Boolean] = None,
reply_markup: typing.Union[
InlineKeyboardMarkup,
ReplyKeyboardMarkup,
@ -2009,14 +2020,22 @@ class Message(base.TelegramObject):
:param sticker: Sticker to send.
:type sticker: :obj:`typing.Union[base.InputFile, base.String]`
: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`
"""
@ -2025,6 +2044,7 @@ class Message(base.TelegramObject):
sticker=sticker,
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,
)