mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +00:00
Pyrofork: Add support to reply message in another chat
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
1903ddbfbd
commit
e3e84d91e8
19 changed files with 453 additions and 34 deletions
|
|
@ -50,6 +50,7 @@ class SendAnimation:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -129,6 +130,10 @@ class SendAnimation:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -191,8 +196,16 @@ class SendAnimation:
|
||||||
file = None
|
file = None
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ class SendAudio:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -122,6 +123,10 @@ class SendAudio:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -185,8 +190,16 @@ class SendAudio:
|
||||||
file = None
|
file = None
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ class SendCachedMedia:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -94,6 +95,10 @@ class SendCachedMedia:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -118,8 +123,16 @@ class SendCachedMedia:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ class SendContact:
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -79,6 +80,10 @@ class SendContact:
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -103,8 +108,16 @@ class SendContact:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
|
|
||||||
r = await self.invoke(
|
r = await self.invoke(
|
||||||
raw.functions.messages.SendMedia(
|
raw.functions.messages.SendMedia(
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ class SendDice:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -75,6 +76,10 @@ class SendDice:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -106,8 +111,16 @@ class SendDice:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ class SendDocument:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -114,6 +115,10 @@ class SendDocument:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -172,8 +177,16 @@ class SendDocument:
|
||||||
file = None
|
file = None
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ class SendLocation:
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -68,6 +69,10 @@ class SendLocation:
|
||||||
Unique identifier for the target message thread (topic) of the forum.
|
Unique identifier for the target message thread (topic) of the forum.
|
||||||
for forum supergroups only.
|
for forum supergroups only.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message
|
If the message is a reply, ID of the original message
|
||||||
|
|
||||||
|
|
@ -95,8 +100,16 @@ class SendLocation:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
|
|
||||||
r = await self.invoke(
|
r = await self.invoke(
|
||||||
raw.functions.messages.SendMedia(
|
raw.functions.messages.SendMedia(
|
||||||
|
|
|
||||||
|
|
@ -49,6 +49,7 @@ class SendMediaGroup:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -80,6 +81,10 @@ class SendMediaGroup:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -110,8 +115,16 @@ class SendMediaGroup:
|
||||||
multi_media = []
|
multi_media = []
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@ class SendMessage:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -84,6 +85,10 @@ class SendMessage:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -139,8 +144,16 @@ class SendMessage:
|
||||||
message, entities = (await utils.parse_text_entities(self, text, parse_mode, entities)).values()
|
message, entities = (await utils.parse_text_entities(self, text, parse_mode, entities)).values()
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class SendPhoto:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -105,6 +106,10 @@ class SendPhoto:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -163,8 +168,16 @@ class SendPhoto:
|
||||||
file = None
|
file = None
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ class SendPoll:
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
|
|
@ -124,6 +125,10 @@ class SendPoll:
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -145,8 +150,16 @@ class SendPoll:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
|
|
||||||
solution, solution_entities = (await utils.parse_text_entities(
|
solution, solution_entities = (await utils.parse_text_entities(
|
||||||
self, explanation, explanation_parse_mode, explanation_entities
|
self, explanation, explanation_parse_mode, explanation_entities
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ class SendSticker:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -83,6 +84,10 @@ class SendSticker:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -136,8 +141,16 @@ class SendSticker:
|
||||||
file = None
|
file = None
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ class SendVenue:
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -88,6 +89,10 @@ class SendVenue:
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message
|
If the message is a reply, ID of the original message
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -114,8 +119,16 @@ class SendVenue:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
|
|
||||||
r = await self.invoke(
|
r = await self.invoke(
|
||||||
raw.functions.messages.SendMedia(
|
raw.functions.messages.SendMedia(
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,7 @@ class SendVideo:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -135,6 +136,10 @@ class SendVideo:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -196,8 +201,16 @@ class SendVideo:
|
||||||
file = None
|
file = None
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ class SendVideoNote:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -97,6 +98,10 @@ class SendVideoNote:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -150,8 +155,16 @@ class SendVideoNote:
|
||||||
file = None
|
file = None
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class SendVoice:
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -103,6 +104,10 @@ class SendVoice:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -158,8 +163,16 @@ class SendVoice:
|
||||||
file = None
|
file = None
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -32,13 +32,13 @@ class SendWebPage:
|
||||||
text: str = "",
|
text: str = "",
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
entities: List["types.MessageEntity"] = None,
|
entities: List["types.MessageEntity"] = None,
|
||||||
disable_web_page_preview: bool = None,
|
|
||||||
large_media: bool = None,
|
large_media: bool = None,
|
||||||
invert_media: bool = None,
|
invert_media: bool = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
|
reply_to_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -92,6 +92,10 @@ class SendWebPage:
|
||||||
reply_to_story_id (``int``, *optional*):
|
reply_to_story_id (``int``, *optional*):
|
||||||
Unique identifier for the target story.
|
Unique identifier for the target story.
|
||||||
|
|
||||||
|
reply_to_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier for the origin chat.
|
||||||
|
for reply to message from another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -119,8 +123,16 @@ class SendWebPage:
|
||||||
message, entities = (await utils.parse_text_entities(self, text, parse_mode, entities)).values()
|
message, entities = (await utils.parse_text_entities(self, text, parse_mode, entities)).values()
|
||||||
|
|
||||||
reply_to = None
|
reply_to = None
|
||||||
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_message_id or message_thread_id:
|
||||||
reply_to = types.InputReplyToMessage(reply_to_message_id=reply_to_message_id, message_thread_id=message_thread_id, quote_text=quote_text)
|
if reply_to_chat_id is not None:
|
||||||
|
reply_to_chat = await self.resolve_peer(reply_to_chat_id)
|
||||||
|
reply_to = types.InputReplyToMessage(
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_chat=reply_to_chat,
|
||||||
|
quote_text=quote_text
|
||||||
|
)
|
||||||
if reply_to_story_id:
|
if reply_to_story_id:
|
||||||
user_id = await self.resolve_peer(chat_id)
|
user_id = await self.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
reply_to = types.InputReplyToStory(user_id=user_id, story_id=reply_to_story_id)
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
|
|
||||||
from pyrogram import raw
|
from pyrogram import raw
|
||||||
from ..object import Object
|
from ..object import Object
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
|
|
||||||
class InputReplyToMessage(Object):
|
class InputReplyToMessage(Object):
|
||||||
|
|
@ -37,12 +38,17 @@ class InputReplyToMessage(Object):
|
||||||
self, *,
|
self, *,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
|
reply_to_chat: Union[
|
||||||
|
"raw.types.InputPeerChannel",
|
||||||
|
"raw.types.InputPeerUser"
|
||||||
|
] = None,
|
||||||
quote_text: str = None
|
quote_text: str = None
|
||||||
):
|
):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
self.reply_to_message_id = reply_to_message_id
|
self.reply_to_message_id = reply_to_message_id
|
||||||
self.message_thread_id = message_thread_id
|
self.message_thread_id = message_thread_id
|
||||||
|
self.reply_to_chat = reply_to_chat
|
||||||
self.quote_text = quote_text
|
self.quote_text = quote_text
|
||||||
|
|
||||||
def write(self):
|
def write(self):
|
||||||
|
|
@ -60,6 +66,7 @@ class InputReplyToMessage(Object):
|
||||||
return raw.types.InputReplyToMessage(
|
return raw.types.InputReplyToMessage(
|
||||||
reply_to_msg_id=reply_to_msg_id,
|
reply_to_msg_id=reply_to_msg_id,
|
||||||
top_msg_id=top_msg_id,
|
top_msg_id=top_msg_id,
|
||||||
|
reply_to_peer_id=self.reply_to_chat,
|
||||||
quote_text=self.quote_text
|
quote_text=self.quote_text
|
||||||
).write()
|
).write()
|
||||||
return None
|
return None
|
||||||
|
|
|
||||||
|
|
@ -1097,6 +1097,7 @@ class Message(Object, Update):
|
||||||
disable_web_page_preview: bool = None,
|
disable_web_page_preview: bool = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -1147,6 +1148,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -1178,8 +1183,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_message(
|
return await self._client.send_message(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
text=text,
|
text=text,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
entities=entities,
|
entities=entities,
|
||||||
|
|
@ -1187,6 +1198,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
schedule_date=schedule_date,
|
schedule_date=schedule_date,
|
||||||
protect_content=protect_content,
|
protect_content=protect_content,
|
||||||
|
|
@ -1216,6 +1228,7 @@ class Message(Object, Update):
|
||||||
"types.ForceReply"
|
"types.ForceReply"
|
||||||
] = None,
|
] = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
progress: Callable = None,
|
progress: Callable = None,
|
||||||
progress_args: tuple = ()
|
progress_args: tuple = ()
|
||||||
|
|
@ -1287,6 +1300,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -1335,8 +1352,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_animation(
|
return await self._client.send_animation(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
animation=animation,
|
animation=animation,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
|
|
@ -1350,6 +1373,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
|
|
@ -1370,6 +1394,7 @@ class Message(Object, Update):
|
||||||
file_name: str = None,
|
file_name: str = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
|
@ -1444,6 +1469,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -1492,8 +1521,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_audio(
|
return await self._client.send_audio(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
audio=audio,
|
audio=audio,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
|
|
@ -1506,6 +1541,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
|
|
@ -1521,6 +1557,7 @@ class Message(Object, Update):
|
||||||
caption_entities: List["types.MessageEntity"] = None,
|
caption_entities: List["types.MessageEntity"] = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
|
@ -1572,6 +1609,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -1596,8 +1637,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_cached_media(
|
return await self._client.send_cached_media(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
file_id=file_id,
|
file_id=file_id,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
|
|
@ -1605,6 +1652,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup
|
||||||
)
|
)
|
||||||
|
|
@ -1655,6 +1703,7 @@ class Message(Object, Update):
|
||||||
vcard: str = "",
|
vcard: str = "",
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
|
@ -1705,6 +1754,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -1729,8 +1782,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_contact(
|
return await self._client.send_contact(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
phone_number=phone_number,
|
phone_number=phone_number,
|
||||||
first_name=first_name,
|
first_name=first_name,
|
||||||
last_name=last_name,
|
last_name=last_name,
|
||||||
|
|
@ -1738,6 +1797,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup
|
||||||
)
|
)
|
||||||
|
|
@ -1754,6 +1814,7 @@ class Message(Object, Update):
|
||||||
force_document: bool = None,
|
force_document: bool = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
|
|
@ -1825,6 +1886,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -1876,8 +1941,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_document(
|
return await self._client.send_document(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
document=document,
|
document=document,
|
||||||
thumb=thumb,
|
thumb=thumb,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
|
|
@ -1888,6 +1959,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
schedule_date=schedule_date,
|
schedule_date=schedule_date,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
|
|
@ -2051,6 +2123,7 @@ class Message(Object, Update):
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
|
@ -2095,6 +2168,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message
|
If the message is a reply, ID of the original message
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -2119,13 +2196,20 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_location(
|
return await self._client.send_location(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
latitude=latitude,
|
latitude=latitude,
|
||||||
longitude=longitude,
|
longitude=longitude,
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup
|
||||||
)
|
)
|
||||||
|
|
@ -2141,6 +2225,7 @@ class Message(Object, Update):
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None
|
quote_text: str = None
|
||||||
) -> List["types.Message"]:
|
) -> List["types.Message"]:
|
||||||
"""Bound method *reply_media_group* of :obj:`~pyrogram.types.Message`.
|
"""Bound method *reply_media_group* of :obj:`~pyrogram.types.Message`.
|
||||||
|
|
@ -2177,6 +2262,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -2198,12 +2287,19 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_media_group(
|
return await self._client.send_media_group(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
media=media,
|
media=media,
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text
|
quote_text=quote_text
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -2218,6 +2314,7 @@ class Message(Object, Update):
|
||||||
ttl_seconds: int = None,
|
ttl_seconds: int = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
|
@ -2281,6 +2378,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -2329,8 +2430,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_photo(
|
return await self._client.send_photo(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
photo=photo,
|
photo=photo,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
|
|
@ -2340,6 +2447,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
|
|
@ -2364,6 +2472,7 @@ class Message(Object, Update):
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
|
|
@ -2452,6 +2561,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -2479,8 +2592,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_poll(
|
return await self._client.send_poll(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
question=question,
|
question=question,
|
||||||
options=options,
|
options=options,
|
||||||
is_anonymous=is_anonymous,
|
is_anonymous=is_anonymous,
|
||||||
|
|
@ -2497,6 +2616,7 @@ class Message(Object, Update):
|
||||||
protect_content=protect_content,
|
protect_content=protect_content,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
schedule_date=schedule_date,
|
schedule_date=schedule_date,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup
|
||||||
|
|
@ -2508,6 +2628,7 @@ class Message(Object, Update):
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
|
@ -2553,6 +2674,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -2601,12 +2726,19 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_sticker(
|
return await self._client.send_sticker(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
sticker=sticker,
|
sticker=sticker,
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
|
|
@ -2624,6 +2756,7 @@ class Message(Object, Update):
|
||||||
foursquare_type: str = "",
|
foursquare_type: str = "",
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
|
@ -2683,6 +2816,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message
|
If the message is a reply, ID of the original message
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -2707,8 +2844,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_venue(
|
return await self._client.send_venue(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
latitude=latitude,
|
latitude=latitude,
|
||||||
longitude=longitude,
|
longitude=longitude,
|
||||||
title=title,
|
title=title,
|
||||||
|
|
@ -2718,6 +2861,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup
|
||||||
)
|
)
|
||||||
|
|
@ -2739,6 +2883,7 @@ class Message(Object, Update):
|
||||||
supports_streaming: bool = True,
|
supports_streaming: bool = True,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
|
@ -2824,6 +2969,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -2872,8 +3021,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_video(
|
return await self._client.send_video(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
video=video,
|
video=video,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
|
|
@ -2889,6 +3044,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
|
|
@ -2904,6 +3060,7 @@ class Message(Object, Update):
|
||||||
thumb: Union[str, BinaryIO] = None,
|
thumb: Union[str, BinaryIO] = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
|
@ -2961,6 +3118,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message
|
If the message is a reply, ID of the original message
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -3009,8 +3170,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_video_note(
|
return await self._client.send_video_note(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
video_note=video_note,
|
video_note=video_note,
|
||||||
duration=duration,
|
duration=duration,
|
||||||
length=length,
|
length=length,
|
||||||
|
|
@ -3018,6 +3185,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
|
|
@ -3034,6 +3202,7 @@ class Message(Object, Update):
|
||||||
duration: int = 0,
|
duration: int = 0,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
reply_markup: Union[
|
reply_markup: Union[
|
||||||
"types.InlineKeyboardMarkup",
|
"types.InlineKeyboardMarkup",
|
||||||
|
|
@ -3092,6 +3261,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message
|
If the message is a reply, ID of the original message
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -3140,8 +3313,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_voice(
|
return await self._client.send_voice(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
voice=voice,
|
voice=voice,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
|
|
@ -3150,6 +3329,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
reply_markup=reply_markup,
|
reply_markup=reply_markup,
|
||||||
progress=progress,
|
progress=progress,
|
||||||
|
|
@ -3166,6 +3346,7 @@ class Message(Object, Update):
|
||||||
invert_media: bool = None,
|
invert_media: bool = None,
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
|
reply_in_chat_id: int = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
protect_content: bool = None,
|
protect_content: bool = None,
|
||||||
|
|
@ -3220,6 +3401,10 @@ class Message(Object, Update):
|
||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
reply_in_chat_id (``int``, *optional*):
|
||||||
|
Unique identifier of target chat.
|
||||||
|
for reply message in another chat.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -3251,8 +3436,14 @@ class Message(Object, Update):
|
||||||
if self.message_thread_id:
|
if self.message_thread_id:
|
||||||
message_thread_id = self.message_thread_id
|
message_thread_id = self.message_thread_id
|
||||||
|
|
||||||
|
chat_id = self.chat.id
|
||||||
|
reply_to_chat_id = None
|
||||||
|
if reply_in_chat_id is not None:
|
||||||
|
chat_id = reply_in_chat_id
|
||||||
|
reply_to_chat_id = self.chat.id
|
||||||
|
|
||||||
return await self._client.send_web_page(
|
return await self._client.send_web_page(
|
||||||
chat_id=self.chat.id,
|
chat_id=chat_id,
|
||||||
url=url,
|
url=url,
|
||||||
text=text,
|
text=text,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
|
|
@ -3262,6 +3453,7 @@ class Message(Object, Update):
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
schedule_date=schedule_date,
|
schedule_date=schedule_date,
|
||||||
protect_content=protect_content,
|
protect_content=protect_content,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue