From 03a17dd8dbd9b5081113341a142c340694635b34 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sat, 23 Jun 2018 14:24:31 +0200 Subject: [PATCH] Rename reply_text() to reply() Is shorter and looks nicer. When more methods like reply_audio(), reply_photo(), etc. will be implemented, I can consider adding reply_text() back again, maybe. --- pyrogram/client/types/message.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pyrogram/client/types/message.py b/pyrogram/client/types/message.py index 43eaba2a..8f677a2d 100644 --- a/pyrogram/client/types/message.py +++ b/pyrogram/client/types/message.py @@ -311,14 +311,14 @@ class Message(Object): self.command = command self.reply_markup = reply_markup - def reply_text(self, - text: str, - quote: bool = None, - parse_mode: str = "", - disable_web_page_preview: bool = None, - disable_notification: bool = None, - reply_to_message_id: int = None, - reply_markup=None): + def reply(self, + text: str, + quote: bool = None, + parse_mode: str = "", + disable_web_page_preview: bool = None, + disable_notification: bool = None, + reply_to_message_id: int = None, + reply_markup=None): """Use this method as a shortcut for: .. code-block:: python @@ -510,7 +510,7 @@ class Message(Object): Returns: - The result of *request_callback_answer()* in case of inline callback button clicks. - - The result of *reply_text()* in case of normal button clicks. + - The result of *reply()* in case of normal button clicks. - A string in case the inline button is an URL, switch_inline_query or switch_inline_query_current_chat button. @@ -522,7 +522,7 @@ class Message(Object): if quote is None: quote = self.chat.type != "private" - return self.reply_text(x, quote=quote) + return self.reply(x, quote=quote) elif isinstance(self.reply_markup, InlineKeyboardMarkup): if isinstance(x, int) and y is None: try: