Skip to main content

NoneBot 听歌房插件

Project description

nonebot

NoneBot Plugin Alisten

✨ NoneBot 听歌房插件 ✨

license pypi python codecov

安装

使用 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 skip /切歌 所有人 投票跳过当前正在播放的音乐
查看播放列表 /alisten music playlist /播放列表 所有人 查看当前房间的播放列表
删除音乐 /alisten music delete <音乐名称> /删除音乐 <音乐名称> 所有人 从播放列表中删除指定的音乐
点赞音乐 /alisten music good <音乐名称> /点赞音乐 <音乐名称> 所有人 为播放列表中的音乐点赞

房间管理

功能 命令 权限 说明
查看房间信息 /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                                     # 删除配置

使用前准备

  1. 部署 alisten 服务

    需要先部署 alisten 服务端,具体部署方法请参考 alisten 官方文档

  2. 配置 alisten 服务

    在使用前,需要使用超级用户权限为每个群组配置 alisten 服务信息:

    /alisten config set <alisten服务器地址> <房间ID> [房间密码]
    
  3. 开始点歌

    配置完成后,群成员即可使用点歌命令享受音乐。

依赖说明

本插件依赖以下组件:

开发

环境要求

  • Python 3.12+
  • NoneBot 2.4.3+

本地开发

  1. 克隆仓库

    git clone https://github.com/bihua-university/nonebot-plugin-alisten.git
    cd nonebot-plugin-alisten
    
  2. 安装依赖

    uv sync
    
  3. 运行测试

    uv run poe test
    

许可证

本项目使用 MIT 许可证开源。

鸣谢

  • Alisten - 提供音乐服务支持
  • NoneBot2 - 优秀的 Python 异步聊天机器人框架

感谢以下开发者作出的贡献:

contributors

Project details


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_alisten-0.3.0.tar.gz (11.4 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_alisten-0.3.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file nonebot_plugin_alisten-0.3.0.tar.gz.

File metadata

  • Download URL: nonebot_plugin_alisten-0.3.0.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nonebot_plugin_alisten-0.3.0.tar.gz
Algorithm Hash digest
SHA256 89a4cd5f217f9afbe7d369249b53e312922a4b677911551512f3ee47786b0f79
MD5 3d78d7c0c1ca62d87a10493fe62b53f3
BLAKE2b-256 9f9a12856335328b21d382accbba02e6416d471f54a7fac4a0e1d283e4cceb1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_alisten-0.3.0.tar.gz:

Publisher: release.yml on bihua-university/nonebot-plugin-alisten

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nonebot_plugin_alisten-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_alisten-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1dafbdb84d76be7bc7bd9d91f52d1c71acc7d99086efc61fefa3f26098561c9
MD5 010e05a0c3853397b27d0ec2461a03aa
BLAKE2b-256 7e41e8228bc31547dc33f6bb63d466fa3fdd87359b90fe1fb6905dfb29a3744d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_alisten-0.3.0-py3-none-any.whl:

Publisher: release.yml on bihua-university/nonebot-plugin-alisten

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page