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
|
||||
|
||||
import telebot
|
||||
bot = AsyncTeleBot('TOKEN')
|
||||
|
||||
@@ -8,4 +8,4 @@ async def make_some(message: telebot.types.ChatJoinRequest):
|
||||
await bot.send_message(message.chat.id, 'I accepted a new user!')
|
||||
await bot.approve_chat_join_request(message.chat.id, message.from_user.id)
|
||||
|
||||
asyncio.run(bot.polling(skip_pending=True))
|
||||
bot.polling(skip_pending=True)
|
||||
Reference in New Issue
Block a user