while len(message) > 0:
if len(message) > 4096:
part = message[:4096]
first_lnbr = part.rfind('\n')
if first_lnbr != -1:
parts.append(part[:first_lnbr])
message = message[first_lnbr:]
else:
parts.append(part)
message = message[4096:]
else:
parts.append(message)
break
for part in parts:
self.bot.send_message(chat_id, part, parse_mode='HTML')