You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3c8faa1
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -282,7 +282,7 @@ To enable this behaviour, create an instance of AsyncTeleBot instead of TeleBot.
282
282
```python
283
283
tb = telebot.AsyncTeleBot("TOKEN")
284
284
```
285
-
Now, every function that calls the Telegram API is executed in a separate Thread. The functions are modified to return an AsyncTask instance (defined in \__init__.py). Using AsyncTeleBot allows you to do the following:
285
+
Now, every function that calls the Telegram API is executed in a separate Thread. The functions are modified to return an AsyncTask instance (defined in util.py). Using AsyncTeleBot allows you to do the following:
286
286
```python
287
287
import telebot
288
288
@@ -300,12 +300,12 @@ result = task.wait() # Get the result of the execution
300
300
### Sending large text messages
301
301
Sometimes you must send messages that exceed 5000 characters. The Telegram API can not handle that many characters in one request, so we need to split the message in multiples. Here is how to do that using the API:
302
302
```python
303
-
from telebot importapihelper
303
+
from telebot importutil
304
304
large_text =open("large_text.txt", "rb").read()
305
305
306
306
# Split the text each 3000 characters.
307
307
# split_string returns a list with the splitted text.
0 commit comments