[问题]群聊发送抽卡记录消息失败后,在私聊中“查看抽卡信息”会返回“UID已经在获取抽卡记录中,请勿重复发送”
RoundedOrange opened this issue · 0 comments
RoundedOrange commented
确认
环境信息
- 系统版本: Ubuntu Linux
- Python版本: 3.9
- Nonebot2版本: 3.0.8
问题描述
群聊发送抽卡记录消息被风控后,在私聊中“查看抽卡信息”会返回“UID已经在获取抽卡记录中,请勿重复发送”。
“查看抽卡记录”和“更新抽卡记录”都出现了相同的情况。
我怀疑是因为发送群聊抽卡记录过程中被风控后报错,导致再次发送抽卡记录的时候误以为上次的任务还没结束。
问题截图
群聊发送消息失败
07-06 09:51:35 [SUCCESS] nonebot | OneBot V11 2563313983 | [message.group.normal]: Message -1829234150 from 3121771311@[群:1163055529] "更新抽卡记录"
07-06 09:51:35 [INFO] nonebot | Event will be handled by Matcher(type='message', module=LittlePaimon.plugins.Paimon_Gacha_Log)
07-06 09:51:41 [INFO] nonebot | Matcher(type='message', module=LittlePaimon.plugins.Paimon_Gacha_Log) running complete
07-06 09:51:41 [ERROR] nonebot | Running Matcher(type='message', module=LittlePaimon.plugins.Paimon_Gacha_Log) failed.
Traceback (most recent call last):
File "bot.py", line 37, in <module>
nonebot.run(app="__mp_main__:app", access_log=False)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/__init__.py", line 309, in run
get_driver().run(*args, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/drivers/fastapi.py", line 198, in run
uvicorn.run(
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/uvicorn/main.py", line 569, in run
server.run()
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/uvicorn/server.py", line 60, 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 "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/message.py", line 467, in check_and_run_matcher
await _run_matcher(
> File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/message.py", line 419, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/internal/matcher/matcher.py", line 753, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/internal/matcher/matcher.py", line 728, in simple_run
await handler(
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/dependencies/__init__.py", line 108, in __call__
return await cast(Callable[..., Awaitable[R]], self.call)(**values)
File "/root/PaimonBot/LittlePaimon/LittlePaimon/plugins/Paimon_Gacha_Log/__init__.py", line 108, in _
await update_log.send(f'开始为UID{player[0].uid}更新抽卡记录,请稍候...')
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/internal/matcher/matcher.py", line 466, in send
return await bot.send(event=event, message=_message, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/adapters/onebot/v11/bot.py", line 220, in send
return await self.__class__.send_handler(self, event, message, **kwargs)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/adapters/onebot/v11/bot.py", line 174, in send
return await bot.send_msg(**params)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/internal/adapter/bot.py", line 120, in call_api
raise exception
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/internal/adapter/bot.py", line 98, in call_api
result = await self.adapter._call_api(self, api, **data)
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/adapters/onebot/v11/adapter.py", line 132, in _call_aa
pi
return handle_api_result(await self._result_store.fetch(seq, timeout))
File "/root/.cache/pypoetry/virtualenvs/littlepaimon-Yl79Fm97-py3.8/lib/python3.8/site-packages/nonebot/adapters/onebot/v11/utils.py", line 58, in handle_apii
_result
raise ActionFailed(**result)
nonebot.adapters.onebot.v11.exception.ActionFailed: ActionFailed(data=None, echo='28', message='send group message failed: blocked by server', msg='SEND_MSG_APP
I_ERROR', retcode=100, status='failed', wording='send group message failed: blocked by server')
复现步骤[可选]
- 在群聊中发送“查看抽卡记录”,小派蒙想要发送的群聊消息被拦截,报错。
- 然后私聊中发送“查看抽卡记录”,小派蒙返回“UID已经在获取抽卡记录中,请勿重复发送”。