Allow stackable plugin decorators for on_chat_member_updated
This commit is contained in:
parent
f0b1cc41f3
commit
c7914f6c57
@ -46,9 +46,14 @@ class OnChatMemberUpdated(Scaffold):
|
||||
if isinstance(self, pyrogram.Client):
|
||||
self.add_handler(pyrogram.handlers.ChatMemberUpdatedHandler(func, filters), group)
|
||||
elif isinstance(self, Filter) or self is None:
|
||||
func.handler = (
|
||||
pyrogram.handlers.ChatMemberUpdatedHandler(func, self),
|
||||
group if filters is None else filters
|
||||
if not hasattr(func, "handlers"):
|
||||
func.handlers = []
|
||||
|
||||
func.handlers.append(
|
||||
(
|
||||
pyrogram.handlers.ChatMemberUpdatedHandler(func, self),
|
||||
group if filters is None else filters
|
||||
)
|
||||
)
|
||||
|
||||
return func
|
||||
|
Loading…
Reference in New Issue
Block a user