Skip to content

Installation

Ljzd-PRO edited this page Dec 17, 2022 · 27 revisions

🛠️ 部署与安装

如果您已经配置好 NoneBot2,可跳过前面的安装步骤

1. 部署 NoneBot2 机器人

📖 查阅官方文档: https://v2.nonebot.dev/docs/start/installation

2. 部署 go-cqhttp

📖 查阅官方文档: https://docs.go-cqhttp.org/guide/quick_start.html#基础教程

3. 安装 OneBot V11 协议适配器 以及配置连接

📖 查阅官方文档:

4. 安装本插件

通过脚手架

安装

nb plugin install nonebot_plugin_mystool

卸载

nb plugin uninstall nonebot_plugin_mystool

通过 PyPI

安装

  1. 终端使用命令
pip install nonebot_plugin_mystool
  1. 修改机器人目录的 pyproject.toml 文件
# ...
[tool.nonebot]
# ...
plugins = []
# ...

⬇️ 在 [tool.nonebot] plugins 中添加 "nonebot_plugin_mystool" ⬇️

# ...
[tool.nonebot]
# ...
plugins = ["nonebot_plugin_mystool"]
# ...

卸载

  1. 终端使用命令
pip uninstall nonebot_plugin_mystool
  1. 修改机器人目录的 pyproject.toml 文件
# ...
[tool.nonebot]
# ...
plugins = ["nonebot_plugin_mystool"]
# ...

⬇️ 在 [tool.nonebot] plugins 中删除 "nonebot_plugin_mystool" ⬇️

# ...
[tool.nonebot]
# ...
plugins = []
# ...

5. 配置插件(可选)

📖 请查看插件配置的 📄 说明文档

6. 启动机器人

在机器人工作目录下,执行

nb run
Clone this wiki locally