fix: chat_id can be string, message_id only int

This commit is contained in:
poolitzer
2021-03-01 20:52:16 +01:00
parent f462ba3d8b
commit ba04e5aaf9
5 changed files with 113 additions and 115 deletions
+42 -42
View File
@@ -263,7 +263,7 @@ class Bot(TelegramObject):
self,
endpoint: str,
data: JSONDict,
reply_to_message_id: Union[str, int] = None,
reply_to_message_id: int = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_markup: ReplyMarkup = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
@@ -418,7 +418,7 @@ class Bot(TelegramObject):
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_web_page_preview: ODVInput[bool] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -486,7 +486,7 @@ class Bot(TelegramObject):
def delete_message(
self,
chat_id: Union[str, int],
message_id: Union[str, int],
message_id: int,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
) -> bool:
@@ -532,7 +532,7 @@ class Bot(TelegramObject):
self,
chat_id: Union[int, str],
from_chat_id: Union[str, int],
message_id: Union[str, int],
message_id: int,
disable_notification: DVInput[bool] = DEFAULT_NONE,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -580,11 +580,11 @@ class Bot(TelegramObject):
@log
def send_photo(
self,
chat_id: int,
chat_id: Union[int, str],
photo: Union[FileInput, 'PhotoSize'],
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -677,7 +677,7 @@ class Bot(TelegramObject):
title: str = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -796,7 +796,7 @@ class Bot(TelegramObject):
filename: str = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -903,7 +903,7 @@ class Bot(TelegramObject):
chat_id: Union[int, str],
sticker: Union[FileInput, 'Sticker'],
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
@@ -969,7 +969,7 @@ class Bot(TelegramObject):
duration: int = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
width: int = None,
@@ -1095,7 +1095,7 @@ class Bot(TelegramObject):
duration: int = None,
length: int = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
thumb: FileInput = None,
@@ -1198,7 +1198,7 @@ class Bot(TelegramObject):
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
@@ -1311,7 +1311,7 @@ class Bot(TelegramObject):
duration: int = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -1409,7 +1409,7 @@ class Bot(TelegramObject):
Union['InputMediaAudio', 'InputMediaDocument', 'InputMediaPhoto', 'InputMediaVideo']
],
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
@@ -1466,7 +1466,7 @@ class Bot(TelegramObject):
latitude: float = None,
longitude: float = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
location: Location = None,
@@ -1559,8 +1559,8 @@ class Bot(TelegramObject):
def edit_message_live_location(
self,
chat_id: Union[str, int] = None,
message_id: Union[str, int] = None,
inline_message_id: Union[str, int] = None,
message_id: int = None,
inline_message_id: int = None,
latitude: float = None,
longitude: float = None,
location: Location = None,
@@ -1648,8 +1648,8 @@ class Bot(TelegramObject):
def stop_message_live_location(
self,
chat_id: Union[str, int] = None,
message_id: Union[str, int] = None,
inline_message_id: Union[str, int] = None,
message_id: int = None,
inline_message_id: int = None,
reply_markup: InlineKeyboardMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -1704,7 +1704,7 @@ class Bot(TelegramObject):
address: str = None,
foursquare_id: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
venue: Venue = None,
@@ -1814,7 +1814,7 @@ class Bot(TelegramObject):
first_name: str = None,
last_name: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
contact: Contact = None,
@@ -1898,7 +1898,7 @@ class Bot(TelegramObject):
chat_id: Union[int, str],
game_short_name: str,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: InlineKeyboardMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -2409,8 +2409,8 @@ class Bot(TelegramObject):
self,
text: str,
chat_id: Union[str, int] = None,
message_id: Union[str, int] = None,
inline_message_id: Union[str, int] = None,
message_id: int = None,
inline_message_id: int = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_web_page_preview: ODVInput[bool] = DEFAULT_NONE,
reply_markup: InlineKeyboardMarkup = None,
@@ -2480,8 +2480,8 @@ class Bot(TelegramObject):
def edit_message_caption(
self,
chat_id: Union[str, int] = None,
message_id: Union[str, int] = None,
inline_message_id: Union[str, int] = None,
message_id: int = None,
inline_message_id: int = None,
caption: str = None,
reply_markup: InlineKeyboardMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
@@ -2555,8 +2555,8 @@ class Bot(TelegramObject):
def edit_message_media(
self,
chat_id: Union[str, int] = None,
message_id: Union[str, int] = None,
inline_message_id: Union[str, int] = None,
message_id: int = None,
inline_message_id: int = None,
media: 'InputMedia' = None,
reply_markup: InlineKeyboardMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
@@ -2622,8 +2622,8 @@ class Bot(TelegramObject):
def edit_message_reply_markup(
self,
chat_id: Union[str, int] = None,
message_id: Union[str, int] = None,
inline_message_id: Union[str, int] = None,
message_id: int = None,
inline_message_id: int = None,
reply_markup: Optional['InlineKeyboardMarkup'] = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -3140,8 +3140,8 @@ class Bot(TelegramObject):
user_id: Union[int, str],
score: int,
chat_id: Union[str, int] = None,
message_id: Union[str, int] = None,
inline_message_id: Union[str, int] = None,
message_id: int = None,
inline_message_id: int = None,
force: bool = None,
disable_edit_message: bool = None,
timeout: ODVInput[float] = DEFAULT_NONE,
@@ -3203,8 +3203,8 @@ class Bot(TelegramObject):
self,
user_id: Union[int, str],
chat_id: Union[str, int] = None,
message_id: Union[str, int] = None,
inline_message_id: Union[str, int] = None,
message_id: int = None,
inline_message_id: int = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
) -> List[GameHighScore]:
@@ -3267,7 +3267,7 @@ class Bot(TelegramObject):
need_shipping_address: bool = None,
is_flexible: bool = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: InlineKeyboardMarkup = None,
provider_data: Union[str, object] = None,
send_phone_number_to_provider: bool = None,
@@ -3915,7 +3915,7 @@ class Bot(TelegramObject):
def pin_chat_message(
self,
chat_id: Union[str, int],
message_id: Union[str, int],
message_id: int,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -3962,7 +3962,7 @@ class Bot(TelegramObject):
chat_id: Union[str, int],
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
message_id: Union[str, int] = None,
message_id: int = None,
) -> bool:
"""
Use this method to remove a message from the list of pinned messages in a chat. If the
@@ -4446,7 +4446,7 @@ class Bot(TelegramObject):
correct_option_id: int = None,
is_closed: bool = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
explanation: str = None,
@@ -4559,7 +4559,7 @@ class Bot(TelegramObject):
def stop_poll(
self,
chat_id: Union[int, str],
message_id: Union[int, str],
message_id: int,
reply_markup: InlineKeyboardMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -4606,7 +4606,7 @@ class Bot(TelegramObject):
self,
chat_id: Union[int, str],
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
emoji: str = None,
@@ -4779,12 +4779,12 @@ class Bot(TelegramObject):
self,
chat_id: Union[int, str],
from_chat_id: Union[str, int],
message_id: Union[str, int],
message_id: int,
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Union[Tuple['MessageEntity', ...], List['MessageEntity']] = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
allow_sending_without_reply: DVInput[bool] = DEFAULT_NONE,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
+1 -1
View File
@@ -598,7 +598,7 @@ class CallbackQuery(TelegramObject):
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Union[Tuple['MessageEntity', ...], List['MessageEntity']] = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
allow_sending_without_reply: DVInput[bool] = DEFAULT_NONE,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
+23 -23
View File
@@ -496,7 +496,7 @@ class Chat(TelegramObject):
def pin_message(
self,
message_id: Union[str, int],
message_id: int,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -526,7 +526,7 @@ class Chat(TelegramObject):
self,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
message_id: Union[str, int] = None,
message_id: int = None,
) -> bool:
"""Shortcut for::
@@ -578,7 +578,7 @@ class Chat(TelegramObject):
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_web_page_preview: ODVInput[bool] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -615,7 +615,7 @@ class Chat(TelegramObject):
Union['InputMediaAudio', 'InputMediaDocument', 'InputMediaPhoto', 'InputMediaVideo']
],
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
@@ -671,7 +671,7 @@ class Chat(TelegramObject):
photo: Union[FileInput, 'PhotoSize'],
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -711,7 +711,7 @@ class Chat(TelegramObject):
first_name: str = None,
last_name: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
contact: 'Contact' = None,
@@ -752,7 +752,7 @@ class Chat(TelegramObject):
title: str = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -797,7 +797,7 @@ class Chat(TelegramObject):
filename: str = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -837,7 +837,7 @@ class Chat(TelegramObject):
def send_dice(
self,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
emoji: str = None,
@@ -869,7 +869,7 @@ class Chat(TelegramObject):
self,
game_short_name: str,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'InlineKeyboardMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -915,7 +915,7 @@ class Chat(TelegramObject):
need_shipping_address: bool = None,
is_flexible: bool = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'InlineKeyboardMarkup' = None,
provider_data: Union[str, object] = None,
send_phone_number_to_provider: bool = None,
@@ -968,7 +968,7 @@ class Chat(TelegramObject):
latitude: float = None,
longitude: float = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
location: 'Location' = None,
@@ -1016,7 +1016,7 @@ class Chat(TelegramObject):
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
@@ -1057,7 +1057,7 @@ class Chat(TelegramObject):
self,
sticker: Union[FileInput, 'Sticker'],
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
@@ -1092,7 +1092,7 @@ class Chat(TelegramObject):
address: str = None,
foursquare_id: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
venue: 'Venue' = None,
@@ -1137,7 +1137,7 @@ class Chat(TelegramObject):
duration: int = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
width: int = None,
@@ -1186,7 +1186,7 @@ class Chat(TelegramObject):
duration: int = None,
length: int = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
thumb: FileInput = None,
@@ -1225,7 +1225,7 @@ class Chat(TelegramObject):
duration: int = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -1271,7 +1271,7 @@ class Chat(TelegramObject):
correct_option_id: int = None,
is_closed: bool = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
explanation: str = None,
@@ -1317,12 +1317,12 @@ class Chat(TelegramObject):
def send_copy(
self,
from_chat_id: Union[str, int],
message_id: Union[str, int],
message_id: int,
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Union[Tuple['MessageEntity', ...], List['MessageEntity']] = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
allow_sending_without_reply: DVInput[bool] = DEFAULT_NONE,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
@@ -1356,12 +1356,12 @@ class Chat(TelegramObject):
def copy_message(
self,
chat_id: Union[int, str],
message_id: Union[str, int],
message_id: int,
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Union[Tuple['MessageEntity', ...], List['MessageEntity']] = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
allow_sending_without_reply: DVInput[bool] = DEFAULT_NONE,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
+24 -26
View File
@@ -581,9 +581,7 @@ class Message(TelegramObject):
return data
def _quote(
self, quote: Optional[bool], reply_to_message_id: Optional[Union[int, str]]
) -> Optional[Union[int, str]]:
def _quote(self, quote: Optional[bool], reply_to_message_id: Optional[int]) -> Optional[int]:
"""Modify kwargs for replying with or without quoting."""
if reply_to_message_id is not None:
return reply_to_message_id
@@ -608,7 +606,7 @@ class Message(TelegramObject):
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_web_page_preview: ODVInput[bool] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -652,7 +650,7 @@ class Message(TelegramObject):
text: str,
disable_web_page_preview: ODVInput[bool] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -706,7 +704,7 @@ class Message(TelegramObject):
text: str,
disable_web_page_preview: ODVInput[bool] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -756,7 +754,7 @@ class Message(TelegramObject):
text: str,
disable_web_page_preview: ODVInput[bool] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -807,7 +805,7 @@ class Message(TelegramObject):
Union['InputMediaAudio', 'InputMediaDocument', 'InputMediaPhoto', 'InputMediaVideo']
],
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
@@ -847,7 +845,7 @@ class Message(TelegramObject):
photo: Union[FileInput, 'PhotoSize'],
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -897,7 +895,7 @@ class Message(TelegramObject):
title: str = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -950,7 +948,7 @@ class Message(TelegramObject):
filename: str = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -1005,7 +1003,7 @@ class Message(TelegramObject):
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
@@ -1054,7 +1052,7 @@ class Message(TelegramObject):
self,
sticker: Union[FileInput, 'Sticker'],
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
@@ -1095,7 +1093,7 @@ class Message(TelegramObject):
duration: int = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
width: int = None,
@@ -1152,7 +1150,7 @@ class Message(TelegramObject):
duration: int = None,
length: int = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
thumb: FileInput = None,
@@ -1199,7 +1197,7 @@ class Message(TelegramObject):
duration: int = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -1247,7 +1245,7 @@ class Message(TelegramObject):
latitude: float = None,
longitude: float = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
location: Location = None,
@@ -1301,7 +1299,7 @@ class Message(TelegramObject):
address: str = None,
foursquare_id: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
venue: Venue = None,
@@ -1354,7 +1352,7 @@ class Message(TelegramObject):
first_name: str = None,
last_name: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
contact: Contact = None,
@@ -1405,7 +1403,7 @@ class Message(TelegramObject):
correct_option_id: int = None,
is_closed: bool = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
explanation: str = None,
@@ -1459,7 +1457,7 @@ class Message(TelegramObject):
def reply_dice(
self,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
emoji: str = None,
@@ -1524,7 +1522,7 @@ class Message(TelegramObject):
self,
game_short_name: str,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'InlineKeyboardMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -1580,7 +1578,7 @@ class Message(TelegramObject):
need_shipping_address: bool = None,
is_flexible: bool = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'InlineKeyboardMarkup' = None,
provider_data: Union[str, object] = None,
send_phone_number_to_provider: bool = None,
@@ -1675,7 +1673,7 @@ class Message(TelegramObject):
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Union[Tuple['MessageEntity', ...], List['MessageEntity']] = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
allow_sending_without_reply: DVInput[bool] = DEFAULT_NONE,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
@@ -1713,12 +1711,12 @@ class Message(TelegramObject):
def reply_copy(
self,
from_chat_id: Union[str, int],
message_id: Union[str, int],
message_id: int,
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Union[Tuple['MessageEntity', ...], List['MessageEntity']] = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
allow_sending_without_reply: DVInput[bool] = DEFAULT_NONE,
reply_markup: ReplyMarkup = None,
timeout: ODVInput[float] = DEFAULT_NONE,
+23 -23
View File
@@ -221,7 +221,7 @@ class User(TelegramObject):
def pin_message(
self,
message_id: Union[str, int],
message_id: int,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -250,7 +250,7 @@ class User(TelegramObject):
self,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
message_id: Union[str, int] = None,
message_id: int = None,
) -> bool:
"""Shortcut for::
@@ -301,7 +301,7 @@ class User(TelegramObject):
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_web_page_preview: ODVInput[bool] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -337,7 +337,7 @@ class User(TelegramObject):
photo: Union[FileInput, 'PhotoSize'],
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -377,7 +377,7 @@ class User(TelegramObject):
Union['InputMediaAudio', 'InputMediaDocument', 'InputMediaPhoto', 'InputMediaVideo']
],
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
@@ -410,7 +410,7 @@ class User(TelegramObject):
title: str = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -481,7 +481,7 @@ class User(TelegramObject):
first_name: str = None,
last_name: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
contact: 'Contact' = None,
@@ -517,7 +517,7 @@ class User(TelegramObject):
def send_dice(
self,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
emoji: str = None,
@@ -551,7 +551,7 @@ class User(TelegramObject):
filename: str = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -592,7 +592,7 @@ class User(TelegramObject):
self,
game_short_name: str,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'InlineKeyboardMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
api_kwargs: JSONDict = None,
@@ -638,7 +638,7 @@ class User(TelegramObject):
need_shipping_address: bool = None,
is_flexible: bool = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'InlineKeyboardMarkup' = None,
provider_data: Union[str, object] = None,
send_phone_number_to_provider: bool = None,
@@ -691,7 +691,7 @@ class User(TelegramObject):
latitude: float = None,
longitude: float = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
location: 'Location' = None,
@@ -739,7 +739,7 @@ class User(TelegramObject):
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
@@ -780,7 +780,7 @@ class User(TelegramObject):
self,
sticker: Union[FileInput, 'Sticker'],
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
api_kwargs: JSONDict = None,
@@ -813,7 +813,7 @@ class User(TelegramObject):
duration: int = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
width: int = None,
@@ -864,7 +864,7 @@ class User(TelegramObject):
address: str = None,
foursquare_id: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
venue: 'Venue' = None,
@@ -909,7 +909,7 @@ class User(TelegramObject):
duration: int = None,
length: int = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
thumb: FileInput = None,
@@ -948,7 +948,7 @@ class User(TelegramObject):
duration: int = None,
caption: str = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: DVInput[float] = DEFAULT_20,
parse_mode: ODVInput[str] = DEFAULT_NONE,
@@ -994,7 +994,7 @@ class User(TelegramObject):
correct_option_id: int = None,
is_closed: bool = None,
disable_notification: ODVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
explanation: str = None,
@@ -1040,12 +1040,12 @@ class User(TelegramObject):
def send_copy(
self,
from_chat_id: Union[str, int],
message_id: Union[str, int],
message_id: int,
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Union[Tuple['MessageEntity', ...], List['MessageEntity']] = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
allow_sending_without_reply: DVInput[bool] = DEFAULT_NONE,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,
@@ -1079,12 +1079,12 @@ class User(TelegramObject):
def copy_message(
self,
chat_id: Union[int, str],
message_id: Union[str, int],
message_id: int,
caption: str = None,
parse_mode: ODVInput[str] = DEFAULT_NONE,
caption_entities: Union[Tuple['MessageEntity', ...], List['MessageEntity']] = None,
disable_notification: DVInput[bool] = DEFAULT_NONE,
reply_to_message_id: Union[int, str] = None,
reply_to_message_id: int = None,
allow_sending_without_reply: DVInput[bool] = DEFAULT_NONE,
reply_markup: 'ReplyMarkup' = None,
timeout: ODVInput[float] = DEFAULT_NONE,