LonamiWebs / Telethon

Pure Python 3 MTProto API Telegram client library, for bots too!

Home Page:https://docs.telethon.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How can I know if an event is protected?

development-soft opened this issue · comments

Description

How can I know in advance that a message is protected? What methods or properties are there for this?

@client.on(events.NewMessage)
async def my_event_handler(event):
    if event.is_protected: # ????
        print("ok") 

Checklist

  • This is a documentation problem, not a question or a bug report.
  • I have searched for this issue before posting it and there isn't a duplicate.

I do not know what that is. But you can print(event.message.stringify()) to see everything in the message, and find the difference between protected media and not.