From 901270449f5a9a52a546da0eaba9b9d4bdee6d16 Mon Sep 17 00:00:00 2001 From: Aleksandr Date: Sat, 20 Mar 2021 20:23:30 +0300 Subject: [PATCH] Changed ChatType from CHANNEL to SUPERGROUP to avoid confusion (#533) Channels require a separate channel_post_handler, so this example is currently broken and confusing --- examples/chat_type_filter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/chat_type_filter.py b/examples/chat_type_filter.py index e57f8825..9db13cb8 100644 --- a/examples/chat_type_filter.py +++ b/examples/chat_type_filter.py @@ -19,12 +19,12 @@ bot = Bot(token=API_TOKEN) dp = Dispatcher(bot) -@dp.message_handler(chat_type=[ChatType.PRIVATE, ChatType.CHANNEL]) +@dp.message_handler(chat_type=[ChatType.PRIVATE, ChatType.SUPERGROUP]) async def send_welcome(message: types.Message): """ - This handler will be called when user sends message in private chat or channel + This handler will be called when user sends message in private chat or supergroup """ - await message.reply("Hi!\nI'm hearing your messages in private chats and channels") + await message.reply("Hi!\nI'm hearing your messages in private chats and supergroups") # propagate message to the next handler raise SkipHandler