基于 qqbotsdk 的群点歌机器人: - 点歌 <歌名>:Markdown 选歌菜单,每行 5 个编号回调按钮 + 上下页 (每页 MENU_PAGE_SIZE 首,默认 10,受内嵌键盘 5 行限制上限 20) - 点编号弹歌曲卡片:[▶播放] 发语音 / [⬇下载] 发文件或直链(SEND_MODE) - 支持不 @ 机器人也能触发(GROUP_MESSAGE_CREATE 全量模式), 按 msg_id 排重并拦截机器人自发消息回推(self-echo) - 直链候选源回退:tx 等源受 CDN 风控时按 kw/wy/mg 逐个换源 - 自动撤回(WITHDRAW)翻页撤旧菜单、选歌撤菜单、点击后撤卡片
39 lines
861 B
TOML
39 lines
861 B
TOML
[project]
|
||
name = "musicbot"
|
||
version = "0.1.0"
|
||
description = "QQ 群点歌 bot:MusicServer 搜索 + 选歌菜单 + 歌曲卡片回调按钮"
|
||
requires-python = ">=3.13"
|
||
dependencies = ["qqbotsdk", "loguru"]
|
||
|
||
[project.scripts]
|
||
musicbot = "musicbot.main:main"
|
||
|
||
[build-system]
|
||
requires = ["uv_build>=0.12.7,<0.13.0"]
|
||
build-backend = "uv_build"
|
||
|
||
[tool.uv.build-backend]
|
||
module-root = "" # flat 布局:musicbot/ 在仓库根而非 src/ 下
|
||
|
||
[dependency-groups]
|
||
dev = ["pyright", "pytest", "pytest-asyncio", "ruff"]
|
||
|
||
[tool.uv.sources]
|
||
qqbotsdk = { git = "https://gitea.4i.hk/hhhge/qqbotsdk.git" }
|
||
|
||
[tool.pytest.ini_options]
|
||
asyncio_mode = "auto"
|
||
|
||
[tool.ruff]
|
||
target-version = "py313"
|
||
line-length = 88
|
||
|
||
[tool.ruff.lint]
|
||
select = ["E", "F", "W", "I", "UP", "B", "SIM"]
|
||
|
||
[tool.ruff.lint.pydocstyle]
|
||
convention = "google"
|
||
|
||
[tool.pyright]
|
||
typeCheckingMode = "standard"
|