Skip to content

Commit b76a69e

Browse files
authored
Merge pull request eternnoir#624 from kor0p/editMessageText
Add 'method' parameter to methods that edit message
2 parents 47b53b8 + 1a58731 commit b76a69e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

telebot/apihelper.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ def edit_message_text(token, text, chat_id=None, message_id=None, inline_message
619619
payload['disable_web_page_preview'] = disable_web_page_preview
620620
if reply_markup:
621621
payload['reply_markup'] = _convert_markup(reply_markup)
622-
return _make_request(token, method_url, params=payload)
622+
return _make_request(token, method_url, params=payload, method='post')
623623

624624

625625
def edit_message_caption(token, caption, chat_id=None, message_id=None, inline_message_id=None,
@@ -636,7 +636,7 @@ def edit_message_caption(token, caption, chat_id=None, message_id=None, inline_m
636636
payload['parse_mode'] = parse_mode
637637
if reply_markup:
638638
payload['reply_markup'] = _convert_markup(reply_markup)
639-
return _make_request(token, method_url, params=payload)
639+
return _make_request(token, method_url, params=payload, method='post')
640640

641641

642642
def edit_message_media(token, media, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
@@ -665,13 +665,13 @@ def edit_message_reply_markup(token, chat_id=None, message_id=None, inline_messa
665665
payload['inline_message_id'] = inline_message_id
666666
if reply_markup:
667667
payload['reply_markup'] = _convert_markup(reply_markup)
668-
return _make_request(token, method_url, params=payload)
668+
return _make_request(token, method_url, params=payload, method='post')
669669

670670

671671
def delete_message(token, chat_id, message_id):
672672
method_url = r'deleteMessage'
673673
payload = {'chat_id': chat_id, 'message_id': message_id}
674-
return _make_request(token, method_url, params=payload)
674+
return _make_request(token, method_url, params=payload, method='post')
675675

676676

677677
# Game
@@ -814,7 +814,7 @@ def answer_shipping_query(token, shipping_query_id, ok, shipping_options=None, e
814814
:param ok: Specify True if delivery to the specified address is possible and False if there are any problems (for example, if delivery to the specified address is not possible)
815815
:param shipping_options: Required if ok is True. A JSON-serialized array of available shipping options.
816816
:param error_message: Required if ok is False. Error message in human readable form that explains why it is impossible to complete the order (e.g. "Sorry, delivery to your desired address is unavailable'). Telegram will display this message to the user.
817-
:return:
817+
:return:
818818
"""
819819
method_url = 'answerShippingQuery'
820820
payload = {'shipping_query_id': shipping_query_id, 'ok': ok}
@@ -832,7 +832,7 @@ def answer_pre_checkout_query(token, pre_checkout_query_id, ok, error_message=No
832832
:param pre_checkout_query_id: Unique identifier for the query to be answered
833833
:param ok: Specify True if everything is alright (goods are available, etc.) and the bot is ready to proceed with the order. Use False if there are any problems.
834834
:param error_message: Required if ok is False. Error message in human readable form that explains the reason for failure to proceed with the checkout (e.g. "Sorry, somebody just bought the last of our amazing black T-shirts while you were busy filling out your payment details. Please choose a different color or garment!"). Telegram will display this message to the user.
835-
:return:
835+
:return:
836836
"""
837837
method_url = 'answerPreCheckoutQuery'
838838
payload = {'pre_checkout_query_id': pre_checkout_query_id, 'ok': ok}

0 commit comments

Comments
 (0)