NoneBot 听歌房插件
Project description
NoneBot Plugin Alisten
✨ NoneBot 听歌房插件 ✨
安装
使用 nb-cli 安装:
nb plugin install nonebot-plugin-alisten
使用 pip 安装:
pip install nonebot-plugin-alisten
使用 uv 安装:
uv add nonebot-plugin-alisten
功能特性
- 🎵 支持多音乐平台:网易云音乐、QQ音乐、Bilibili
- 🎯 支持多种搜索方式:歌曲名、BV号、特定平台歌曲名
- 🏠 支持多房间配置,每个群组独立管理
- 🔒 支持房间密码保护
- 👥 用户友好的点歌体验
命令
插件启动后,群内发送 /music 或 /点歌 即可开始点歌。
点歌命令
| 功能 | 命令 | 快捷方式 | 权限 | 说明 |
|---|---|---|---|---|
| 普通点歌 | /alisten music pick <歌曲名> |
/music <歌曲名> |
所有人 | 按歌曲名搜索并点歌(默认网易云:wy) |
| 中文别名点歌 | /alisten music pick <歌曲名> |
/点歌 <歌曲名> |
所有人 | 与 /music 等价 |
| 指定平台点歌 | /alisten music pick <平台>:<歌曲信息> |
/music <平台>:<歌曲信息> |
所有人 | 如 wy:歌名、qq:歌名 指定平台 |
| B 站视频点歌 | /alisten music pick <BV号> |
/music <BV号> |
所有人 | 通过 B 站 BV 号点歌 |
| ID 点歌 | /alisten music pick --id <平台>:<音乐ID> |
/music --id <平台>:<音乐ID> |
所有人 | 通过歌曲 ID 点歌 |
支持的音乐平台
wy:网易云音乐(默认)qq:QQ 音乐db:Bilibili
示例:
/music Sagitta luminis # 按歌曲名搜索并点歌
/点歌 青花瓷 # 中文别名
/music BV1Xx411c7md # 使用 B 站 BV 号点歌
/music qq:青花瓷 # 指定 QQ 音乐搜索
/music wy:青花瓷 # 指定网易云搜索
/music --id wy:123456 # 使用 ID 点歌
/搜索音乐 青花瓷 # 搜索音乐但不加入播放列表
/当前音乐 # 查看当前播放音乐
音乐管理
| 功能 | 命令 | 快捷方式 | 权限 | 说明 |
|---|---|---|---|---|
| 搜索音乐 | /alisten music search <关键词> |
/搜索音乐 <关键词> |
所有人 | 搜索音乐但不自动加入播放列表 |
| 查看当前音乐 | /alisten music current |
/当前音乐 |
所有人 | 查看当前正在播放的音乐信息 |
| 投票切歌 | /alisten music skip |
/切歌 |
所有人 | 投票跳过当前正在播放的音乐 |
| 查看播放列表 | /alisten music playlist |
/播放列表 |
所有人 | 查看当前房间的播放列表 |
| 删除音乐 | /alisten music delete <音乐名称> |
/删除音乐 <音乐名称> |
所有人 | 从播放列表中删除指定的音乐 |
| 点赞音乐 | /alisten music good <音乐名称> |
/点赞音乐 <音乐名称> |
所有人 | 为播放列表中的音乐点赞 |
| 设置播放模式 | /alisten music playmode <模式> |
/播放模式 <模式> |
所有人 | 设置播放模式(顺序播放/随机播放) |
房间管理
| 功能 | 命令 | 权限 | 说明 |
|---|---|---|---|
| 查看房间信息 | /alisten house info |
所有人 | 显示当前房间的详细信息 |
| 查看房间用户 | /alisten house user |
所有人 | 显示当前房间内的用户列表 |
配置命令(仅限超级用户)
| 功能 | 命令 | 说明 |
|---|---|---|
| 设置配置 | /alisten config set <服务器地址> <房间ID> [房间密码] |
设置或更新当前群组的配置 |
| 查看配置 | /alisten config show |
显示当前群组的配置 |
| 删除配置 | /alisten config delete |
删除当前群组的配置 |
示例:
/alisten config set http://localhost:8080 room123 # 无密码房间
/alisten config set http://localhost:8080 room123 password # 有密码房间
/alisten config show # 查看配置
/alisten config delete # 删除配置
使用前准备
-
部署 alisten 服务
需要先部署 alisten 服务端,具体部署方法请参考 alisten 官方文档。
-
配置 alisten 服务
在使用前,需要使用超级用户权限为每个群组配置 alisten 服务信息:
/alisten config set <alisten服务器地址> <房间ID> [房间密码]
-
开始点歌
配置完成后,群成员即可使用点歌命令享受音乐。
依赖说明
本插件依赖以下组件:
开发
环境要求
- Python 3.12+
- NoneBot 2.4.3+
本地开发
-
克隆仓库
git clone https://github.com/bihua-university/nonebot-plugin-alisten.git cd nonebot-plugin-alisten
-
安装依赖
uv sync -
运行测试
uv run poe test
许可证
本项目使用 MIT 许可证开源。
鸣谢
感谢以下开发者作出的贡献:
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_alisten-0.4.2.tar.gz.
File metadata
- Download URL: nonebot_plugin_alisten-0.4.2.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
835bf8461dd0490fe8084b17c35d60811b3e6048d8098de86582a02068f9519d
|
|
| MD5 |
58f51cfdeaf8c271e773c0b3e3e5e938
|
|
| BLAKE2b-256 |
7d21f3aab5ea8dee1afee3da074b30c8f204b0948c539ff8ef8f7852c31efebf
|
Provenance
The following attestation bundles were made for nonebot_plugin_alisten-0.4.2.tar.gz:
Publisher:
release.yml on bihua-university/nonebot-plugin-alisten
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_alisten-0.4.2.tar.gz -
Subject digest:
835bf8461dd0490fe8084b17c35d60811b3e6048d8098de86582a02068f9519d - Sigstore transparency entry: 564522059
- Sigstore integration time:
-
Permalink:
bihua-university/nonebot-plugin-alisten@fb97fe2e538ebd60a0e98c80217e12180b1943d7 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/bihua-university
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fb97fe2e538ebd60a0e98c80217e12180b1943d7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nonebot_plugin_alisten-0.4.2-py3-none-any.whl.
File metadata
- Download URL: nonebot_plugin_alisten-0.4.2-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdad5858eaf1bd73d7e64fcedeb4566fc36e28aa743a4b40ed461bb19d424953
|
|
| MD5 |
6328ca253a350d67ef7c843b2101eddf
|
|
| BLAKE2b-256 |
2557b5ae09bbda36b2d38e0ce369d83b222af31ba8bc40535b32b18bebcdea0d
|
Provenance
The following attestation bundles were made for nonebot_plugin_alisten-0.4.2-py3-none-any.whl:
Publisher:
release.yml on bihua-university/nonebot-plugin-alisten
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nonebot_plugin_alisten-0.4.2-py3-none-any.whl -
Subject digest:
fdad5858eaf1bd73d7e64fcedeb4566fc36e28aa743a4b40ed461bb19d424953 - Sigstore transparency entry: 564522065
- Sigstore integration time:
-
Permalink:
bihua-university/nonebot-plugin-alisten@fb97fe2e538ebd60a0e98c80217e12180b1943d7 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/bihua-university
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fb97fe2e538ebd60a0e98c80217e12180b1943d7 -
Trigger Event:
push
-
Statement type: