1
0
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:
_run
2021-11-28 01:04:49 +05:00
parent d58336adcb
commit 411c7e915a
12 changed files with 22 additions and 30 deletions

View File

@ -1,6 +1,6 @@
from telebot import types,util
from telebot.async_telebot import AsyncTeleBot
import asyncio
bot = AsyncTeleBot('TOKEN')
#chat_member_handler. When status changes, telegram gives update. check status from old_chat_member and new_chat_member.
@ -30,4 +30,4 @@ async def my_chat_m(message: types.ChatMemberUpdated):
@bot.message_handler(content_types=util.content_type_service)
async def delall(message: types.Message):
await bot.delete_message(message.chat.id,message.message_id)
asyncio.run(bot.polling())
bot.polling()