diff --git a/.gitignore b/.gitignore index ccc80c4..dc779e2 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 5259521..7d6173d 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