Use custom.Message in events

This commit is contained in:
Lonami Exo
2018-05-31 13:30:22 +02:00
parent b241d80958
commit 9e4854fcce
5 changed files with 22 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
from .common import EventBuilder, EventCommon, name_inner_event
from .. import utils
from ..tl import types, functions
from ..tl import types, functions, custom
@name_inner_event
@@ -158,6 +158,12 @@ class ChatAction(EventBuilder):
self.new_title = new_title
self.unpin = unpin
def _set_client(self, client):
super()._set_client(client)
if self.action_message:
self.action_message = custom.Message(
client, self.action_message, self._entities, None)
def respond(self, *args, **kwargs):
"""
Responds to the chat action message (not as a reply). Shorthand for