mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Added a method to the Message object
This commit is contained in:
parent
f583072edc
commit
40403f9d1a
1 changed files with 2 additions and 3 deletions
|
@ -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"<Message containing {type(self.content)}>"
|
||||
|
||||
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):
|
||||
|
|
Loading…
Reference in a new issue