Skip to main content

nonebot-plugin-taozi-music

每天定时在 QQ 群里以语音条形式播放主播「小小桃子呦」(B站 UID 6867955)唱过的歌,支持命令点歌。随机不重复,播完一轮自动重置。

功能

  • 每日定时推送一首歌(QQ 语音条,非文件)
  • 随机不重复选歌,播完一轮自动重置历史
  • 命令点歌、查看歌单、修改每日播放时间
  • 音频提前下载缓存:经 B站官方 API 只下音频流(不存视频),录播片段按时间戳裁剪(ffmpeg)

安装

nb plugin install nonebot-plugin-taozi-music
# 或
pip install nonebot-plugin-taozi-music
# 或
poetry add nonebot-plugin-taozi-music

运行环境还需安装 ffmpeg(见 https://ffmpeg.org/download.html 或 brew install ffmpeg)。音频下载走插件内置的 B站 API 流程,无需 yt-dlp。

协议端需支持语音消息(推荐 NapCat / Lagrange,会自动转码)。

配置

在 NoneBot 项目的 .env 文件中添加(均有默认值,可省略):

# 每日推送的群号列表(JSON 数组格式);留空则不定时推送
taozi_music_groups=["123456789"]
# 每日播放时间(初始值,可用命令修改)
taozi_music_send_time="21:00"

使用方法

以下命令均仅 SUPERUSER 可用:

指令 范围 说明
/桃乐 群聊/私聊 随机放一首(计入历史,不重复)
/桃乐 歌单 群聊/私聊 列出歌曲编号与歌名
/桃乐 点歌 <编号或歌名> 群聊/私聊 播放指定歌曲
/桃乐 时间 HH:MM 群聊/私聊 修改每日播放时间(持久化)

歌单

歌单在 nonebot_plugin_taozi_music/resources/songs.yaml,每条记录:

- id: 1
  title: 歌名
  bv: BVxxxxx        # 来源视频
  start: "12:30"     # 可选:唱歌开始时间(录播片段)
  end: "14:05"       # 可选:唱歌结束时间;与 start 成对出现
  note: 来源说明

切片 UP 主切好的唱歌视频省略 start/end(整段即歌)。欢迎 PR 补充更多歌。

许可证

MIT

Metadata

Release files for nonebot-plugin-taozi-music 0.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-taozi-music 0.1.0
File Size Uploaded
nonebot_plugin_taozi_music-0.1.0.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nonebot-plugin-taozi-music 0.1.0
File Interpreter ABI Platform
nonebot_plugin_taozi_music-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / nonebot_plugin_taozi_music-0.1.0.tar.gz

Download URL nonebot_plugin_taozi_music-0.1.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
839acc408b3ba81a3d82dbe36ffa660b005f6a32051ca548a017f88f76aa81d9
BLAKE2b-256 checksum
How to use checksums
1e34ceaf7c049f964ac17f37c294faf855d24c0b71323525b9993b22f65dd0a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release files / nonebot_plugin_taozi_music-0.1.0-py3-none-any.whl

Download URL nonebot_plugin_taozi_music-0.1.0-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e63b20fcf532f5fce37bb2e876ed48569c2a07745b9af04466cd8ae32e8be43
BLAKE2b-256 checksum
How to use checksums
f87f90a8442030f4a050978872a1107a1a629a6864aa4e1ae59409784e44980d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.9

Release history Release notifications | RSS feed

0.3.0

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

This release

0.1.0 This release

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