Search code examples
pythontelegrampyrogram

Why Program does not see the message?


the program does not see the message if there is a premium emoji or quote.I want to accept the message and forward it if there is a keyword there

my code

type python
from pyrogram import Client,filters
client = Client("my_account", api_id, api_hash) 
@client.on_message(filters.channel & filters.chat(channels))
async def my_handler(client, message):
    print(message)

print(messanges)

 "_": "Message",
    "id": 309,
    "sender_chat": {
        "_": "Chat",
        "id": --------,
        "type": "ChatType.CHANNEL",
        "is_verified": false,
        "is_restricted": false,
        "is_creator": false,
        "is_scam": false,
        "is_fake": false,
        "title": "test",
        "username": "-------",
        "has_protected_content": false
    },
    "date": "2024-04-12 17:57:43",
    "chat": {
        "_": "Chat",
        "id": -------,
        "type": "ChatType.CHANNEL",
        "is_verified": false,
        "is_restricted": false,
        "is_creator": false,
        "is_scam": false,
        "is_fake": false,
        "title": "-------",
        "username": "-------",
        "has_protected_content": false
    },
    "forward_from_chat": {
        "_": "Chat",
        "id": --------,
        "type": "ChatType.CHANNEL",
        "is_verified": false,
        "is_restricted": false,
        "is_creator": false,
        "is_scam": false,
        "is_fake": false,
        "title": "-------",
        "username": "-------",
        "photo": {
            "_": "ChatPhoto",
            "small_file_id": "AQADAgADKdIxG9-bCEgAEAIAAzSnBNwW____ow5QrQzS_tIABB4E",
            "small_photo_unique_id": "AgADKdIxG9-bCEg",
            "big_file_id": "AQADAgADKdIxG9-bCEgAEAMAAzSnBNwW____ow5QrQzS_tIABB4E",
            "big_photo_unique_id": "AgADKdIxG9-bCEg"
        },
        "dc_id": 2,
        "has_protected_content": false
    },
    "forward_from_message_id": 14845,
    "forward_date": "2024-04-03 13:29:22",
    "mentioned": false,
    "scheduled": false,
    "from_scheduled": false,
    "has_protected_content": false,
    "views": 1,
    "forwards": 0,
    "outgoing": true
}

if premium emoji or quote. where is the text ?!

replaced ID on -------

I tried to do it on telehon, it turned out only on pyrogram plain text without premium smiles and quotes


Solution

  • This is already a known issue of pyrogram: link

    You should consider using a maintained fork of it. The maintainer of pyrogram no longer maintain the library.