mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add answer method
This is the "reply" method with the name "answer" and the default argument reply=False
This commit is contained in:
parent
23d3d98813
commit
183e664a75
1 changed files with 20 additions and 0 deletions
|
|
@ -276,6 +276,26 @@ class Message(base.TelegramObject):
|
|||
return md.hlink(text, url)
|
||||
return md.link(text, url)
|
||||
|
||||
async def answer(self, text, parse_mode=None, disable_web_page_preview=None,
|
||||
disable_notification=None, reply_markup=None, reply=False) -> Message:
|
||||
"""
|
||||
Answer to this message
|
||||
|
||||
:param text: str
|
||||
:param parse_mode: str
|
||||
:param disable_web_page_preview: bool
|
||||
:param disable_notification: bool
|
||||
:param reply_markup:
|
||||
:param reply: fill 'reply_to_message_id'
|
||||
:return: :class:`aiogram.types.Message`
|
||||
"""
|
||||
return await self.bot.send_message(chat_id=self.chat.id, text=text,
|
||||
parse_mode=parse_mode,
|
||||
disable_web_page_preview=disable_web_page_preview,
|
||||
disable_notification=disable_notification,
|
||||
reply_to_message_id=self.message_id if reply else None,
|
||||
reply_markup=reply_markup)
|
||||
|
||||
async def reply(self, text, parse_mode=None, disable_web_page_preview=None,
|
||||
disable_notification=None, reply_markup=None, reply=True) -> Message:
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue