Coder Social home page Coder Social logo

nonebot_plugin_songpicker2's Introduction

songpicker2

适用于nonebot2的点歌插件,数据源为网易云音乐。

能开源出来的新版本还在摸,暂时先当api参考项目用吧。

安装

  • 使用nb-cli(推荐)
nb plugin install nonebot_plugin_songpicker2
  • 使用poetry
poetry add nonebot_plugin_songpicker2
  • 使用git clone(不推荐)
git clone https://github.com/maxesisn/nonebot_plugin_songpicker2
  
之后手动复制文件或创建软链接

开始使用

发送点歌+歌曲名,从插件所给的候选项中选择歌曲。

配置

还没做

nonebot_plugin_songpicker2's People

Contributors

littlemio avatar maxesisn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

nonebot_plugin_songpicker2's Issues

不能完成点歌操作

nonebot | Running matcher <Matcher from nonebot_plugin_songpicker2, type=message, priority=0, temp=True> failed.
Traceback (most recent call last):
File "/usr/bin/nb", line 8, in
sys.exit(main())
File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/.local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.8/site-packages/nb_cli/commands/main.py", line 30, in run
run_bot(file, app)
File "/home/ubuntu/.local/lib/python3.8/site-packages/nb_cli/handlers/deploy.py", line 24, in run_bot
nonebot.run(app=f"{module_name}:{app}")
File "/home/ubuntu/.local/lib/python3.8/site-packages/nonebot/init.py", line 300, in run
get_driver().run(*args, **kwargs)
File "/home/ubuntu/.local/lib/python3.8/site-packages/nonebot/drivers/fastapi.py", line 232, in run
uvicorn.run(
File "/home/ubuntu/.local/lib/python3.8/site-packages/uvicorn/main.py", line 447, in run
server.run()
File "/home/ubuntu/.local/lib/python3.8/site-packages/uvicorn/server.py", line 68, in run
return asyncio.run(self.serve(sockets=sockets))
File "/usr/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/home/ubuntu/.local/lib/python3.8/site-packages/nonebot/message.py", line 158, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)

File "/home/ubuntu/.local/lib/python3.8/site-packages/nonebot/message.py", line 207, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/home/ubuntu/.local/lib/python3.8/site-packages/nonebot/matcher.py", line 742, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/home/ubuntu/.local/lib/python3.8/site-packages/nonebot/matcher.py", line 709, in simple_run
await handler(
File "/home/ubuntu/.local/lib/python3.8/site-packages/nonebot/dependencies/init.py", line 76, in call
return await self.call(**values)
File "/home/ubuntu/.local/lib/python3.8/site-packages/nonebot_plugin_songpicker2/init.py", line 40, in handle_songNum
songNum = int(state["songNum"])
TypeError: int() argument must be a string, a bytes-like object or a number, not 'Message'

KeyError: 'songs'

File "src/plugins\nonebot_plugin_songpicker2\data_source.py", line 105, in songInfo
songInfo["songName"] = r["songs"][0]["name"]
KeyError: 'songs'

关于重选

如果不重选直接点歌的话会无回应,也就是说,在发完热评,还想重新点歌的话必须发一句不相关的话,才能再次点歌

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.