mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 07:14:50 +00:00
Pyrofork: fix derps
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
c96bfe8d08
commit
c3a61812ef
1 changed files with 3 additions and 16 deletions
|
|
@ -21,7 +21,7 @@ from datetime import datetime
|
||||||
from typing import Union, List, Optional
|
from typing import Union, List, Optional
|
||||||
|
|
||||||
import pyrogram
|
import pyrogram
|
||||||
from pyrogram import types, enums, raw
|
from pyrogram import types, enums
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
@ -113,27 +113,14 @@ class CopyMessage:
|
||||||
"""
|
"""
|
||||||
message: types.Message = await self.get_messages(from_chat_id, message_id)
|
message: types.Message = await self.get_messages(from_chat_id, message_id)
|
||||||
|
|
||||||
reply_to = None
|
|
||||||
if reply_to_message_id or message_thread_id:
|
|
||||||
reply_to_msg_id = None
|
|
||||||
top_msg_id = None
|
|
||||||
if message_thread_id:
|
|
||||||
if not reply_to_message_id:
|
|
||||||
reply_to_msg_id = message_thread_id
|
|
||||||
else:
|
|
||||||
reply_to_msg_id = reply_to_message_id
|
|
||||||
top_msg_id = message_thread_id
|
|
||||||
else:
|
|
||||||
reply_to_msg_id = reply_to_message_id
|
|
||||||
reply_to = raw.types.InputReplyToMessage(reply_to_msg_id=reply_to_msg_id, top_msg_id=top_msg_id)
|
|
||||||
|
|
||||||
return await message.copy(
|
return await message.copy(
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
caption=caption,
|
caption=caption,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
caption_entities=caption_entities,
|
caption_entities=caption_entities,
|
||||||
disable_notification=disable_notification,
|
disable_notification=disable_notification,
|
||||||
reply_to=reply_to,
|
message_thread_id=message_thread_id,
|
||||||
|
reply_to_message_id=reply_to_message_id,
|
||||||
schedule_date=schedule_date,
|
schedule_date=schedule_date,
|
||||||
protect_content=protect_content,
|
protect_content=protect_content,
|
||||||
reply_markup=reply_markup
|
reply_markup=reply_markup
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue