mirror of
https://github.com/pyrogram/pyrogram
synced 2025-09-10 11:15:27 +00:00
Use a better name for the special plugin attribute when decorating funcs
This commit is contained in:
@@ -1108,7 +1108,7 @@ class Client(Methods, BaseClient):
|
||||
for name in vars(module).keys():
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
handler, group = getattr(module, name).pyrogram_plugin
|
||||
handler, group = getattr(module, name).handler
|
||||
|
||||
if isinstance(handler, Handler) and isinstance(group, int):
|
||||
self.add_handler(handler, group)
|
||||
@@ -1143,7 +1143,7 @@ class Client(Methods, BaseClient):
|
||||
for name in handlers:
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
handler, group = getattr(module, name).pyrogram_plugin
|
||||
handler, group = getattr(module, name).handler
|
||||
|
||||
if isinstance(handler, Handler) and isinstance(group, int):
|
||||
self.add_handler(handler, group)
|
||||
@@ -1181,7 +1181,7 @@ class Client(Methods, BaseClient):
|
||||
for name in handlers:
|
||||
# noinspection PyBroadException
|
||||
try:
|
||||
handler, group = getattr(module, name).pyrogram_plugin
|
||||
handler, group = getattr(module, name).handler
|
||||
|
||||
if isinstance(handler, Handler) and isinstance(group, int):
|
||||
self.remove_handler(handler, group)
|
||||
|
Reference in New Issue
Block a user