mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Merge pull request #1390 from coder2020official/master
Update README.md
This commit is contained in:
commit
7fe60e19ef
@ -717,6 +717,7 @@ Echo Bot example on AsyncTeleBot:
|
|||||||
# It echoes any incoming text messages.
|
# It echoes any incoming text messages.
|
||||||
|
|
||||||
from telebot.async_telebot import AsyncTeleBot
|
from telebot.async_telebot import AsyncTeleBot
|
||||||
|
import asyncio
|
||||||
bot = AsyncTeleBot('TOKEN')
|
bot = AsyncTeleBot('TOKEN')
|
||||||
|
|
||||||
|
|
||||||
@ -736,7 +737,7 @@ async def echo_message(message):
|
|||||||
await bot.reply_to(message, message.text)
|
await bot.reply_to(message, message.text)
|
||||||
|
|
||||||
|
|
||||||
bot.polling()
|
asyncio.run(bot.polling())
|
||||||
```
|
```
|
||||||
As you can see here, keywords are await and async.
|
As you can see here, keywords are await and async.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user