admin管理员组

文章数量:1434187

I need to differentiate between messages that are replies to a channel and comments under a channel post. I could not find any reliable way to do that and pyrogram does not give any info about whether a message is a comment or not in the Message object. Is there a way to do that? What's the exact difference between a comment and a reply to a channel's message?

I tried marking all replies to a message sent by a channel to be a comment, but a channel can send a message in a non-linked chat and when you reply to that message, it is not actually a comment.

reply_in_msg = msg.reply_to_message
is_reply_to_channel = reply_in_msg and (reply_in_msg.forward_from_chat and reply_in_msg.forward_from_chat.type == ChatType.CHANNEL)

The code block is mostly irrelevant, its what i use to determine whether a message contains a reply to a channel

What i expect: i need a way to determine whether a message is a comment or not and i have no idea how to do that

本文标签: