1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Added split_string to apihelper.py

Added a warning to send_message to not exceed 5000 characters per message.
Changed send_message to use HTTP POST instead of GET, to stretch the maximum character limit a little more.
This commit is contained in:
pieter
2015-07-25 20:59:36 +02:00
parent 97f2c0c110
commit 20e3f731f7
2 changed files with 17 additions and 1 deletions

View File

@ -188,6 +188,10 @@ class TeleBot:
def send_message(self, chat_id, text, disable_web_page_preview=None, reply_to_message_id=None, reply_markup=None):
"""
Use this method to send text messages.
Warning: Do not send more than about 5000 characters each message, otherwise you'll risk an HTTP 414 error.
If you must send more than 5000 characters, use the split_string function in apihelper.py.
:param chat_id:
:param text:
:param disable_web_page_preview: