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.0.tar.gz (49.7 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.0-py3-none-any.whl (67.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_bilidyn-0.4.0.tar.gz
  • Upload date:
  • Size: 49.7 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.0.tar.gz
Algorithm Hash digest
SHA256 f6628a28e05b921710099374d451a26a9c541d66289ec59846e3e886161a097f
MD5 4adb4a798911e63759041d1ba8d83518
BLAKE2b-256 f59c17dd92c9a617bb375c14500a837fcf0bece0e73bfcc9eb5e91c3286e9d00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nonebot_plugin_bilidyn-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 67.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 39e73521d61792cd13e8da988004a9e1d72d468c6bdf0e3fff51c5f654c3fc49
MD5 a52b364f9ba7fa0fb5fe0f869a5ac69f
BLAKE2b-256 d80b782dcf67c5cc1e16b4fb4f15e3ddb4e89335ba40d9206c675b3a1a007573

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.1

2 files

This release

0.4.0 This release

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