From 593d593a629d54eb560eeba49856fa0cb51f36ea Mon Sep 17 00:00:00 2001 From: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> Date: Sat, 1 May 2021 10:53:18 +0800 Subject: [PATCH] :memo: update doc --- docs/guide/loading-a-plugin.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/guide/loading-a-plugin.md b/docs/guide/loading-a-plugin.md index 33de447e..4ed55434 100644 --- a/docs/guide/loading-a-plugin.md +++ b/docs/guide/loading-a-plugin.md @@ -95,7 +95,7 @@ import nonebot nonebot.init() # 从 plugin.json 加载插件 -load_from_json("plugin.json") +nonebot.load_from_json("plugin.json") app = nonebot.get_asgi() @@ -122,7 +122,7 @@ import nonebot nonebot.init() # 从 pyproject.toml 加载插件 -load_from_toml("pyproject.toml") +nonebot.load_from_toml("pyproject.toml") app = nonebot.get_asgi() @@ -138,7 +138,9 @@ plugins = ["nonebot_plugin_status", "awesome_bot.plugins.xxx"] plugin_dirs = ["awesome_bot/plugins"] ``` +::: tip nb-cli 默认使用 `pyproject.toml` 加载插件。 +::: ## 子插件(嵌套插件)