From 40403f9d1adefea752f76534287b90ec039a19aa Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 9 Mar 2017 12:52:06 +0100 Subject: [PATCH] Added a method to the Message object --- telegram.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/telegram.py b/telegram.py index d1a54110..cf9c2c7a 100644 --- a/telegram.py +++ b/telegram.py @@ -1,5 +1,4 @@ import asyncio - loop = asyncio.get_event_loop() import aiohttp import async_timeout @@ -343,9 +342,9 @@ class Message: else: return f"" - def reply(self, bot, text, **params): + async def reply(self, bot, text, **params): """Reply to this message.""" - self.chat.send_message(bot, text, reply_to_message_id=self.msg_id, **params) + await self.chat.send_message(bot, text, reply_to_message_id=self.msg_id, **params) class ServiceMessage: def __init__(self, msg_type, extra=None):