Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion telebot/apihelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,13 @@ def send_rich_message(
payload['message_thread_id'] = message_thread_id
return _make_request(token, method_url, params=payload, method='post')

def send_rich_message_draft(token, chat_id, draft_id, rich_message, message_thread_id=None):
def send_rich_message_draft(token, chat_id, draft_id, rich_message, message_thread_id=None, business_connection_id=None):
method_url = r'sendRichMessageDraft'
payload = {'chat_id': str(chat_id), 'draft_id': draft_id, 'rich_message': rich_message.to_json()}
if message_thread_id is not None:
payload['message_thread_id'] = message_thread_id
if business_connection_id is not None:
payload['business_connection_id'] = business_connection_id
return _make_request(token, method_url, params=payload, method='post')


Expand Down
4 changes: 3 additions & 1 deletion telebot/asyncio_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,13 @@ async def send_rich_message(

return await _process_request(token, method_url, params=payload, method='post')

async def send_rich_message_draft(token, chat_id, draft_id, rich_message, message_thread_id=None):
async def send_rich_message_draft(token, chat_id, draft_id, rich_message, message_thread_id=None, business_connection_id=None):
method_url = r'sendRichMessageDraft'
payload = {'chat_id': chat_id, 'draft_id': draft_id, 'rich_message': rich_message.to_json()}
if message_thread_id is not None:
payload['message_thread_id'] = message_thread_id
if business_connection_id is not None:
payload['business_connection_id'] = business_connection_id
return await _process_request(token, method_url, params=payload, method='post')


Expand Down