karisaya / nonebot_plugin_groupmate_waifu Goto Github PK
View Code? Open in Web Editor NEW娶群友
License: MIT License
娶群友
License: MIT License
Python版本为3.8
我不知道是不是python版本的问题
系统环境为Ubuntu,Linux版本:Linux 5.10.110
Arm架构
小声bb:没看懂为什么会变成字典,前面不是
nonebot_plugin_groupmate_waifu/__init__.py
Lines 316 to 318 in bf08bc8
我怕群没了,毕竟不是我的群
07-19 23:51:50 [ERROR] nonebot | Rule check failed for Matcher(type='message', module=extensive_plugin.nonebot_plugin_groupmate_waifu). Traceback (most recent call last): File "D:\zhenxun_bot\bot.py", line 21, in nonebot.run() File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-gM3lmNrj-py3.9\lib\site-packages\nonebot_init_.py", line 309, in run get_driver().run(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-gM3lmNrj-py3.9\lib\site-packages\nonebot\drivers\fastapi.py", line 198, in run uvicorn.run( File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-gM3lmNrj-py3.9\lib\site-packages\uvicorn\main.py", line 568, in run server.run() File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-gM3lmNrj-py3.9\lib\site-packages\uvicorn\server.py", line 59, in run return asyncio.run(self.serve(sockets=sockets)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\runners.py", line 44, in run return loop.run_until_complete(main) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 629, in run_until_complete self.run_forever() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\windows_events.py", line 316, in run_forever super().run_forever() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 596, in run_forever self._run_once() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\base_events.py", line 1890, in _run_once handle._run() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 80, in _run self._context.run(self._callback, *self._args) > File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-gM3lmNrj-py3.9\lib\site-packages\nonebot\message.py", line 130, in check_matcher ) or not await Matcher.check_rule(bot, event, state, stack, dependency_cache): File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-gM3lmNrj-py3.9\lib\site-packages\nonebot\internal\matcher\matcher.py", line 303, in check_rule return event_type == (cls.type or event_type) and await cls.rule( File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-gM3lmNrj-py3.9\lib\site-packages\nonebot\internal\rule.py", line 73, in call results = await asyncio.gather( File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-gM3lmNrj-py3.9\lib\site-packages\nonebot\dependencies_init.py", line 110, in call return await run_sync(cast(Callable[..., R], self.call))(**values) File "C:\Users\Administrator\AppData\Local\pypoetry\Cache\virtualenvs\zhenxun-bot-gM3lmNrj-py3.9\lib\site-packages\nonebot\utils.py", line 114, in wrapper result = await loop.run_in_executor(None, pfunc) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python39\lib\concurrent\futures\thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "D:\zhenxun_bot\extensive_plugin\nonebot_plugin_groupmate_waifu_init.py", line 349, in rule = lambda event:event.group_id in record_CP and record_CP[event.group_id].get(event.user_id,event.user_id) != event.user_id, AttributeError: 'PrivateMessageEvent' object has no attribute 'group_id'
奇怪的bug.jpeg
已知情况:在超管插件关闭ex文件夹中的扩展插件时会引发上述报错
而关闭原有基础插件时则正常
更改waifu_reset:bool = false以后 有的群友会永远娶群友失败。。不知道是为什么
例如,在第一次使用娶群友时,成功的话,会在回复的消息中在第一行显示当时时间,并且会记录当时的时间,然后在之后再次使用娶群友时会提示说,你已经在xxxx时间娶了xxx了,不能花心哦~ ,之类的。
希望能在离婚时,也增加一个时间的信息,例如在xxxx时间,A和B离婚了,不如说能像涩涩记录一样也整一个结婚记录,可以查看结婚次数和离婚次数,并且记录当时结婚和离婚的时间。嗯。
(这么说,透群友也能加个时间,像是什么时候被透,什么时候透了别人)
nonebot-adapter-onebot 2.1.3 nonebot-plugin-abbrreply 1.1.2 nonebot-plugin-alipayvoice 0.5.0 nonebot-plugin-analysis-bilibili 2.4.4 nonebot-plugin-apscheduler 0.2.0 nonebot-plugin-baidutranslate 0.1.1 nonebot-plugin-bangumi-search 1.0.1 nonebot-plugin-bilicover 0.2.0 nonebot-plugin-chatrecorder 0.1.8 nonebot-plugin-datastore 0.3.1 nonebot-plugin-ddcheck 0.1.14 nonebot-plugin-emojimix 0.1.8 nonebot-plugin-epicfree 0.1.9 nonebot-plugin-giyf 0.1.3 nonebot-plugin-groupmate-waifu 1.2.0 nonebot-plugin-gsmaterial 0.1.6 nonebot-plugin-htmlrender 0.2.0.1 nonebot-plugin-imageutils 0.1.8.1 nonebot-plugin-kawaii-robot 3.2.1 nonebot-plugin-localstore 0.1.0 nonebot-plugin-manager 0.5.9 nonebot-plugin-memes 0.3.3 nonebot-plugin-moegoe 0.5.2 nonebot-plugin-morning 0.3.1 nonebot-plugin-oddtext 0.1.1 nonebot-plugin-petpet 0.3.9 nonebot-plugin-qrcode 0.0.5 nonebot-plugin-russian-ban 1.0.1 nonebot-plugin-simplemusic 0.1.3 nonebot-plugin-status 0.4.0 nonebot-plugin-tarot 0.3.3 nonebot-plugin-what2eat 0.3.4 nonebot-plugin-withdraw 0.2.3 nonebot-plugin-wordcloud 0.2.4
报错
Traceback (most recent call last):
File "/usr/local/python3/bin/nb", line 8, in
sys.exit(main())
File "/usr/local/python3/lib/python3.8/site-packages/click/core.py", line 1128, in call
return self.main(*args, **kwargs)
File "/usr/local/python3/lib/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/python3/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/python3/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/python3/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/python3/lib/python3.8/site-packages/nb_cli/commands/main.py", line 30, in run
run_bot(file, app)
File "/usr/local/python3/lib/python3.8/site-packages/nb_cli/handlers/deploy.py", line 20, in run_bot
module = importlib.import_module(module_name)
File "/usr/local/python3/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/root/LX_Bot/./bot.py", line 32, in
nonebot.load_from_toml("pyproject.toml")
File "/usr/local/python3/lib/python3.8/site-packages/nonebot/plugin/load.py", line 119, in load_from_toml
return load_all_plugins(plugins, plugin_dirs)
File "/usr/local/python3/lib/python3.8/site-packages/nonebot/plugin/load.py", line 53, in load_all_plugins
return manager.load_all_plugins()
File "/usr/local/python3/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 172, in load_all_plugins
return set(
File "/usr/local/python3/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 173, in
filter(None, (self.load_plugin(name) for name in self.available_plugins))
File "/usr/local/python3/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 144, in load_plugin
module = importlib.import_module(name)
File "/usr/local/python3/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "/usr/local/python3/lib/python3.8/site-packages/nonebot/plugin/manager.py", line 237, in exec_module
super().exec_module(module)
File "", line 843, in exec_module
File "", line 219, in _call_with_frames_removed
File "/usr/local/python3/lib/python3.8/site-packages/nonebot_plugin_groupmate_waifu/init.py", line 389, in
@scheduler.scheduled_job("cron",hour = 0)
File "/usr/local/python3/lib/python3.8/site-packages/nonebot/plugin/export.py", line 38, in call
self[func.name] = func
AttributeError: 'str' object has no attribute 'name'
ntr时没有输出信息,在日志里发现如下信息
Running Matcher(type='message', module=nonebot_plugin_groupmate_waifu) failed.
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/usr/local/lib/python3.10/dist-packages/nonebot/__init__.py", line 273, in run
get_driver().run(*args, **kwargs)
│ │ └ {}
│ └ ()
└ <function get_driver at 0x7f6646655ea0>
File "/usr/local/lib/python3.10/dist-packages/nonebot/drivers/fastapi.py", line 172, in run
uvicorn.run(
│ └ <function run at 0x7f6645e2fd90>
└ <module 'uvicorn' from '/usr/local/lib/python3.10/dist-packages/uvicorn/__init__.py'>
File "/usr/local/lib/python3.10/dist-packages/uvicorn/main.py", line 569, in run
server.run()
│ └ <function Server.run at 0x7f6645e481f0>
└ <uvicorn.server.Server object at 0x7f6644ea33d0>
File "/usr/local/lib/python3.10/dist-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
│ │ │ │ └ None
│ │ │ └ <function Server.serve at 0x7f6645e48280>
│ │ └ <uvicorn.server.Server object at 0x7f6644ea33d0>
│ └ <function run at 0x7f66477cb9a0>
└ <module 'asyncio' from '/usr/lib/python3.10/asyncio/__init__.py'>
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
│ │ └ <coroutine object Server.serve at 0x7f66252575a0>
│ └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects>
└ <uvloop.Loop running=True closed=False debug=False>
File "/usr/local/lib/python3.10/dist-packages/nonebot/message.py", line 142, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function matcher_mutex at 0x7f6644ebc940>: <Task finished name='Task-2259286' coro=<AsyncExitStack.enter_async_context() do...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7f6623c36140>
│ │ │ │ └ {'_prefix': {'command': ('娶群友',), 'raw_command': '娶群友', 'command_arg': [MessageSegment(type='at', data={'qq': '隐藏'}),...
│ │ │ └ GroupMessageEvent(time=1675480686, self_id=隐藏, post_type='message', sub_type='normal', user_id=隐藏, message_ty...
│ │ └ Bot(type='OneBot V11', self_id='隐藏')
│ └ Matcher(type='message', module=nonebot_plugin_groupmate_waifu)
└ <function _run_matcher at 0x7f66463ae320>
> File "/usr/local/lib/python3.10/dist-packages/nonebot/message.py", line 188, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function matcher_mutex at 0x7f6644ebc940>: <Task finished name='Task-2259286' coro=<AsyncExitStack.enter_async_context() do...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7f6623c36140>
│ │ │ │ └ {'_prefix': {'command': ('娶群友',), 'raw_command': '娶群友', 'command_arg': [MessageSegment(type='at', data={'qq': '隐藏'}),...
│ │ │ └ GroupMessageEvent(time=1675480686, self_id=隐藏, post_type='message', sub_type='normal', user_id=隐藏, message_ty...
│ │ └ Bot(type='OneBot V11', self_id='隐藏')
│ └ <function Matcher.run at 0x7f664669dea0>
└ Matcher(type='message', module=nonebot_plugin_groupmate_waifu)
File "/usr/local/lib/python3.10/dist-packages/nonebot/internal/matcher/matcher.py", line 727, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function matcher_mutex at 0x7f6644ebc940>: <Task finished name='Task-2259286' coro=<AsyncExitStack.enter_async_context() do...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7f6623c36140>
│ │ │ │ └ {'_prefix': {'command': ('娶群友',), 'raw_command': '娶群友', 'command_arg': [MessageSegment(type='at', data={'qq': '隐藏'}),...
│ │ │ └ GroupMessageEvent(time=1675480686, self_id=隐藏, post_type='message', sub_type='normal', user_id=隐藏, message_ty...
│ │ └ Bot(type='OneBot V11', self_id='隐藏')
│ └ <function Matcher.simple_run at 0x7f664669de10>
└ Matcher(type='message', module=nonebot_plugin_groupmate_waifu)
File "/usr/local/lib/python3.10/dist-packages/nonebot/internal/matcher/matcher.py", line 702, in simple_run
await handler(
└ Dependent(call=_)
File "/usr/local/lib/python3.10/dist-packages/nonebot/dependencies/__init__.py", line 108, in __call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
│ │ │ │ │ │ └ {'bot': Bot(type='OneBot V11', self_id='隐藏'), 'event': GroupMessageEvent(time=1675480686, self_id=隐藏, post_ty...
│ │ │ │ │ └ <function _ at 0x7f6625224f70>
│ │ │ │ └ Dependent(call=_)
│ │ │ └ ~R
│ │ └ typing.Awaitable
│ └ typing.Callable
└ <function cast at 0x7f664784b6d0>
File "/usr/local/lib/python3.10/dist-packages/nonebot_plugin_groupmate_waifu/__init__.py", line 137, in _
"ta的CP:" + ( member['card'] or member['nickname'] ),
UnboundLocalError: local variable 'member' referenced before assignment
我想让卡池变少如何操作呢
11-06 11:41:18 [ERROR] nonebot | Running Matcher(type='message', module=extensive_plugin.nonebot_plugin_groupmate_waifu, lineno=471) failed.
Traceback (most recent call last):
File "D:\BOT\zhenxun_bot\bot.py", line 22, in
nonebot.run()
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot_init_.py", line 331, in run
get_driver().run(*args, **kwargs)
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\drivers\fastapi.py", line 201, in run
uvicorn.run(
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\main.py", line 578, in run
server.run()
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\site-packages\uvicorn\server.py", line 61, in run
return asyncio.run(self.serve(sockets=sockets))
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
return loop.run_until_complete(main)
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 636, in run_until_complete
self.run_forever()
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\asyncio\windows_events.py", line 321, in run_forever
super().run_forever()
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 603, in run_forever
self._run_once()
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1906, in _run_once
handle._run()
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\asyncio\events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 476, in check_and_run_matcher
await run_matcher(
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\message.py", line 428, in run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher\matcher.py", line 846, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\internal\matcher\matcher.py", line 821, in simple_run
await handler(
File "C:\Users\550N\AppData\Local\Programs\Python\Python310\lib\site-packages\nonebot\dependencies_init.py", line 113, in call
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "D:\BOT\zhenxun_bot\extensive_plugin\nonebot_plugin_groupmate_waifu_init.py", line 478, in _
rule_out = protect_list.get(group_id,set()) | set(record_CP.get(group_id).keys())
AttributeError: 'NoneType' object has no attribute 'keys'
不知道是不是我配置的问题?(
群友在使用 离婚/分手
之后不会有任何提示 ,之后再次使用 离婚/分手
指令之后会直接提示cd剩余xxx分钟
希望可以新增提示和新功能
离婚/分手
之后提示结果(无论此前是否有老婆)大佬加油! ovo
nonebot-plugin-imageutils根据作者注明将会在一段时间内停止使用,可采用同作者替代品 pil-utils
和其他插件同依赖,减去部分配置时间
机器人每次重启,本群cp的记录就清零重置了,怎么设置不重置清零呢
如题,运行代码是无效的(呜呜呜)
比如在群里发送:娶@某人
然后有概率成功或者失败
以及可以查看当前都有哪些配对
同时这些情况最好也能处理一下:
感谢大大!
python3.9.15,ubuntu20.04
其他指令都正常,只有分手/离婚没有回复信息(有时候有用有时候没用,但无论如何都没有回复信息)
是这么报错的:
nonebot.adapters.onebot.v11.exception.ActionFailed: ActionFailed(data=None, echo='6', message='send group message failed: blocked by server', msg='SEND_MSG_API_ERROR', retcode=100, status='failed', wording='send group message failed: blocked by server')
已经是二次风控了(而且娶群友一直失败,悲
重启机器人就会清空CP记录
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.