From c86af0496bf15befe81a56ff6b4beadbc0dc734f Mon Sep 17 00:00:00 2001 From: _run Date: Sun, 12 Sep 2021 20:43:09 +0500 Subject: [PATCH] Update README.md --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a40e5ff..849efad 100644 --- a/README.md +++ b/README.md @@ -314,11 +314,13 @@ class IsAdmin(util.SimpleCustomFilter): def check(message: telebot.types.Message): return bot.get_chat_member(message.chat.id,message.from_user.id).status in ['administrator','creator'] - # To register filter, you need to use method add_custom_filter. - bot.add_custom_filter(IsAdmin()) +# To register filter, you need to use method add_custom_filter. +bot.add_custom_filter(IsAdmin()) - # Now, you can use it in handler. - @bot.message_handler(is_admin=True) +# Now, you can use it in handler. +@bot.message_handler(is_admin=True) +def admin_of_group(message): + bot.send_message(message.chat.id, 'You are admin of this group'!) ```