Skip to content
120 changes: 120 additions & 0 deletions telegram/_bot.py

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions telegram/_chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -1225,6 +1225,7 @@ async def send_message(
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
entities: Union[List["MessageEntity"], Tuple["MessageEntity", ...]] = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1253,6 +1254,7 @@ async def send_message(
allow_sending_without_reply=allow_sending_without_reply,
entities=entities,
protect_content=protect_content,
message_thread_id=message_thread_id,
read_timeout=read_timeout,
write_timeout=write_timeout,
connect_timeout=connect_timeout,
Expand All @@ -1269,6 +1271,7 @@ async def send_media_group(
reply_to_message_id: int = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = 20,
Expand Down Expand Up @@ -1301,6 +1304,7 @@ async def send_media_group(
api_kwargs=api_kwargs,
allow_sending_without_reply=allow_sending_without_reply,
protect_content=protect_content,
message_thread_id=message_thread_id,
caption=caption,
parse_mode=parse_mode,
caption_entities=caption_entities,
Expand Down Expand Up @@ -1350,6 +1354,7 @@ async def send_photo(
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
caption_entities: Union[List["MessageEntity"], Tuple["MessageEntity", ...]] = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
filename: str = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1380,6 +1385,7 @@ async def send_photo(
caption_entities=caption_entities,
filename=filename,
protect_content=protect_content,
message_thread_id=message_thread_id,
read_timeout=read_timeout,
write_timeout=write_timeout,
connect_timeout=connect_timeout,
Expand All @@ -1398,6 +1404,7 @@ async def send_contact(
vcard: str = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
contact: "Contact" = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1433,6 +1440,7 @@ async def send_contact(
api_kwargs=api_kwargs,
allow_sending_without_reply=allow_sending_without_reply,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_audio(
Expand All @@ -1450,6 +1458,7 @@ async def send_audio(
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
caption_entities: Union[List["MessageEntity"], Tuple["MessageEntity", ...]] = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
filename: str = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1484,6 +1493,7 @@ async def send_audio(
caption_entities=caption_entities,
filename=filename,
protect_content=protect_content,
message_thread_id=message_thread_id,
read_timeout=read_timeout,
write_timeout=write_timeout,
connect_timeout=connect_timeout,
Expand All @@ -1504,6 +1514,7 @@ async def send_document(
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
caption_entities: Union[List["MessageEntity"], Tuple["MessageEntity", ...]] = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
filename: str = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1541,6 +1552,7 @@ async def send_document(
allow_sending_without_reply=allow_sending_without_reply,
caption_entities=caption_entities,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_dice(
Expand All @@ -1551,6 +1563,7 @@ async def send_dice(
emoji: str = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1581,6 +1594,7 @@ async def send_dice(
api_kwargs=api_kwargs,
allow_sending_without_reply=allow_sending_without_reply,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_game(
Expand All @@ -1591,6 +1605,7 @@ async def send_game(
reply_markup: "InlineKeyboardMarkup" = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1621,6 +1636,7 @@ async def send_game(
api_kwargs=api_kwargs,
allow_sending_without_reply=allow_sending_without_reply,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_invoice(
Expand Down Expand Up @@ -1651,6 +1667,7 @@ async def send_invoice(
max_tip_amount: int = None,
suggested_tip_amounts: List[int] = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1711,6 +1728,7 @@ async def send_invoice(
max_tip_amount=max_tip_amount,
suggested_tip_amounts=suggested_tip_amounts,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_location(
Expand All @@ -1726,6 +1744,7 @@ async def send_location(
proximity_alert_radius: int = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
location: "Location" = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1763,6 +1782,7 @@ async def send_location(
proximity_alert_radius=proximity_alert_radius,
allow_sending_without_reply=allow_sending_without_reply,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_animation(
Expand All @@ -1780,6 +1800,7 @@ async def send_animation(
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
caption_entities: Union[List["MessageEntity"], Tuple["MessageEntity", ...]] = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
filename: str = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1819,6 +1840,7 @@ async def send_animation(
caption_entities=caption_entities,
filename=filename,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_sticker(
Expand All @@ -1829,6 +1851,7 @@ async def send_sticker(
reply_markup: ReplyMarkup = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = 20,
Expand Down Expand Up @@ -1859,6 +1882,7 @@ async def send_sticker(
api_kwargs=api_kwargs,
allow_sending_without_reply=allow_sending_without_reply,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_venue(
Expand All @@ -1876,6 +1900,7 @@ async def send_venue(
google_place_type: str = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
venue: "Venue" = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1915,6 +1940,7 @@ async def send_venue(
google_place_type=google_place_type,
allow_sending_without_reply=allow_sending_without_reply,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_video(
Expand All @@ -1933,6 +1959,7 @@ async def send_video(
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
caption_entities: Union[List["MessageEntity"], Tuple["MessageEntity", ...]] = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
filename: str = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -1973,6 +2000,7 @@ async def send_video(
caption_entities=caption_entities,
filename=filename,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_video_note(
Expand All @@ -1986,6 +2014,7 @@ async def send_video_note(
thumb: FileInput = None,
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
filename: str = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -2021,6 +2050,7 @@ async def send_video_note(
allow_sending_without_reply=allow_sending_without_reply,
filename=filename,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_voice(
Expand All @@ -2035,6 +2065,7 @@ async def send_voice(
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
caption_entities: Union[List["MessageEntity"], Tuple["MessageEntity", ...]] = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
filename: str = None,
read_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -2071,6 +2102,7 @@ async def send_voice(
caption_entities=caption_entities,
filename=filename,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_poll(
Expand All @@ -2092,6 +2124,7 @@ async def send_poll(
allow_sending_without_reply: ODVInput[bool] = DEFAULT_NONE,
explanation_entities: Union[List["MessageEntity"], Tuple["MessageEntity", ...]] = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -2133,6 +2166,7 @@ async def send_poll(
allow_sending_without_reply=allow_sending_without_reply,
explanation_entities=explanation_entities,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def send_copy(
Expand All @@ -2147,6 +2181,7 @@ async def send_copy(
allow_sending_without_reply: DVInput[bool] = DEFAULT_NONE,
reply_markup: ReplyMarkup = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -2181,6 +2216,7 @@ async def send_copy(
pool_timeout=pool_timeout,
api_kwargs=api_kwargs,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def copy_message(
Expand All @@ -2195,6 +2231,7 @@ async def copy_message(
allow_sending_without_reply: DVInput[bool] = DEFAULT_NONE,
reply_markup: ReplyMarkup = None,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -2229,6 +2266,7 @@ async def copy_message(
pool_timeout=pool_timeout,
api_kwargs=api_kwargs,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def forward_from(
Expand All @@ -2237,6 +2275,7 @@ async def forward_from(
message_id: int,
disable_notification: DVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -2269,6 +2308,7 @@ async def forward_from(
pool_timeout=pool_timeout,
api_kwargs=api_kwargs,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def forward_to(
Expand All @@ -2277,6 +2317,7 @@ async def forward_to(
message_id: int,
disable_notification: DVInput[bool] = DEFAULT_NONE,
protect_content: ODVInput[bool] = DEFAULT_NONE,
message_thread_id: int = None,
*,
read_timeout: ODVInput[float] = DEFAULT_NONE,
write_timeout: ODVInput[float] = DEFAULT_NONE,
Expand Down Expand Up @@ -2309,6 +2350,7 @@ async def forward_to(
pool_timeout=pool_timeout,
api_kwargs=api_kwargs,
protect_content=protect_content,
message_thread_id=message_thread_id,
)

async def export_invite_link(
Expand Down
Loading