mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
No asyncio.run()
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from telebot.async_telebot import AsyncTeleBot
|
||||
import asyncio
|
||||
|
||||
bot = AsyncTeleBot('TOKEN')
|
||||
|
||||
@bot.message_handler(commands=['start', 'help'])
|
||||
@@ -10,4 +10,4 @@ async def send_welcome(message):
|
||||
async def echo_all(message):
|
||||
await bot.reply_to(message, message.text)
|
||||
|
||||
asyncio.run(bot.polling(skip_pending=True))# Skip pending skips old updates
|
||||
bot.polling(skip_pending=True)# Skip pending skips old updates
|
||||
|
||||
Reference in New Issue
Block a user