mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
FIx #225
This commit is contained in:
parent
ff5f6f727a
commit
6da88c9751
@ -549,9 +549,11 @@ class TeleBot:
|
||||
)
|
||||
|
||||
def edit_message_caption(self, caption, chat_id=None, message_id=None, inline_message_id=None, reply_markup=None):
|
||||
return types.Message.de_json(
|
||||
apihelper.edit_message_caption(self.token, caption, chat_id, message_id, inline_message_id, reply_markup)
|
||||
)
|
||||
result = apihelper.edit_message_caption(self.token, caption, chat_id, message_id, inline_message_id, reply_markup)
|
||||
if isinstance(result, bool):
|
||||
return result
|
||||
else:
|
||||
return types.Message.de_json(result)
|
||||
|
||||
def reply_to(self, message, text, **kwargs):
|
||||
"""
|
||||
|
@ -352,6 +352,12 @@ class TestTeleBot:
|
||||
new_msg = tb.edit_message_text('Edit test', chat_id=CHAT_ID, message_id=msg.message_id)
|
||||
assert new_msg.text == 'Edit test'
|
||||
|
||||
def test_edit_message_text(self):
|
||||
tb = telebot.TeleBot(TOKEN)
|
||||
msg = tb.send_message(CHAT_ID, 'Test')
|
||||
new_msg = tb.edit_message_text(caption='Edit test', chat_id=CHAT_ID, message_id=msg.message_id)
|
||||
assert new_msg.text == 'Test'
|
||||
|
||||
def test_get_chat(self):
|
||||
tb = telebot.TeleBot(TOKEN)
|
||||
ch = tb.get_chat(GROUP_ID)
|
||||
|
Loading…
Reference in New Issue
Block a user