From c799703965a54f8e64e6677edafd543ba728f92e Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Sun, 24 Apr 2022 13:11:54 +0200 Subject: [PATCH] Fix plugins loading --- pyrogram/client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pyrogram/client.py b/pyrogram/client.py index 4cf0740f..74897e5f 100644 --- a/pyrogram/client.py +++ b/pyrogram/client.py @@ -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