2
0
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:
Dan
2019-07-11 17:14:38 +02:00
parent 5fe8fba3df
commit e1197e066e
8 changed files with 10 additions and 10 deletions

View File

@@ -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)