一款便于管理 Lagrange.Onebot 的插件。
Project description
nonebot-plugin-lagrange
✨ 一款方便管理 Lagrange.OneBot 的插件。 ✨
📖 介绍
本插件旨在使用户能够简单的使用 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 | 超级用户 | 查看拉格兰状态 |
计划功能
- 监控拉格兰日志,分析机器人的消息。
🙏 鸣谢
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nonebot_plugin_lagrange-1.1.0.tar.gz.
File metadata
- Download URL: nonebot_plugin_lagrange-1.1.0.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b40174fab3c052ebf852cab7f73c395ed88f13fb600b6edf98ede1bf0c474f8
|
|
| MD5 |
cd813002bd1cef215c294da482239129
|
|
| BLAKE2b-256 |
07eddea5210548b7d0e4da95ab62e020133d221688a09320c57f20969bdba488
|
File details
Details for the file nonebot_plugin_lagrange-1.1.0-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_lagrange-1.1.0-py3-none-any.whl
- Upload date:
- Size: 28.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.0.1 CPython/3.13.1 Darwin/23.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b374d16512c166c79f98d6cf5751b955f27c4684326c6dc252a270aaa1eeda35
|
|
| MD5 |
8c5c9a9b820e9bf57e5d6fb83d54a6ec
|
|
| BLAKE2b-256 |
799cf75cd0272da84ed99f4cf066ae30a49fc7eb7effb6c55bca9d62a9df1ec7
|