📖 介绍
本插件旨在使用户能够简单的使用 Lagrange.OneBot 来部署机器人。目前实现的功能有:
- 自动配置使其连接上 NoneBot
- 通过 WebUi 控制 Lagrange.
- 提醒用户遇到登录失败的解决方法。
- 根据系统自动安装合适的 Lagrange.OneBot.
WebUi
💿 安装
你可以使用 pip3 install nonebot-plugin-lagrange 来安装此插件。
⚙️ 配置
在 NoneBot2 项目的.env文件中添加下表中的必填配置
| 配置项 | 必填 | 默认值 | 说明 |
|---|---|---|---|
| lagrange_path | 否 | Lagrange | Lagrange.OneBot 的安装和运行目录。 |
| lagrange_auto_start | 否 | True | 是否在检测到有安装 Lgr 的情况下自动启动。 |
| lagrange_auto_install | 否 | True | 是否在未安装 Lgr 的情况自动安装 |
| lagrange_max_cache_log | 否 | 500 | 最大缓存多少行日志 |
| lagrange_webui | 否 | True | 是否启用 WebUi |
| lagrange_webui_token | 否 | 空 | 登录 WebUi 的 token |
🎉 使用
WebUi
在启动机器人时,你应该会看到一行日志:
08-19 10:50:54 [INFO] nonebot_plugin_lagrange | WebUi http://127.0.0.1:8080/lagrange?token=ijr...
其中 WebUi 字段后面的链接就是 WebUi 的地址。请注意,后面的 token 参数即为登录密码,请注意保管。你可以自己设置配置项 Lagrange_webui_token ,若检测到为空时将会自动生成一个 token 并储存在拉格兰目录下的 token.bin 文件中。
将这个链接复制到浏览器内并打开,如若出现界面则登录成功。
指令表
| 名称 | 权限 | 说明 |
|---|---|---|
| status | 超级用户 | 查看拉格兰状态 |
计划功能
- 监控拉格兰日志,分析机器人的消息。
🙏 鸣谢
Metadata
Release files for nonebot_plugin_lagrange 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nonebot_plugin_lagrange-1.1.0.tar.gz | 25.6 kB | Without provenance | Details for nonebot_plugin_lagrange-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nonebot_plugin_lagrange-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for nonebot_plugin_lagrange-1.1.0-py3-none-any.whl |
Total release size: 54.3 kB
Release files / nonebot_plugin_lagrange-1.1.0.tar.gz
| Download URL | nonebot_plugin_lagrange-1.1.0.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b40174fab3c052ebf852cab7f73c395ed88f13fb600b6edf98ede1bf0c474f8
|
|
BLAKE2b-256 checksum How to use checksums |
07eddea5210548b7d0e4da95ab62e020133d221688a09320c57f20969bdba488
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.13.1 Darwin/23.6.0
|
Release files / nonebot_plugin_lagrange-1.1.0-py3-none-any.whl
| Download URL | nonebot_plugin_lagrange-1.1.0-py3-none-any.whl |
|---|---|
| Size | 28.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b374d16512c166c79f98d6cf5751b955f27c4684326c6dc252a270aaa1eeda35
|
|
BLAKE2b-256 checksum How to use checksums |
799cf75cd0272da84ed99f4cf066ae30a49fc7eb7effb6c55bca9d62a9df1ec7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.13.1 Darwin/23.6.0
|
Security for nonebot_plugin_lagrange 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.