Skip to main content
logo

✨ nonebot-plugin-bilidyn ✨

LICENSE python

uv ruff

📖 介绍

跨平台实现的B站动态、直播订阅插件。参考了 bilibili-dynamic-mirai-plugin 的绘图风格。

💿 安装

使用 nb-cli 安装 在 nonebot2 项目的根目录下打开命令行, 输入以下指令即可安装
nb plugin install nonebot-plugin-bilidyn --upgrade

使用 pypi 源安装

nb plugin install nonebot-plugin-bilidyn --upgrade -i "https://pypi.org/simple"

使用清华源安装

nb plugin install nonebot-plugin-bilidyn --upgrade -i "https://pypi.tuna.tsinghua.edu.cn/simple"
使用包管理器安装 在 nonebot2 项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令
uv
uv add nonebot-plugin-bilidyn

安装仓库 main 分支

uv add git+https://github.com/Misty02600/nonebot-plugin-bilidyn@main
pdm
pdm add nonebot-plugin-bilidyn

安装仓库 main 分支

pdm add git+https://github.com/Misty02600/nonebot-plugin-bilidyn@main
poetry
poetry add nonebot-plugin-bilidyn

安装仓库 main 分支

poetry add git+https://github.com/Misty02600/nonebot-plugin-bilidyn@main

打开 nonebot2 项目根目录下的 pyproject.toml 文件, 在 [tool.nonebot] 部分追加写入

plugins = ["nonebot_plugin_bilidyn"]

⚙️ 配置

插件使用 nonebot_plugin_localstore 储存数据和缓存。

配置项 必填 默认值 说明
BILI_DYNAMIC_MODE per_up per_up 逐 UP 拉取;follow_feed 使用登录账号的聚合关注流
BILI_DYNAMIC_INTERVAL 30 动态检测间隔,单位秒
BILI_LIVE_INTERVAL 30 直播检测间隔,单位秒
BILI_LOW_SPEED_START 1 低频时段起始小时
BILI_LOW_SPEED_END 9 低频时段结束小时
BILI_LOW_SPEED_MULTIPLIER 10 低频时段检测倍率
BILI_THEME_COLOR #D3EDFA 卡片主题色,多个颜色之间使用分号分隔。
BILI_FONT_FILE - 自定义卡片字体文件名或路径

per_up 逐个拉取 UP 动态,无需关注 UP,但关注数较多时会产生较多网络请求;follow_feed 自动关注订阅的 UP,换号、缺失时补齐关注,并从关注流筛选推送,在关注人数较多时请求消耗更少。

BILI_FONT_FILE 填写文件名时,从 localstore 插件配置目录下的 fonts/ 读取;填写相对路径时,相对 Bot 运行目录读取;填写绝对路径则直接使用。

BILI_FONT_FILE=LXGWZhenKaiGB-Regular.ttf
# 或复用 Bot 目录中的已有字体
BILI_FONT_FILE=fonts/LXGWZhenKaiGB-Regular.ttf

登录失效时,插件会向最后一次成功登录所在的私聊发送一次提醒。

🎉 使用

指令表

指令 权限 说明
bili / bili help 查看帮助文本
bili sub <UID> 私聊 / 管理 / 超管 为当前会话订阅指定 UP 主
bili unsub <UID / 名称> 私聊 / 管理 / 超管 取消当前会话对指定 UP 主的订阅
bili list 查看当前会话订阅列表
bili login 私聊, 超管 发起二维码登录
bili new <UID / 名称> [count] 主动查看某位 UP 主最近动态,默认 1 条,最多 5 条

🎨 效果图

动态卡片效果图

直播卡片效果图

红色主题动态卡片效果图

红色主题直播卡片效果图

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nonebot_plugin_bilidyn-0.4.1.tar.gz (51.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nonebot_plugin_bilidyn-0.4.1-py3-none-any.whl (69.7 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_bilidyn-0.4.1.tar.gz.

File metadata

  • Download URL: nonebot_plugin_bilidyn-0.4.1.tar.gz
  • Upload date:
  • Size: 51.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nonebot_plugin_bilidyn-0.4.1.tar.gz
Algorithm Hash digest
SHA256 cb83b17cbe618060c19680257a557066afe42ce308e2300dd465a90b8462d0a2
MD5 93bf881a5c02600754798f14ed7aef1e
BLAKE2b-256 8b542b852b233aeb70b4451f995bc7a063485d38eb694e933ebc1e6bb87158e2

See more details on using hashes here.

File details

Details for the file nonebot_plugin_bilidyn-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: nonebot_plugin_bilidyn-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 69.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for nonebot_plugin_bilidyn-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee550d99c707c6a8a27daf73e128ac634ced951568ba311baa8bf3eb5d945589
MD5 737584a6955495d6eb68c2643a5aa92e
BLAKE2b-256 1c844f4f1905e92cd4b249323348e2ca9303e2952656dca9a840ea170dd0937e

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 files

0.4.0

2 files

0.3.0

2 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