Eleirbag89 / TelegramBotPHP

A very simple PHP Telegram Bot API for sending messages.
http://eleirbag89.github.io/TelegramBotPHP
MIT License
807 stars 341 forks source link

sending long messages without problem #180

Closed rabbitix closed 4 years ago

rabbitix commented 5 years ago

hi as you know, we can't send messages longer than 4096 character and this is telegram limit. as i used the project, i faced this problem, i figured out i need to send my messages any way! so this simple PR code will separate the long messages into pieces and send them one by one.

hope it'll be useful .

[ this is my first pull request ever in github anyway :) ]

Eleirbag89 commented 4 years ago

Hi, thank you for the PR, but i don't feel like addind a new dependency from ext-mbstring. Also i want to keep the library pretty low-level and i think the split message problem should be rosolved by whom calls the library, becaso there are a lot of context where split a message mid-word doesn't make sense ;)