mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 07:14:50 +00:00
Fix stackable plugin decorators with include/exclude directives (#643)
* combination of decorators with plugins has solved * fixing last pr: allow stackable plugin decorators even in exclude and include as well. * counting plugins has fixed * fix indentation * Update client.py * Update client.py Co-authored-by: Dan <14043624+delivrance@users.noreply.github.com>
This commit is contained in:
parent
b6613fbd63
commit
73a1fee28a
1 changed files with 13 additions and 15 deletions
|
|
@ -749,8 +749,7 @@ class Client(Methods, Scaffold):
|
|||
for name in handlers:
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
handler, group = getattr(module, name).handler
|
||||
|
||||
for handler, group in getattr(module, name).handlers:
|
||||
if isinstance(handler, Handler) and isinstance(group, int):
|
||||
self.add_handler(handler, group)
|
||||
|
||||
|
|
@ -785,8 +784,7 @@ class Client(Methods, Scaffold):
|
|||
for name in handlers:
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
handler, group = getattr(module, name).handler
|
||||
|
||||
for handler, group in getattr(module, name).handlers:
|
||||
if isinstance(handler, Handler) and isinstance(group, int):
|
||||
self.remove_handler(handler, group)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue