Skip to content

Commit bc55b17

Browse files
Add button.copy_text support for Message.click()
1 parent 6081b1d commit bc55b17

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

pyrogram/types/messages_and_media/message.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8955,9 +8955,9 @@ async def click(
89558955
89568956
Returns:
89578957
- The result of :meth:`~pyrogram.Client.request_callback_answer` in case of inline callback button clicks.
8958-
- The result of :meth:`~Message.reply()` in case of normal button clicks.
8959-
- A string in case the inline button is a URL, a *switch_inline_query* or a
8960-
*switch_inline_query_current_chat* button.
8958+
- The result of :meth:`~Message.reply()` or :meth:`~Message.answer()` in case of normal button clicks.
8959+
- A string in case the inline button is a URL, a *switch_inline_query*,
8960+
*switch_inline_query_current_chat* or a *copy_text* button.
89618961
- A string URL with the user details, in case of a WebApp button.
89628962
- A :obj:`~pyrogram.types.Chat` object in case of a ``KeyboardButtonUserProfile`` button.
89638963
@@ -9061,6 +9061,8 @@ async def click(
90619061
return button.switch_inline_query
90629062
elif button.switch_inline_query_current_chat:
90639063
return button.switch_inline_query_current_chat
9064+
elif button.copy_text:
9065+
return button.copy_text
90649066
else:
90659067
raise ValueError("This button is not supported yet")
90669068
else:

0 commit comments

Comments
 (0)