mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 12:51:18 +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()
|
||||
|
||||
for option in ["include", "exclude"]:
|
||||
if plugins[option]:
|
||||
if plugins.get(option, []):
|
||||
plugins[option] = [
|
||||
(i.split()[0], i.split()[1:] or None)
|
||||
for i in self.plugins[option]
|
||||
@ -622,10 +622,10 @@ class Client(Methods):
|
||||
else:
|
||||
return
|
||||
|
||||
if plugins.get("enabled", False):
|
||||
if plugins.get("enabled", True):
|
||||
root = plugins["root"]
|
||||
include = plugins["include"]
|
||||
exclude = plugins["exclude"]
|
||||
include = plugins.get("include", [])
|
||||
exclude = plugins.get("exclude", [])
|
||||
|
||||
count = 0
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user