mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 07:50:32 +00:00
add allow_sending_without_reply param to Message reply aliases (#663)
This commit is contained in:
parent
0ca9f98baf
commit
7cb0ac1ee2
2 changed files with 52 additions and 0 deletions
1
CHANGES/663.misc
Normal file
1
CHANGES/663.misc
Normal file
|
|
@ -0,0 +1 @@
|
|||
add allow_sending_without_reply param to Message reply aliases
|
||||
|
|
@ -268,6 +268,7 @@ class Message(TelegramObject):
|
|||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -283,6 +284,7 @@ class Message(TelegramObject):
|
|||
:param caption:
|
||||
:param parse_mode:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -299,6 +301,7 @@ class Message(TelegramObject):
|
|||
parse_mode=parse_mode,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -356,6 +359,7 @@ class Message(TelegramObject):
|
|||
title: Optional[str] = None,
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -371,6 +375,7 @@ class Message(TelegramObject):
|
|||
:param title:
|
||||
:param thumb:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -387,6 +392,7 @@ class Message(TelegramObject):
|
|||
thumb=thumb,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -441,6 +447,7 @@ class Message(TelegramObject):
|
|||
last_name: Optional[str] = None,
|
||||
vcard: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -453,6 +460,7 @@ class Message(TelegramObject):
|
|||
:param last_name:
|
||||
:param vcard:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -466,6 +474,7 @@ class Message(TelegramObject):
|
|||
vcard=vcard,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -511,6 +520,7 @@ class Message(TelegramObject):
|
|||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -523,6 +533,7 @@ class Message(TelegramObject):
|
|||
:param caption:
|
||||
:param parse_mode:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -536,6 +547,7 @@ class Message(TelegramObject):
|
|||
parse_mode=parse_mode,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -578,6 +590,7 @@ class Message(TelegramObject):
|
|||
self,
|
||||
game_short_name: str,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
) -> SendGame:
|
||||
"""
|
||||
|
|
@ -585,6 +598,7 @@ class Message(TelegramObject):
|
|||
|
||||
:param game_short_name:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -595,6 +609,7 @@ class Message(TelegramObject):
|
|||
game_short_name=game_short_name,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -644,6 +659,7 @@ class Message(TelegramObject):
|
|||
send_email_to_provider: Optional[bool] = None,
|
||||
is_flexible: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
) -> SendInvoice:
|
||||
"""
|
||||
|
|
@ -669,6 +685,7 @@ class Message(TelegramObject):
|
|||
:param send_email_to_provider:
|
||||
:param is_flexible:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -697,6 +714,7 @@ class Message(TelegramObject):
|
|||
is_flexible=is_flexible,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -784,6 +802,7 @@ class Message(TelegramObject):
|
|||
longitude: float,
|
||||
live_period: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -795,6 +814,7 @@ class Message(TelegramObject):
|
|||
:param longitude:
|
||||
:param live_period:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -807,6 +827,7 @@ class Message(TelegramObject):
|
|||
live_period=live_period,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -846,12 +867,14 @@ class Message(TelegramObject):
|
|||
self,
|
||||
media: List[Union[InputMediaPhoto, InputMediaVideo]],
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
) -> SendMediaGroup:
|
||||
"""
|
||||
Reply with media group
|
||||
|
||||
:param media:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:return:
|
||||
"""
|
||||
from ..methods import SendMediaGroup
|
||||
|
|
@ -861,6 +884,7 @@ class Message(TelegramObject):
|
|||
media=media,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
)
|
||||
|
||||
def answer_media_group(
|
||||
|
|
@ -890,6 +914,7 @@ class Message(TelegramObject):
|
|||
parse_mode: Optional[str] = UNSET,
|
||||
disable_web_page_preview: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -901,6 +926,7 @@ class Message(TelegramObject):
|
|||
:param parse_mode:
|
||||
:param disable_web_page_preview:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -913,6 +939,7 @@ class Message(TelegramObject):
|
|||
disable_web_page_preview=disable_web_page_preview,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -954,6 +981,7 @@ class Message(TelegramObject):
|
|||
caption: Optional[str] = None,
|
||||
parse_mode: Optional[str] = UNSET,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -965,6 +993,7 @@ class Message(TelegramObject):
|
|||
:param caption:
|
||||
:param parse_mode:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -977,6 +1006,7 @@ class Message(TelegramObject):
|
|||
parse_mode=parse_mode,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -1026,6 +1056,7 @@ class Message(TelegramObject):
|
|||
close_date: Optional[Union[datetime.datetime, datetime.timedelta, int]] = None,
|
||||
is_closed: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -1045,6 +1076,7 @@ class Message(TelegramObject):
|
|||
:param close_date:
|
||||
:param is_closed:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -1065,6 +1097,7 @@ class Message(TelegramObject):
|
|||
is_closed=is_closed,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -1128,6 +1161,7 @@ class Message(TelegramObject):
|
|||
self,
|
||||
emoji: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -1137,6 +1171,7 @@ class Message(TelegramObject):
|
|||
|
||||
:param emoji:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -1147,6 +1182,7 @@ class Message(TelegramObject):
|
|||
emoji=emoji,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -1180,6 +1216,7 @@ class Message(TelegramObject):
|
|||
self,
|
||||
sticker: Union[InputFile, str],
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -1189,6 +1226,7 @@ class Message(TelegramObject):
|
|||
|
||||
:param sticker:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -1199,6 +1237,7 @@ class Message(TelegramObject):
|
|||
sticker=sticker,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -1237,6 +1276,7 @@ class Message(TelegramObject):
|
|||
foursquare_id: Optional[str] = None,
|
||||
foursquare_type: Optional[str] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -1251,6 +1291,7 @@ class Message(TelegramObject):
|
|||
:param foursquare_id:
|
||||
:param foursquare_type:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -1266,6 +1307,7 @@ class Message(TelegramObject):
|
|||
foursquare_type=foursquare_type,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -1321,6 +1363,7 @@ class Message(TelegramObject):
|
|||
parse_mode: Optional[str] = UNSET,
|
||||
supports_streaming: Optional[bool] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -1337,6 +1380,7 @@ class Message(TelegramObject):
|
|||
:param parse_mode:
|
||||
:param supports_streaming:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -1354,6 +1398,7 @@ class Message(TelegramObject):
|
|||
supports_streaming=supports_streaming,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -1411,6 +1456,7 @@ class Message(TelegramObject):
|
|||
length: Optional[int] = None,
|
||||
thumb: Optional[Union[InputFile, str]] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -1423,6 +1469,7 @@ class Message(TelegramObject):
|
|||
:param length:
|
||||
:param thumb:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -1436,6 +1483,7 @@ class Message(TelegramObject):
|
|||
thumb=thumb,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
@ -1481,6 +1529,7 @@ class Message(TelegramObject):
|
|||
parse_mode: Optional[str] = UNSET,
|
||||
duration: Optional[int] = None,
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
|
|
@ -1493,6 +1542,7 @@ class Message(TelegramObject):
|
|||
:param parse_mode:
|
||||
:param duration:
|
||||
:param disable_notification:
|
||||
:param allow_sending_without_reply:
|
||||
:param reply_markup:
|
||||
:return:
|
||||
"""
|
||||
|
|
@ -1506,6 +1556,7 @@ class Message(TelegramObject):
|
|||
duration=duration,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue