mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
pyrofork: utils: Don't append to messages to messages_with_replies if reply_to_msg_id is None
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
dc05f2b791
commit
bce191c3fd
1 changed files with 6 additions and 1 deletions
|
|
@ -123,7 +123,12 @@ async def parse_messages(
|
|||
messages_with_replies = {
|
||||
i.id: i.reply_to.reply_to_msg_id
|
||||
for i in messages.messages
|
||||
if not isinstance(i, raw.types.MessageEmpty) and i.reply_to and isinstance(i.reply_to, raw.types.MessageReplyHeader)
|
||||
if (
|
||||
not isinstance(i, raw.types.MessageEmpty)
|
||||
and i.reply_to
|
||||
and isinstance(i.reply_to, raw.types.MessageReplyHeader)
|
||||
and i.reply_to.reply_to_msg_id is not None
|
||||
)
|
||||
}
|
||||
|
||||
message_reply_to_story = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue