mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 09:22:03 +00:00
commit
3c07c223f4
1 changed files with 4 additions and 1 deletions
|
|
@ -67,7 +67,10 @@ Also you can bind your own filters for using as keyword arguments:
|
|||
|
||||
class MyFilter(BoundFilter):
|
||||
key = 'is_admin'
|
||||
|
||||
|
||||
def __init__(self, is_admin):
|
||||
self.is_admin = is_admin
|
||||
|
||||
async def check(self, message: types.Message):
|
||||
member = await bot.get_chat_member(message.chat.id, message.from_user.id)
|
||||
return member.is_admin()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue