mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Update message aliases
This commit is contained in:
parent
9738efce08
commit
f01fb1d58e
1 changed files with 151 additions and 4 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
from typing import TYPE_CHECKING, List, Optional, Union
|
||||
from typing import TYPE_CHECKING, Any, List, Optional, Union
|
||||
|
||||
from pydantic import Field
|
||||
|
||||
|
|
@ -332,6 +332,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendAnimation:
|
||||
"""
|
||||
Reply with animation
|
||||
|
|
@ -363,6 +364,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_animation(
|
||||
|
|
@ -378,6 +381,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendAnimation:
|
||||
"""
|
||||
Answer with animation
|
||||
|
|
@ -407,6 +411,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_audio(
|
||||
|
|
@ -423,6 +429,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendAudio:
|
||||
"""
|
||||
Reply with audio
|
||||
|
|
@ -454,6 +461,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_audio(
|
||||
|
|
@ -469,6 +478,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendAudio:
|
||||
"""
|
||||
Answer with audio
|
||||
|
|
@ -498,6 +508,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_contact(
|
||||
|
|
@ -511,6 +523,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendContact:
|
||||
"""
|
||||
Reply with contact
|
||||
|
|
@ -536,6 +549,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_contact(
|
||||
|
|
@ -548,6 +563,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendContact:
|
||||
"""
|
||||
Answer with contact
|
||||
|
|
@ -571,6 +587,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_document(
|
||||
|
|
@ -584,6 +602,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendDocument:
|
||||
"""
|
||||
Reply with document
|
||||
|
|
@ -609,6 +628,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_document(
|
||||
|
|
@ -621,6 +642,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendDocument:
|
||||
"""
|
||||
Answer with document
|
||||
|
|
@ -644,6 +666,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_game(
|
||||
|
|
@ -652,6 +676,7 @@ class Message(TelegramObject):
|
|||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendGame:
|
||||
"""
|
||||
Reply with game
|
||||
|
|
@ -671,6 +696,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_game(
|
||||
|
|
@ -678,6 +705,7 @@ class Message(TelegramObject):
|
|||
game_short_name: str,
|
||||
disable_notification: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendGame:
|
||||
"""
|
||||
Answer with game
|
||||
|
|
@ -695,6 +723,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_invoice(
|
||||
|
|
@ -724,6 +754,7 @@ class Message(TelegramObject):
|
|||
protect_content: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendInvoice:
|
||||
"""
|
||||
Reply with invoice
|
||||
|
|
@ -785,6 +816,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_invoice(
|
||||
|
|
@ -813,6 +846,7 @@ class Message(TelegramObject):
|
|||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendInvoice:
|
||||
"""
|
||||
Answer with invoice
|
||||
|
|
@ -872,6 +906,8 @@ class Message(TelegramObject):
|
|||
protect_content=protect_content,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_location(
|
||||
|
|
@ -884,6 +920,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendLocation:
|
||||
"""
|
||||
Reply with location
|
||||
|
|
@ -907,6 +944,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_location(
|
||||
|
|
@ -918,6 +957,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendLocation:
|
||||
"""
|
||||
Answer with location
|
||||
|
|
@ -939,6 +979,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_media_group(
|
||||
|
|
@ -946,6 +988,7 @@ class Message(TelegramObject):
|
|||
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]],
|
||||
disable_notification: Optional[bool] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendMediaGroup:
|
||||
"""
|
||||
Reply with media group
|
||||
|
|
@ -963,12 +1006,15 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_media_group(
|
||||
self,
|
||||
media: List[Union[InputMediaAudio, InputMediaDocument, InputMediaPhoto, InputMediaVideo]],
|
||||
disable_notification: Optional[bool] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendMediaGroup:
|
||||
"""
|
||||
Answer with media group
|
||||
|
|
@ -984,6 +1030,8 @@ class Message(TelegramObject):
|
|||
media=media,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply(
|
||||
|
|
@ -996,6 +1044,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendMessage:
|
||||
"""
|
||||
Reply with text message
|
||||
|
|
@ -1019,6 +1068,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer(
|
||||
|
|
@ -1030,6 +1081,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendMessage:
|
||||
"""
|
||||
Answer with text message
|
||||
|
|
@ -1051,6 +1103,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_photo(
|
||||
|
|
@ -1063,6 +1117,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendPhoto:
|
||||
"""
|
||||
Reply with photo
|
||||
|
|
@ -1086,6 +1141,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_photo(
|
||||
|
|
@ -1097,6 +1154,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendPhoto:
|
||||
"""
|
||||
Answer with photo
|
||||
|
|
@ -1118,6 +1176,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_poll(
|
||||
|
|
@ -1138,6 +1198,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendPoll:
|
||||
"""
|
||||
Reply with poll
|
||||
|
|
@ -1177,6 +1238,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_poll(
|
||||
|
|
@ -1196,6 +1259,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendPoll:
|
||||
"""
|
||||
Answer with poll
|
||||
|
|
@ -1233,6 +1297,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_dice(
|
||||
|
|
@ -1243,6 +1309,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendDice:
|
||||
"""
|
||||
Reply with dice
|
||||
|
|
@ -1262,6 +1329,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_dice(
|
||||
|
|
@ -1271,6 +1340,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendDice:
|
||||
"""
|
||||
Answer with dice
|
||||
|
|
@ -1288,6 +1358,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_sticker(
|
||||
|
|
@ -1298,6 +1370,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendSticker:
|
||||
"""
|
||||
Reply with sticker
|
||||
|
|
@ -1317,6 +1390,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_sticker(
|
||||
|
|
@ -1326,6 +1401,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendSticker:
|
||||
"""
|
||||
Answer with sticker
|
||||
|
|
@ -1343,6 +1419,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_venue(
|
||||
|
|
@ -1358,6 +1436,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendVenue:
|
||||
"""
|
||||
Reply with venue
|
||||
|
|
@ -1387,6 +1466,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_venue(
|
||||
|
|
@ -1401,6 +1482,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendVenue:
|
||||
"""
|
||||
Answer with venue
|
||||
|
|
@ -1428,6 +1510,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_video(
|
||||
|
|
@ -1445,6 +1529,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendVideo:
|
||||
"""
|
||||
Reply with video
|
||||
|
|
@ -1478,6 +1563,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_video(
|
||||
|
|
@ -1494,6 +1581,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendVideo:
|
||||
"""
|
||||
Answer with video
|
||||
|
|
@ -1525,6 +1613,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_video_note(
|
||||
|
|
@ -1538,6 +1628,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendVideoNote:
|
||||
"""
|
||||
Reply wit video note
|
||||
|
|
@ -1563,6 +1654,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_video_note(
|
||||
|
|
@ -1575,6 +1668,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendVideoNote:
|
||||
"""
|
||||
Answer wit video note
|
||||
|
|
@ -1598,6 +1692,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def reply_voice(
|
||||
|
|
@ -1611,6 +1707,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendVoice:
|
||||
"""
|
||||
Reply with voice
|
||||
|
|
@ -1636,6 +1733,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=self.message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def answer_voice(
|
||||
|
|
@ -1648,6 +1747,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> SendVoice:
|
||||
"""
|
||||
Answer with voice
|
||||
|
|
@ -1671,6 +1771,8 @@ class Message(TelegramObject):
|
|||
disable_notification=disable_notification,
|
||||
reply_to_message_id=None,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def send_copy(
|
||||
|
|
@ -1679,6 +1781,8 @@ class Message(TelegramObject):
|
|||
disable_notification: Optional[bool] = None,
|
||||
reply_to_message_id: Optional[int] = None,
|
||||
reply_markup: Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, None] = None,
|
||||
allow_sending_without_reply: Optional[bool] = None,
|
||||
message_thread_id: Optional[int] = None,
|
||||
) -> Union[
|
||||
SendAnimation,
|
||||
SendAudio,
|
||||
|
|
@ -1710,6 +1814,7 @@ class Message(TelegramObject):
|
|||
:param disable_notification:
|
||||
:param reply_to_message_id:
|
||||
:param reply_markup:
|
||||
:param message_thread_id:
|
||||
:return:
|
||||
"""
|
||||
from ..methods import (
|
||||
|
|
@ -1734,6 +1839,8 @@ class Message(TelegramObject):
|
|||
"reply_markup": reply_markup or self.reply_markup,
|
||||
"disable_notification": disable_notification,
|
||||
"reply_to_message_id": reply_to_message_id,
|
||||
"message_thread_id": message_thread_id,
|
||||
"allow_sending_without_reply": allow_sending_without_reply,
|
||||
}
|
||||
text = self.text or self.caption
|
||||
entities = self.entities or self.caption_entities
|
||||
|
|
@ -1817,6 +1924,7 @@ class Message(TelegramObject):
|
|||
reply_markup: Optional[
|
||||
Union[InlineKeyboardMarkup, ReplyKeyboardMarkup, ReplyKeyboardRemove, ForceReply]
|
||||
] = None,
|
||||
**kwargs: Any,
|
||||
) -> CopyMessage:
|
||||
"""
|
||||
Copy message
|
||||
|
|
@ -1844,6 +1952,8 @@ class Message(TelegramObject):
|
|||
reply_to_message_id=reply_to_message_id,
|
||||
allow_sending_without_reply=allow_sending_without_reply,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def edit_text(
|
||||
|
|
@ -1853,6 +1963,7 @@ class Message(TelegramObject):
|
|||
entities: Optional[List[MessageEntity]] = None,
|
||||
disable_web_page_preview: Optional[bool] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> EditMessageText:
|
||||
from ..methods import EditMessageText
|
||||
|
||||
|
|
@ -1864,6 +1975,8 @@ class Message(TelegramObject):
|
|||
entities=entities,
|
||||
disable_web_page_preview=disable_web_page_preview,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def forward(
|
||||
|
|
@ -1871,6 +1984,7 @@ class Message(TelegramObject):
|
|||
chat_id: Union[int, str],
|
||||
disable_notification: Optional[bool] = None,
|
||||
protect_content: Optional[bool] = None,
|
||||
**kwargs: Any,
|
||||
) -> ForwardMessage:
|
||||
from ..methods import ForwardMessage
|
||||
|
||||
|
|
@ -1880,12 +1994,15 @@ class Message(TelegramObject):
|
|||
message_id=self.message_id,
|
||||
disable_notification=disable_notification,
|
||||
protect_content=protect_content,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def edit_media(
|
||||
self,
|
||||
media: InputMedia,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> EditMessageMedia:
|
||||
from ..methods import EditMessageMedia
|
||||
|
||||
|
|
@ -1894,11 +2011,14 @@ class Message(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
message_id=self.message_id,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def edit_reply_markup(
|
||||
self,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> EditMessageReplyMarkup:
|
||||
from ..methods import EditMessageReplyMarkup
|
||||
|
||||
|
|
@ -1906,6 +2026,8 @@ class Message(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
message_id=self.message_id,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def delete_reply_markup(self) -> EditMessageReplyMarkup:
|
||||
|
|
@ -1919,6 +2041,7 @@ class Message(TelegramObject):
|
|||
heading: Optional[int] = None,
|
||||
proximity_alert_radius: Optional[int] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> EditMessageLiveLocation:
|
||||
from ..methods import EditMessageLiveLocation
|
||||
|
||||
|
|
@ -1931,11 +2054,14 @@ class Message(TelegramObject):
|
|||
heading=heading,
|
||||
proximity_alert_radius=proximity_alert_radius,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def stop_live_location(
|
||||
self,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> StopMessageLiveLocation:
|
||||
from ..methods import StopMessageLiveLocation
|
||||
|
||||
|
|
@ -1943,6 +2069,8 @@ class Message(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
message_id=self.message_id,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def edit_caption(
|
||||
|
|
@ -1951,6 +2079,7 @@ class Message(TelegramObject):
|
|||
parse_mode: Optional[str] = UNSET,
|
||||
caption_entities: Optional[List[MessageEntity]] = None,
|
||||
reply_markup: Optional[InlineKeyboardMarkup] = None,
|
||||
**kwargs: Any,
|
||||
) -> EditMessageCaption:
|
||||
from ..methods import EditMessageCaption
|
||||
|
||||
|
|
@ -1961,16 +2090,27 @@ class Message(TelegramObject):
|
|||
parse_mode=parse_mode,
|
||||
caption_entities=caption_entities,
|
||||
reply_markup=reply_markup,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def delete(self) -> DeleteMessage:
|
||||
def delete(
|
||||
self,
|
||||
**kwargs: Any,
|
||||
) -> DeleteMessage:
|
||||
from ..methods import DeleteMessage
|
||||
|
||||
return DeleteMessage(chat_id=self.chat.id, message_id=self.message_id)
|
||||
return DeleteMessage(
|
||||
chat_id=self.chat.id,
|
||||
message_id=self.message_id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def pin(
|
||||
self,
|
||||
disable_notification: Optional[bool] = None,
|
||||
**kwargs: Any,
|
||||
) -> PinChatMessage:
|
||||
from ..methods import PinChatMessage
|
||||
|
||||
|
|
@ -1978,14 +2118,21 @@ class Message(TelegramObject):
|
|||
chat_id=self.chat.id,
|
||||
message_id=self.message_id,
|
||||
disable_notification=disable_notification,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def unpin(self) -> UnpinChatMessage:
|
||||
def unpin(
|
||||
self,
|
||||
**kwargs: Any,
|
||||
) -> UnpinChatMessage:
|
||||
from ..methods import UnpinChatMessage
|
||||
|
||||
return UnpinChatMessage(
|
||||
chat_id=self.chat.id,
|
||||
message_id=self.message_id,
|
||||
message_thread_id=self.message_thread_id if self.is_topic_message else None,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def get_url(self, force_private: bool = False) -> Optional[str]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue