Add async/await on tl.custom

This commit is contained in:
Lonami Exo
2018-06-10 20:29:57 +02:00
parent 1bde72d375
commit d462b04a9c
4 changed files with 78 additions and 68 deletions

View File

@@ -88,12 +88,13 @@ class Dialog:
)
self.is_channel = isinstance(self.entity, types.Channel)
def send_message(self, *args, **kwargs):
async def send_message(self, *args, **kwargs):
"""
Sends a message to this dialog. This is just a wrapper around
``client.send_message(dialog.input_entity, *args, **kwargs)``.
"""
return self._client.send_message(self.input_entity, *args, **kwargs)
return await self._client.send_message(
self.input_entity, *args, **kwargs)
def to_dict(self):
return {