mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-29 13:27:47 +00:00
Fix plugins loading
This commit is contained in:
parent
0dc112ea8c
commit
c799703965
@ -614,7 +614,7 @@ class Client(Methods):
|
|||||||
plugins = self.plugins.copy()
|
plugins = self.plugins.copy()
|
||||||
|
|
||||||
for option in ["include", "exclude"]:
|
for option in ["include", "exclude"]:
|
||||||
if plugins[option]:
|
if plugins.get(option, []):
|
||||||
plugins[option] = [
|
plugins[option] = [
|
||||||
(i.split()[0], i.split()[1:] or None)
|
(i.split()[0], i.split()[1:] or None)
|
||||||
for i in self.plugins[option]
|
for i in self.plugins[option]
|
||||||
@ -622,10 +622,10 @@ class Client(Methods):
|
|||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
if plugins.get("enabled", False):
|
if plugins.get("enabled", True):
|
||||||
root = plugins["root"]
|
root = plugins["root"]
|
||||||
include = plugins["include"]
|
include = plugins.get("include", [])
|
||||||
exclude = plugins["exclude"]
|
exclude = plugins.get("exclude", [])
|
||||||
|
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user