From 958591062382e8c668fd2a21c821e69bbdeccb14 Mon Sep 17 00:00:00 2001 From: snowy Date: Tue, 19 Mar 2024 15:58:02 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=86=E7=BD=91?= =?UTF-8?q?=E9=A1=B5=E7=9B=91=E6=8E=A7=E9=9D=A2=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 +- src/plugins/liteyuki_plugin_main/loader.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ccc80c43..dc779e26 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,6 @@ .cache/ data/ - +plugins/ _config.yml config.example.yml \ No newline at end of file diff --git a/src/plugins/liteyuki_plugin_main/loader.py b/src/plugins/liteyuki_plugin_main/loader.py index 52595212..7d6173d5 100644 --- a/src/plugins/liteyuki_plugin_main/loader.py +++ b/src/plugins/liteyuki_plugin_main/loader.py @@ -5,10 +5,12 @@ import nonebot.plugin from src.utils.language import load_from_dir from src.utils.resource import load_resource_from_dir -PLUGIN_NAME = os.path.basename(os.path.dirname(__file__)) +THIS_PLUGIN_NAME = os.path.basename(os.path.dirname(__file__)) RESOURCE_PATH = "src/resources" load_resource_from_dir(RESOURCE_PATH) for plugin_dir in os.listdir("src/plugins"): - if plugin_dir != PLUGIN_NAME: - nonebot.plugin.load_plugin(f"src.plugins.{plugin_dir}") \ No newline at end of file + if plugin_dir != THIS_PLUGIN_NAME: + nonebot.plugin.load_plugin(f"src.plugins.{plugin_dir}") + +nonebot.plugin.load_plugins("plugins") \ No newline at end of file