Skip to main content
NoneBotPluginLogo

NoneBotPluginText

nonebot-plugin-lagrange

✨ 一款方便管理 Lagrange.OneBot 的插件。 ✨

📖 介绍

本插件旨在使用户能够简单的使用 Lagrange.OneBot 来部署机器人。目前实现的功能有:

  • 自动配置使其连接上 NoneBot
  • 通过 WebUi 控制 Lagrange.
  • 提醒用户遇到登录失败的解决方法。
  • 根据系统自动安装合适的 Lagrange.OneBot.
WebUi

1 2 3

💿 安装

你可以使用 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 超级用户 查看拉格兰状态

计划功能

  • 监控拉格兰日志,分析机器人的消息。

🙏 鸣谢

Lagrange

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)

Source distribution for nonebot_plugin_lagrange 1.1.0
File Size Uploaded
nonebot_plugin_lagrange-1.1.0.tar.gz 25.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot_plugin_lagrange 1.1.0
File Interpreter ABI Platform
nonebot_plugin_lagrange-1.1.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page