Skip to main content

NoneBot 听歌房插件

Project description

nonebot

NoneBot Plugin Alisten

✨ NoneBot 听歌房插件 ✨

license pypi python

安装

使用 nb-cli 安装:

nb plugin install nonebot-plugin-alisten

使用 pip 安装:

pip install nonebot-plugin-alisten

使用 uv 安装:

uv add nonebot-plugin-alisten

功能特性

  • 🎵 支持多音乐平台:网易云音乐、QQ音乐、Bilibili
  • 🎯 支持多种搜索方式:歌曲名、BV号、特定平台歌曲名
  • 🏠 支持多房间配置,每个群组独立管理
  • 🔒 支持房间密码保护
  • 👥 用户友好的点歌体验

命令

待插件启动完成后,发送 /music/点歌 可开始点歌。

点歌命令

功能 命令 权限 说明
普通点歌 /music <歌曲名> 所有人 使用歌曲名搜索并点歌(默认网易云)
中文点歌 /点歌 <歌曲名> 所有人 中文别名,功能同上
指定平台点歌 /music <平台>:<歌曲信息> 所有人 指定音乐平台进行点歌
B站视频点歌 /music <BV号> 所有人 使用Bilibili BV号点歌

支持的音乐平台:

  • wy: 网易云音乐
  • qq: QQ音乐
  • db: Bilibili

使用示例:

/music Sagitta luminis          # 搜索歌曲名
/点歌 青花瓷                     # 使用中文别名
/music BV1Xx411c7md            # 使用B站BV号
/music qq:青花瓷                # 指定QQ音乐搜索
/music wy:青花瓷                # 指定网易云搜索

配置命令

功能 命令 权限 说明
设置配置 /alisten config set <服务器地址> <房间ID> [房间密码] 超级用户 配置alisten服务器信息
查看配置 /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.2.0.tar.gz (9.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.2.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nonebot_plugin_alisten-0.2.0.tar.gz
  • Upload date:
  • Size: 9.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.2.0.tar.gz
Algorithm Hash digest
SHA256 7558215a17d8459ee69080dfb7d065b4d3f38de6faa326c4a5834ee999a14ae9
MD5 789ba6bffdd7c3899bff0302d84d6fef
BLAKE2b-256 835acc6d52f42066d856a6e568ac5c69f1a9641fe3bc4574d414609bae3f55ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_alisten-0.2.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.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nonebot_plugin_alisten-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 31af585e936f35b640895957448e0afaa9d976d198c2cae2b3810bbbfc5bcccc
MD5 3d1701e582773b483e2d215f64afb7c0
BLAKE2b-256 608eef91451600f94d684ef4e03d03629181b646ea167728b6c9ca4582a59806

See more details on using hashes here.

Provenance

The following attestation bundles were made for nonebot_plugin_alisten-0.2.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