Giter Site home page Giter Site logo

nonebot-plugin-send's Introduction

晚上好~ 这里是星奈Sena⭐目前作为不活动系VUP996中~

こんばんは~せなです⭐いまわ活躍していないなVTBとして社畜中~

CiaoI'm Sena⭐Currently active as an inactive VTB


  • 技能点分配/スギル/Skills

github profile trophy


友链(Bilibili)

灯火橘

nonebot-plugin-send's People

Contributors

sena-nana avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

nonebot-plugin-send's Issues

信息转发通知报错 (与#3类似并找到了解决方法)

昨日,机器人在发送公告时,部分群聊未发送出去
然而在进行群聊排查时发现某群将机器人禁言
导致机器人发送消息失败,且gocq报错“群消息可能被风控”
而被禁言的群发送失败后,剩余未发送公告的群聊也会受到发送失败的影响,导致无法再次向后传递公告
可否做一个忽略群发送返回的功能?即无视各群聊发送信息的状态,直接发送公告呢?

在shamrock环境下出现的问题

如图所示,貌似插件在尝试往一个不存在的群聊里发送信息失败卡死了,而且我也找过了,并没有这个群聊早就解散了不知道为啥插件还能检测到,其他群聊并无收到消息(也有可能是和shamrock对接出现了问题?)Screenshot_20240103_000850_com.wujie.connect.jpg

有问题

| Running Matcher(type='message', module=nonebot_plugin_send.notice) failed.
Traceback (most recent call last):

File "", line 1, in
File "/root/anaconda3/envs/nonebot2/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
│ │ └ 3
│ └ 67
└ <function _main at 0x7fe8527be5e0>
File "/root/anaconda3/envs/nonebot2/lib/python3.9/multiprocessing/spawn.py", line 129, in _main
return self._bootstrap(parent_sentinel)
│ │ └ 3
│ └ <function BaseProcess._bootstrap at 0x7fe85293e040>

File "/root/anaconda3/envs/nonebot2/lib/python3.9/multiprocessing/process.py", line 315, in _bootstrap
self.run()
│ └ <function BaseProcess.run at 0x7fe85293d670>

File "/root/anaconda3/envs/nonebot2/lib/python3.9/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
│ │ │ │ │ └ {'config': <uvicorn.config.Config object at 0x7fe8527d74c0>, 'target': <bound method Server.run of <uvicorn.server.Server obj...
│ │ │ │ └
│ │ │ └ ()
│ │ └
│ └ <function subprocess_started at 0x7fe84ec7af70>

File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
target(sockets=sockets)
│ └ [<socket.socket fd=33, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 7070)>]
└ <bound method Server.run of <uvicorn.server.Server object at 0x7fe8527d74f0>>
File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/uvicorn/server.py", line 60, in run
return asyncio.run(self.serve(sockets=sockets))
│ │ │ │ └ [<socket.socket fd=33, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 7070)>]
│ │ │ └ <function Server.serve at 0x7fe84ec7a0d0>
│ │ └ <uvicorn.server.Server object at 0x7fe8527d74f0>
│ └ <function run at 0x7fe851878700>
└ <module 'asyncio' from '/root/anaconda3/envs/nonebot2/lib/python3.9/asyncio/init.py'>
File "/root/anaconda3/envs/nonebot2/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
│ │ └ <coroutine object Server.serve at 0x7fe84eb7fc40>
│ └ <method 'run_until_complete' of 'uvloop.loop.Loop' objects>
└ <uvloop.Loop running=True closed=False debug=False>
File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/nonebot/message.py", line 141, in _check_matcher
await _run_matcher(Matcher, bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function _command at 0x7fe850621940>: <Task finished name='Task-21536280' coro=<_command() done, defined at /root/anaconda3...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7fe82139ef70>
│ │ │ │ └ {'_prefix': {'command': ('.bc',), 'raw_command': '.bc', 'command_arg': [MessageSegment(type='text', data={'text': 'test'})], ...
│ │ │ └ PrivateMessageEvent(time=1674729290, self_id=1985689, post_type='message', sub_type='friend', user_id=68063855, message_type=...
│ │ └ Bot(type='OneBot V11', self_id='1985689')
│ └ Matcher(type='message', module=nonebot_plugin_send.notice)
└ <function _run_matcher at 0x7fe84e8a4820>

File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/nonebot/message.py", line 187, in _run_matcher
await matcher.run(bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function _command at 0x7fe850621940>: <Task finished name='Task-21536280' coro=<_command() done, defined at /root/anaconda3...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7fe82139ef70>
│ │ │ │ └ {'_prefix': {'command': ('.bc',), 'raw_command': '.bc', 'command_arg': [MessageSegment(type='text', data={'text': 'test'})], ...
│ │ │ └ PrivateMessageEvent(time=1674729290, self_id=1985689, post_type='message', sub_type='friend', user_id=68063855, message_type=...
│ │ └ Bot(type='OneBot V11', self_id='1985689')
│ └ <function Matcher.run at 0x7fe850621670>
└ Matcher(type='message', module=nonebot_plugin_send.notice)
File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 732, in run
await self.simple_run(bot, event, state, stack, dependency_cache)
│ │ │ │ │ │ └ {<function _command at 0x7fe850621940>: <Task finished name='Task-21536280' coro=<_command() done, defined at /root/anaconda3...
│ │ │ │ │ └ <contextlib.AsyncExitStack object at 0x7fe82139ef70>
│ │ │ │ └ {'_prefix': {'command': ('.bc',), 'raw_command': '.bc', 'command_arg': [MessageSegment(type='text', data={'text': 'test'})], ...
│ │ │ └ PrivateMessageEvent(time=1674729290, self_id=1985689, post_type='message', sub_type='friend', user_id=68063855, message_type=...
│ │ └ Bot(type='OneBot V11', self_id='1985689')
│ └ <function Matcher.simple_run at 0x7fe8506215e0>
└ Matcher(type='message', module=nonebot_plugin_send.notice)
File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/nonebot/internal/matcher/matcher.py", line 707, in simple_run
await handler(
└ Dependent(call=notice_receive)
File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-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='1985689'), 'event': PrivateMessageEvent(time=1674729290, self_id=1985689, post_type='...
│ │ │ │ │ └ <function notice_receive at 0x7fe8463f34c0>
│ │ │ │ └ Dependent(call=notice_receive)
│ │ │ └ ~R
│ │ └ typing.Awaitable
│ └ typing.Callable
└ <function cast at 0x7fe85296b550>
File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/nonebot_plugin_send/notice.py", line 15, in notice_receive
await bot.call_api('send_group_msg', **{
│ └ <function Bot.call_api at 0x7fe850968f70>
└ Bot(type='OneBot V11', self_id='1985689')
File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/nonebot/internal/adapter/bot.py", line 120, in call_api
raise exception
└ ActionFailed(data=None, echo='738', msg='SEND_MSG_API_ERROR', retcode=100, status='failed', wording='请参考 go-cqhttp 端输出')
File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/nonebot/internal/adapter/bot.py", line 98, in call_api
result = await self.adapter._call_api(self, api, **data)
│ │ │ │ │ └ {'message': 'test', 'group_id': 254571445}
│ │ │ │ └ 'send_group_msg'
│ │ │ └ Bot(type='OneBot V11', self_id='1985689')
│ │ └ <function Adapter._call_api at 0x7fe84e836b80>
│ └ Adapter(name='OneBot V11')
└ Bot(type='OneBot V11', self_id='1985689')
File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/nonebot/adapters/onebot/v11/adapter.py", line 132, in _call_api
return handle_api_result(await self._result_store.fetch(seq, timeout))
│ │ │ │ │ └ 30.0
│ │ │ │ └ 738
│ │ │ └ <function ResultStore.fetch at 0x7fe84e8368b0>
│ │ └ <nonebot.adapters.onebot.store.ResultStore object at 0x7fe84e83b250>
│ └ Adapter(name='OneBot V11')
└ <function handle_api_result at 0x7fe84e92a8b0>
File "/root/anaconda3/envs/nonebot2/lib/python3.9/site-packages/nonebot/adapters/onebot/v11/utils.py", line 58, in handle_api_result
raise ActionFailed(**result)
│ └ {'data': None, 'echo': '738', 'msg': 'SEND_MSG_API_ERROR', 'retcode': 100, 'status': 'failed', 'wording': '请参考 go-cqhttp 端输出'}
└ <class 'nonebot.adapters.onebot.v11.exception.ActionFailed'>

nonebot.adapters.onebot.v11.exception.ActionFailed: ActionFailed(data=None, echo='738', msg='SEND_MSG_API_ERROR', retcode=100, status='failed', wording='请参考 go-cqhttp 端输出')

可否指定send的账号

多开gocq情况下似乎会随机选一个账号作为send账号
有时候启动就会出现gocq报错:未添加XX为好友
能否制定一个Bot的账号呢

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

’set‘ object is not subscriptable

第20行获取superuser id是不是需要转换成整型,否则报错:
image

这样就没有报错了。
superuser = int(get_driver().config.superusers[0])

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.