Skip to content

Commit a398bc5

Browse files
committed
Rename CallbackQuery's bound-methods: edit_* -> edit_message_*
1 parent 8d0e161 commit a398bc5

2 files changed

Lines changed: 18 additions & 18 deletions

File tree

docs/source/api/bound-methods.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ CallbackQuery
8181
^^^^^^^^^^^^^
8282

8383
.. hlist::
84-
:columns: 4
84+
:columns: 3
8585

8686
- :meth:`~CallbackQuery.answer`
87-
- :meth:`~CallbackQuery.edit_text`
88-
- :meth:`~CallbackQuery.edit_caption`
89-
- :meth:`~CallbackQuery.edit_media`
90-
- :meth:`~CallbackQuery.edit_reply_markup`
87+
- :meth:`~CallbackQuery.edit_message_text`
88+
- :meth:`~CallbackQuery.edit_message_caption`
89+
- :meth:`~CallbackQuery.edit_message_media`
90+
- :meth:`~CallbackQuery.edit_message_reply_markup`
9191

9292
InlineQuery
9393
^^^^^^^^^^^
@@ -141,10 +141,10 @@ Details
141141

142142
.. CallbackQuery
143143
.. automethod:: CallbackQuery.answer()
144-
.. automethod:: CallbackQuery.edit_text()
145-
.. automethod:: CallbackQuery.edit_caption()
146-
.. automethod:: CallbackQuery.edit_media()
147-
.. automethod:: CallbackQuery.edit_reply_markup()
144+
.. automethod:: CallbackQuery.edit_message_text()
145+
.. automethod:: CallbackQuery.edit_message_caption()
146+
.. automethod:: CallbackQuery.edit_message_media()
147+
.. automethod:: CallbackQuery.edit_message_reply_markup()
148148

149149
.. InlineQuery
150150
.. automethod:: InlineQuery.answer()

pyrogram/client/types/bots_and_keyboards/callback_query.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ def answer(self, text: str = None, show_alert: bool = None, url: str = None, cac
173173
cache_time=cache_time
174174
)
175175

176-
def edit_text(
176+
def edit_message_text(
177177
self,
178178
text: str,
179179
parse_mode: str = "",
180180
disable_web_page_preview: bool = None,
181181
reply_markup: "pyrogram.InlineKeyboardMarkup" = None
182182
) -> Union["pyrogram.Message", bool]:
183-
"""Edit the text of messages attached to this callback query.
183+
"""Edit the text of messages attached to callback queries.
184184
185185
Bound method *edit_message_text* of :obj:`CallbackQuery`.
186186
@@ -223,13 +223,13 @@ def edit_text(
223223
reply_markup=reply_markup
224224
)
225225

226-
def edit_caption(
226+
def edit_message_caption(
227227
self,
228228
caption: str,
229229
parse_mode: str = "",
230230
reply_markup: "pyrogram.InlineKeyboardMarkup" = None
231231
) -> Union["pyrogram.Message", bool]:
232-
"""Edit the caption of media messages attached to this callback query.
232+
"""Edit the caption of media messages attached to callback queries.
233233
234234
Bound method *edit_message_caption* of :obj:`CallbackQuery`.
235235
@@ -251,14 +251,14 @@ def edit_caption(
251251
Raises:
252252
RPCError: In case of a Telegram RPC error.
253253
"""
254-
return self.edit_text(caption, parse_mode, reply_markup)
254+
return self.edit_message_text(caption, parse_mode, reply_markup)
255255

256-
def edit_media(
256+
def edit_message_media(
257257
self,
258258
media: "pyrogram.InputMedia",
259259
reply_markup: "pyrogram.InlineKeyboardMarkup" = None
260260
) -> Union["pyrogram.Message", bool]:
261-
"""Edit animation, audio, document, photo or video messages attached to this callback query.
261+
"""Edit animation, audio, document, photo or video messages attached to callback queries.
262262
263263
Bound method *edit_message_media* of :obj:`CallbackQuery`.
264264
@@ -290,11 +290,11 @@ def edit_media(
290290
reply_markup=reply_markup
291291
)
292292

293-
def edit_reply_markup(
293+
def edit_message_reply_markup(
294294
self,
295295
reply_markup: "pyrogram.InlineKeyboardMarkup" = None
296296
) -> Union["pyrogram.Message", bool]:
297-
"""Edit only the reply markup of messages attached to this callback query.
297+
"""Edit only the reply markup of messages attached to callback queries.
298298
299299
Bound method *edit_message_reply_markup* of :obj:`CallbackQuery`.
300300

0 commit comments

Comments
 (0)