mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-02 07:15:23 +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:
@@ -311,7 +311,7 @@ class Message(Object):
|
|||||||
self.command = command
|
self.command = command
|
||||||
self.reply_markup = reply_markup
|
self.reply_markup = reply_markup
|
||||||
|
|
||||||
def reply_text(self,
|
def reply(self,
|
||||||
text: str,
|
text: str,
|
||||||
quote: bool = None,
|
quote: bool = None,
|
||||||
parse_mode: str = "",
|
parse_mode: str = "",
|
||||||
@@ -510,7 +510,7 @@ class Message(Object):
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
- The result of *request_callback_answer()* in case of inline callback button clicks.
|
- 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
|
- A string in case the inline button is an URL, switch_inline_query or switch_inline_query_current_chat
|
||||||
button.
|
button.
|
||||||
|
|
||||||
@@ -522,7 +522,7 @@ class Message(Object):
|
|||||||
if quote is None:
|
if quote is None:
|
||||||
quote = self.chat.type != "private"
|
quote = self.chat.type != "private"
|
||||||
|
|
||||||
return self.reply_text(x, quote=quote)
|
return self.reply(x, quote=quote)
|
||||||
elif isinstance(self.reply_markup, InlineKeyboardMarkup):
|
elif isinstance(self.reply_markup, InlineKeyboardMarkup):
|
||||||
if isinstance(x, int) and y is None:
|
if isinstance(x, int) and y is None:
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user