mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
Add chat_id-like convenience properties to the events
This commit is contained in:
@@ -258,6 +258,14 @@ class NewMessage(EventBuilder):
|
||||
|
||||
return self._sender
|
||||
|
||||
@property
|
||||
def sender_id(self):
|
||||
"""
|
||||
Returns the marked sender integer ID, if present.
|
||||
"""
|
||||
if self.input_sender:
|
||||
return utils.get_peer_id(self._input_sender)
|
||||
|
||||
@property
|
||||
def text(self):
|
||||
"""
|
||||
|
Reference in New Issue
Block a user