This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import telebot | |
from telebot import types | |
bot = telebot.TeleBot("tokenbot") # вставь свой токен | |
def split_text(text, max_len=4000): | |
parts = [] | |
while text: | |
if len(text) <= max_len: | |
parts.append(text) | |
break |