Giter VIP home page Giter VIP logo

nonebot-plugin-whateat-pic's Introduction

Hi there 👋

  • 🌱 I’m currently learning Nonebot2
  • 👯 I’m looking to collaborate on nb2 plugins
  • 🤔 I’m looking for help withnb2 plugin with a pet game
  • 📫 How to reach me: [email protected]
  • ⚡ Fun fact: There's nothing! lol

head


how many poeple have watched me?

Visitor Count

What languages I am using?

Top Langs

How is my projects?

Cvandia's GitHub stats

What i m using?

nonebot-plugin-whateat-pic's People

Contributors

cvandia avatar xiaowangsec avatar

Stargazers

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

Watchers

 avatar

Forkers

agnes4m hui-ld

nonebot-plugin-whateat-pic's Issues

添加菜单无反应,使用“查看全部菜单”时报错

我是小白不懂弄,看到作者大佬最近在更新了,但加qq还没回应,在这报一下

环境:win10x64 + LLonebot3.27.2 + nonebot2

发送指令“添加菜单”没有响应,加菜单名和图片也没有(我修改了配置项所以不需要开头的/)

07-22 16:52:11 [SUCCESS] nonebot | OneBot V11 2040209149 | [message.group.normal]: Message -2147481077 from 1925477085@[群:690623209] '添加菜单'
07-22 16:54:34 [SUCCESS] nonebot | OneBot V11 2040209149 | [message.group.normal]: Message -2147481076 from 1925477085@[群:690623209] '添加饮品 '
07-22 16:55:02 [SUCCESS] nonebot | OneBot V11 2040209149 | [message.group.normal]: Message -2147481075 from 1925477085@[群:690623209] '添加饮料'
07-22 16:56:46 [SUCCESS] nonebot | OneBot V11 2040209149 | [message.group.normal]: Message -2147481074 from 1925477085@[群:690623209] '添加菜单 法环小零食 [image:file=C7EAF474A76E3EC420C9D144FE6F8125.png,subType=0,url=https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=CgoxOTI1...,file_size=640683]'

查看全部菜单的图片素材确实下载到了插件文件夹下,但发出要等很久,而且在调用send_forward_msg时报一串

07-22 16:34:41 [SUCCESS] nonebot | OneBot V11 2040209149 | [message.group.normal]: Message -2147481154 from 1925477085@[群:690623209] '查看全部菜单'
07-22 16:34:41 [INFO] nonebot | Event will be handled by Matcher(type='message', module=nonebot_plugin_whateat_pic, lineno=77)
07-22 16:35:11 [INFO] nonebot | Matcher(type='message', module=nonebot_plugin_whateat_pic, lineno=77) running complete
07-22 16:35:11 [ERROR] nonebot | Running Matcher(type='message', module=nonebot_plugin_whateat_pic, lineno=77) failed.
Traceback (most recent call last):
  File "<string>", line 15, in <module>
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot\__init__.py", line 335, in run
    get_driver().run(*args, **kwargs)
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot\drivers\fastapi.py", line 186, in run
    uvicorn.run(
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\uvicorn\main.py", line 577, in run
    server.run()
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\uvicorn\server.py", line 65, in run
    return asyncio.run(self.serve(sockets=sockets))
  File "C:\Users\Cyber\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\Cyber\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 629, in run_until_complete
    self.run_forever()
  File "C:\Users\Cyber\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 316, in run_forever
    super().run_forever()
  File "C:\Users\Cyber\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 596, in run_forever
    self._run_once()
  File "C:\Users\Cyber\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1890, in _run_once
    handle._run()
  File "C:\Users\Cyber\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 80, in _run
    self._context.run(self._callback, *self._args)
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher
    await _run_matcher(
>File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot\message.py", line 428, in _run_matcher
    await matcher.run(bot, event, state, stack, dependency_cache)
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 850, in run
    await self.simple_run(bot, event, state, stack, dependency_cache)
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot\internal\matcher\matcher.py", line 825, in simple_run
    await handler(
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot\dependencies\__init__.py", line 94, in __call__
    return await cast(Callable[..., Awaitable[R]], self.call)(**values)
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot_plugin_whateat_pic\__init__.py", line 224, in handle
    await send_forward_msg(bot, event, Bot_NICKNAME, bot.self_id, msg_list)
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot_plugin_whateat_pic\__init__.py", line 334, in send_forward_msg
    return await bot.call_api(
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot\internal\adapter\bot.py", line 122, in call_api
    raise exception
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot\internal\adapter\bot.py", line 97, in call_api
    result = await self.adapter._call_api(self, api, **data)
  File "F:\nonebot\FF_nb\.venv\lib\site-packages\nonebot\adapters\onebot\v11\adapter.py", line 149, in _call_api
    raise NetworkError(f"WebSocket call api {api} timeout") from None
nonebot.adapters.onebot.v11.exception.NetworkError: NetWorkError(message='WebSocket call api send_group_forward_msg timeout')

正则表达式修改建议

what_eat=on_regex(r"^(/)?[今明后]?[天日]?(早|中|晚)?(上|午|餐|饭|夜宵)?吃(什么|啥|点啥)$",priority=5)
what_drink=on_regex(r"^(/)?[今明后]?[天日]?(早|中|晚)?(上|午|餐|饭|夜宵)?喝(什么|啥|点啥)$",priority=5)

48行从“好喝的”改成“好吃的”

在Ubuntu启动BOT报错

04-17 19:21:39 [ERROR] nonebot | Failed to import "nonebot_plugin_whateat_pic"
Traceback (most recent call last):
File "", line 12, in
File "/home/elaine/.cache/activestate/1e8d7fa3/usr/lib/python3.10/site-packages/nonebot/plugin/load.py", line 125, in load_from_toml
return load_all_plugins(plugins, plugin_dirs)
File "/home/elaine/.cache/activestate/1e8d7fa3/usr/lib/python3.10/site-packages/nonebot/plugin/load.py", line 62, in load_all_plugins
return manager.load_all_plugins()
File "/home/elaine/.cache/activestate/1e8d7fa3/usr/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 175, in load_all_plugins
return set(
File "/home/elaine/.cache/activestate/1e8d7fa3/usr/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 176, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))

File "/home/elaine/.cache/activestate/1e8d7fa3/usr/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 141, in load_plugin
module = importlib.import_module(name)
File "/home/elaine/.cache/activestate/1e8d7fa3/usr/lib/python3.10/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "/home/elaine/.cache/activestate/1e8d7fa3/usr/lib/python3.10/site-packages/nonebot/plugin/manager.py", line 240, in exec_module
super().exec_module(module)
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/elaine/.cache/activestate/1e8d7fa3/usr/lib/python3.10/site-packages/nonebot_plugin_whateat_pic/init.py", line 22, in
import requests
File "/home/elaine/.local/lib/python3.10/site-packages/requests/init.py", line 43, in
import urllib3
ModuleNotFoundError: No module named 'urllib3'

请大大帮帮看看这个叫urllib3的东西是怎么辉石qwq

关于匹配规则的建议

^((今天|明天)|(今天|明天)?(早上|晚上|中午|夜宵))吃什么$
匹配吃什么
^((今天|明天)|(今天|明天)?(早上|晚上|中午|夜宵))喝什么$
匹配喝什么

防止一些误触发

插件不响应命令

image
已经确认加载,对比如/今天吃什么 吃什么 和不加/都没反应,我机器人是命令识别设置是
image

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.