From 0b79f96b4f5de9e2cbd580c9468f0646a7109f40 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Fri, 12 Oct 2018 14:19:26 +0200 Subject: [PATCH] Turn hardcoded plugins dir into a constant --- pyrogram/client/client.py | 2 +- pyrogram/client/ext/base_client.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pyrogram/client/client.py b/pyrogram/client/client.py index ebcfb02a..b59469d2 100644 --- a/pyrogram/client/client.py +++ b/pyrogram/client/client.py @@ -164,7 +164,7 @@ class Client(Methods, BaseClient): workers: int = 4, workdir: str = ".", config_file: str = "./config.ini", - plugins_dir: str = "./plugins"): + plugins_dir: str = BaseClient.PLUGINS_DIR): super().__init__() self.session_name = session_name diff --git a/pyrogram/client/ext/base_client.py b/pyrogram/client/ext/base_client.py index fa96e1db..562da2b2 100644 --- a/pyrogram/client/ext/base_client.py +++ b/pyrogram/client/ext/base_client.py @@ -49,6 +49,7 @@ class BaseClient: UPDATES_WORKERS = 1 DOWNLOAD_WORKERS = 1 OFFLINE_SLEEP = 300 + PLUGINS_DIR = "./plugins" MEDIA_TYPE_ID = { 0: "thumbnail",