2
0
mirror of https://github.com/pyrogram/pyrogram synced 2025-09-01 23:05:15 +00:00

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.
This commit is contained in:
Dan
2018-06-23 14:24:31 +02:00
parent d95086163e
commit 03a17dd8db

View File

@@ -311,7 +311,7 @@ class Message(Object):
self.command = command
self.reply_markup = reply_markup
def reply_text(self,
def reply(self,
text: str,
quote: bool = None,
parse_mode: str = "",
@@ -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: