From e1094c6f027921cf6d08587e2602553d89474a03 Mon Sep 17 00:00:00 2001 From: _run Date: Tue, 5 Jul 2022 21:50:11 +0500 Subject: [PATCH] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1bc6978..253692b 100644 --- a/README.md +++ b/README.md @@ -398,7 +398,7 @@ Here is example of creating filter-class: ```python class IsAdmin(telebot.custom_filters.SimpleCustomFilter): # Class will check whether the user is admin or creator in group or not - key='is_admin' + key='is_chat_admin' @staticmethod def check(message: telebot.types.Message): return bot.get_chat_member(message.chat.id,message.from_user.id).status in ['administrator','creator'] @@ -407,7 +407,7 @@ class IsAdmin(telebot.custom_filters.SimpleCustomFilter): bot.add_custom_filter(IsAdmin()) # Now, you can use it in handler. -@bot.message_handler(is_admin=True) +@bot.message_handler(is_chat_admin=True) def admin_of_group(message): bot.send_message(message.chat.id, 'You are admin of this group!')