mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
pyrofork: Add reply_to_monoforum_id parameter to supported send_*
Signed-off-by: wulan17 <wulan17@komodos.id>
This commit is contained in:
parent
bd5603a6a7
commit
a2f3a6a27b
19 changed files with 159 additions and 2 deletions
|
|
@ -719,6 +719,7 @@ def pyrogram_api():
|
||||||
InputMessageContent
|
InputMessageContent
|
||||||
InputMessageContent
|
InputMessageContent
|
||||||
InputReplyToMessage
|
InputReplyToMessage
|
||||||
|
InputReplyToMonoforum
|
||||||
InputReplyToStory
|
InputReplyToStory
|
||||||
InputTextMessageContent
|
InputTextMessageContent
|
||||||
InputLocationMessageContent
|
InputLocationMessageContent
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ class SendAnimation:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
|
|
@ -145,6 +146,11 @@ class SendAnimation:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -226,6 +232,7 @@ class SendAnimation:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ class SendAudio:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
message_effect_id: int = None,
|
message_effect_id: int = None,
|
||||||
|
|
@ -137,6 +138,11 @@ class SendAudio:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -216,6 +222,7 @@ class SendAudio:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ class SendCachedMedia:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
|
|
@ -104,6 +105,11 @@ class SendCachedMedia:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -144,6 +150,7 @@ class SendCachedMedia:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ class SendContact:
|
||||||
business_connection_id: str = None,
|
business_connection_id: str = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_chat_id: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
|
|
@ -95,6 +96,11 @@ class SendContact:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
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,6 +145,7 @@ class SendContact:
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ class SendDice:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
|
|
@ -91,6 +92,11 @@ class SendDice:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -143,6 +149,7 @@ class SendDice:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -48,6 +48,7 @@ class SendDocument:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
message_effect_id: int = None,
|
message_effect_id: int = None,
|
||||||
|
|
@ -129,6 +130,11 @@ class SendDocument:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -203,6 +209,7 @@ class SendDocument:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ class SendLocation:
|
||||||
business_connection_id: str = None,
|
business_connection_id: str = None,
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_chat_id: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
|
|
@ -89,6 +90,11 @@ class SendLocation:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
|
@ -136,6 +142,7 @@ class SendLocation:
|
||||||
reply_to_message_id=reply_to_message_id,
|
reply_to_message_id=reply_to_message_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ class SendMediaGroup:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
|
|
@ -104,6 +105,11 @@ class SendMediaGroup:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -180,6 +186,7 @@ class SendMediaGroup:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ class SendMessage:
|
||||||
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,
|
reply_to_chat_id: int = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
|
|
@ -100,6 +101,11 @@ class SendMessage:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of the monoforum.
|
||||||
|
for reply to message from a monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -174,6 +180,7 @@ class SendMessage:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ class SendPhoto:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
|
|
@ -122,6 +123,11 @@ class SendPhoto:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -203,6 +209,7 @@ class SendPhoto:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,7 @@ class SendSticker:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
|
|
@ -104,6 +105,11 @@ class SendSticker:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -178,6 +184,7 @@ class SendSticker:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,7 @@ class SendVideo:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
cover: Union[str, BinaryIO] = None,
|
cover: Union[str, BinaryIO] = None,
|
||||||
|
|
@ -151,6 +152,11 @@ class SendVideo:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -251,6 +257,7 @@ class SendVideo:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ class SendVideoNote:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
parse_mode: Optional["enums.ParseMode"] = None,
|
parse_mode: Optional["enums.ParseMode"] = None,
|
||||||
|
|
@ -118,6 +119,11 @@ class SendVideoNote:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -197,6 +203,7 @@ class SendVideoNote:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ class SendVoice:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
|
|
@ -121,6 +122,11 @@ class SendVoice:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -189,6 +195,7 @@ class SendVoice:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ class SendWebPage:
|
||||||
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: Union[int, str] = None,
|
reply_to_chat_id: Union[int, str] = None,
|
||||||
|
reply_to_monoforum_id: Union[int, str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
schedule_date: datetime = None,
|
schedule_date: datetime = None,
|
||||||
|
|
@ -106,6 +107,11 @@ class SendWebPage:
|
||||||
for reply to message from another chat.
|
for reply to message from another chat.
|
||||||
You can also use chat public link in form of *t.me/<username>* (str).
|
You can also use chat public link in form of *t.me/<username>* (str).
|
||||||
|
|
||||||
|
reply_to_monoforum_id (``int`` | ``str``, *optional*):
|
||||||
|
Unique identifier for the target user of monoforum.
|
||||||
|
for reply to message from monoforum.
|
||||||
|
for channel administrators only.
|
||||||
|
|
||||||
quote_text (``str``, *optional*):
|
quote_text (``str``, *optional*):
|
||||||
Text to quote.
|
Text to quote.
|
||||||
for reply_to_message only.
|
for reply_to_message only.
|
||||||
|
|
@ -161,6 +167,7 @@ class SendWebPage:
|
||||||
reply_to_story_id=reply_to_story_id,
|
reply_to_story_id=reply_to_story_id,
|
||||||
message_thread_id=message_thread_id,
|
message_thread_id=message_thread_id,
|
||||||
reply_to_chat_id=reply_to_chat_id,
|
reply_to_chat_id=reply_to_chat_id,
|
||||||
|
reply_to_monoforum_id=reply_to_monoforum_id,
|
||||||
quote_text=quote_text,
|
quote_text=quote_text,
|
||||||
quote_entities=quote_entities,
|
quote_entities=quote_entities,
|
||||||
parse_mode=parse_mode
|
parse_mode=parse_mode
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
from .input_message_content import InputMessageContent
|
from .input_message_content import InputMessageContent
|
||||||
from .input_reply_to_message import InputReplyToMessage
|
from .input_reply_to_message import InputReplyToMessage
|
||||||
|
from .input_reply_to_monoforum import InputReplyToMonoforum
|
||||||
from .input_reply_to_story import InputReplyToStory
|
from .input_reply_to_story import InputReplyToStory
|
||||||
from .input_text_message_content import InputTextMessageContent
|
from .input_text_message_content import InputTextMessageContent
|
||||||
from .input_location_message_content import InputLocationMessageContent
|
from .input_location_message_content import InputLocationMessageContent
|
||||||
|
|
@ -29,6 +30,7 @@ from .input_invoice_message_content import InputInvoiceMessageContent
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"InputMessageContent",
|
"InputMessageContent",
|
||||||
"InputReplyToMessage",
|
"InputReplyToMessage",
|
||||||
|
"InputReplyToMonoforum",
|
||||||
"InputReplyToStory",
|
"InputReplyToStory",
|
||||||
"InputTextMessageContent",
|
"InputTextMessageContent",
|
||||||
"InputLocationMessageContent",
|
"InputLocationMessageContent",
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
# Pyrofork - Telegram MTProto API Client Library for Python
|
||||||
|
# Copyright (C) 2022-present Mayuri-Chan <https://github.com/Mayuri-Chan>
|
||||||
|
#
|
||||||
|
# This file is part of Pyrofork.
|
||||||
|
#
|
||||||
|
# Pyrofork is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU Lesser General Public License as published
|
||||||
|
# by the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# Pyrofork is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU Lesser General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Lesser General Public License
|
||||||
|
# along with Pyrofork. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
from pyrogram import raw
|
||||||
|
from ..object import Object
|
||||||
|
|
||||||
|
|
||||||
|
class InputReplyToMonoforum(Object):
|
||||||
|
"""Contains information about a target replied monoforum.
|
||||||
|
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
monoforum_peer (:obj:`~pyrogram.raw.types.InputPeer`):
|
||||||
|
An InputPeer.
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(
|
||||||
|
self, *,
|
||||||
|
monoforum_peer: "raw.types.InputPeer"
|
||||||
|
):
|
||||||
|
super().__init__()
|
||||||
|
|
||||||
|
self.monoforum_peer = monoforum_peer
|
||||||
|
|
||||||
|
def write(self):
|
||||||
|
return raw.types.InputReplyToMonoForum(
|
||||||
|
monoforum_peer_id=self.monoforum_peer
|
||||||
|
).write()
|
||||||
|
|
@ -487,6 +487,7 @@ async def get_reply_to(
|
||||||
reply_to_message_id: int = None,
|
reply_to_message_id: int = None,
|
||||||
reply_to_story_id: int = None,
|
reply_to_story_id: int = None,
|
||||||
message_thread_id: int = None,
|
message_thread_id: int = None,
|
||||||
|
reply_to_monoforum_id: Union[int,str] = None,
|
||||||
reply_to_chat_id: Union[int,str] = None,
|
reply_to_chat_id: Union[int,str] = None,
|
||||||
quote_text: str = None,
|
quote_text: str = None,
|
||||||
quote_entities: List["types.MessageEntity"] = None,
|
quote_entities: List["types.MessageEntity"] = None,
|
||||||
|
|
@ -495,7 +496,12 @@ async def get_reply_to(
|
||||||
):
|
):
|
||||||
reply_to = None
|
reply_to = None
|
||||||
reply_to_chat = None
|
reply_to_chat = None
|
||||||
if reply_to_message_id or message_thread_id:
|
if reply_to_monoforum_id:
|
||||||
|
peer = await client.resolve_peer(reply_to_monoforum_id)
|
||||||
|
reply_to = types.InputReplyToMonoforum(
|
||||||
|
monoforum_peer=peer
|
||||||
|
)
|
||||||
|
elif reply_to_message_id or message_thread_id:
|
||||||
text, entities = (await parse_text_entities(client, quote_text, parse_mode, quote_entities)).values()
|
text, entities = (await parse_text_entities(client, quote_text, parse_mode, quote_entities)).values()
|
||||||
if reply_to_chat_id is not None:
|
if reply_to_chat_id is not None:
|
||||||
reply_to_chat = await client.resolve_peer(reply_to_chat_id)
|
reply_to_chat = await client.resolve_peer(reply_to_chat_id)
|
||||||
|
|
@ -507,7 +513,7 @@ async def get_reply_to(
|
||||||
quote_entities=entities,
|
quote_entities=entities,
|
||||||
quote_offset=quote_offset,
|
quote_offset=quote_offset,
|
||||||
)
|
)
|
||||||
if reply_to_story_id:
|
elif reply_to_story_id:
|
||||||
peer = await client.resolve_peer(chat_id)
|
peer = await client.resolve_peer(chat_id)
|
||||||
reply_to = types.InputReplyToStory(
|
reply_to = types.InputReplyToStory(
|
||||||
peer=peer,
|
peer=peer,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue