diff --git a/examples/asynchronous_telebot/chat_member_example.py b/examples/asynchronous_telebot/chat_member_example.py index 30f47e2..b2f545c 100644 --- a/examples/asynchronous_telebot/chat_member_example.py +++ b/examples/asynchronous_telebot/chat_member_example.py @@ -31,4 +31,4 @@ async def my_chat_m(message: types.ChatMemberUpdated): async def delall(message: types.Message): await bot.delete_message(message.chat.id,message.message_id) import asyncio -asyncio.run(bot.polling()) +asyncio.run(bot.polling(allowed_updates=util.update_types)) diff --git a/telebot/async_telebot.py b/telebot/async_telebot.py index 2ab6f4a..7b45ed9 100644 --- a/telebot/async_telebot.py +++ b/telebot/async_telebot.py @@ -318,7 +318,7 @@ class AsyncTeleBot: except Exception as e: handler_error = e - if not middleware: + if not middlewares: if self.exception_handler: return self.exception_handler.handle(e) logging.error(str(e))