Coder Social home page Coder Social logo

kookonebot's People

Contributors

fishroud avatar super1207 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

kookonebot's Issues

msg_id not found

2023-11-19 13:37:28.196 WARN kook_onebot: 欢迎使用KookOnebot by super1207!!! v0.0.12
2023-11-19 13:37:28.196 WARN kook_onebot: 开源地址:https://github.com/super1207/KookOneBot
2023-11-19 13:37:28.196 WARN kook_onebot: 正在加载配置文件...
...
...
2023-11-19 13:37:43.709 INFO kook_onebot::kook_onebot: KOOK_POST响应:{"code":40000,"message":"由于服务器维护,暂时无法进行此操作,带来不便请谅解","data":{"name":"Bad Request","status":400}}
2023-11-19 13:37:43.709 ERROR kook_onebot::kook_onebot: ONEBOT动作调用出错:"msg_id not found"
2023-11-19 13:37:43.709 INFO kook_onebot::kook_onebot: ONEBOT动作返回:{"echo":"4","retcode":-1,"status":"failed"}
2023-11-19 13:37:59.916 INFO kook_onebot::kook_onebot: 发送KOOK心跳:{"s":2,"sn":1}
2023-11-19 13:38:00.019 INFO kook_onebot::kook_onebot: 收到KOOK心跳响应包

nonebot v1报错WebSocket API call timeout

[2023-10-22 03:20:01,045 translate] ERROR: <class 'aiocqhttp.exceptions.NetworkError'> occured when translate handling message 1108037682.
[2023-10-22 03:20:01,045 translate] ERROR: WebSocket API call timeout
Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/api_impl.py", line 104, in fetch
    return await asyncio.wait_for(future, timeout_sec)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/qqbot/HoshinoBot/hoshino/msghandler.py", line 28, in handle_message
    await service_func.func(bot, event)
  File "/root/qqbot/HoshinoBot/hoshino/modules/translate_HoshinoBot/translate.py", line 29, in translate
    await bot.send(ev, message = f"{source} => {target_lang}\n{text}\n==========\n{translated}")
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/__init__.py", line 271, in send
    return await self.send_msg(**params)
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/__init__.py", line 238, in call_action
    return await self._api.call_action(action=action, **params)
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/api_impl.py", line 178, in call_action
    result = await self._wsr_api.call_action(action, **params)
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/api_impl.py", line 153, in call_action
    return _handle_api_result(await
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/api_impl.py", line 108, in fetch
    raise NetworkError('WebSocket API call timeout')
aiocqhttp.exceptions.NetworkError: WebSocket API call timeout
[2023-10-22 03:20:01,046 nonebot] INFO: Message 1108037682 is ignored: Handled by Hoshino

消息能正常发出来,kook_onebot端没有error日志,但是onebot那边过一会儿会给这个报错。

关于获取群列表,在频道数量过多时候的优化方向

但是我记得kook的查询guild信息接口,会包含一个默认文字频道
群太多就只1步获取
减去kook guild之后channel的2步api请求
或许能吧这个速度加快n倍
舍弃子频道获取,对于频道数过大的机器人会很有帮助

编译运行出错

2023-07-10 11:27:27.543 WARN kook_onebot: 欢迎使用KookOnebot by super1207!!! v0.0.7
2023-07-10 11:27:27.543 WARN kook_onebot: 开源地址:https://github.com/super1207/KookOneBot
2023-07-10 11:27:27.543 WARN kook_onebot: 正在加载配置文件...
thread 'main' panicked at '配置文件缺少 secret 字段', src/main.rs:95:44
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

在配置文件中添加"secret":""之后可以运行

错误信息没有正确返回给onebot

背景:今天(2023.10.23)一部分(或者全部)bot无法发送图片,频道内发送图片会收到由于服务器维护,暂时无法 进行此操作,带来不便请谅解的返回。这个错误信息没有返回到onebot

kookonebot这边的日志

2023-10-23 20:30:00.977  INFO kook_onebot::kook_onebot: 发送KOOK_POST:/message/create
{"content":"https://img.kookapp.cn/attachments/2023-10/22/xxxxxxxxxxxxxx.png","target_id":"4843263199681351","type":2}

2023-10-23 20:30:01.192  INFO kook_onebot::kook_onebot: KOOK_POST响应:{"code":40000,"message":"由于服务器维护,暂时无法 进行此操作,带来不便请谅解","data":{"name":"Bad Request","status":400}}
2023-10-23 20:30:01.192 ERROR kook_onebot::onebot_ws_rev: ONEBOT_WS_REV动作调用出错:Err("msg_id not found")

nonebot报WebSocket API call timeout

Traceback (most recent call last):
  File "/usr/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/api_impl.py", line 104, in fetch
    return await asyncio.wait_for(future, timeout_sec)
  File "/usr/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/HoshinoBot_yubao_KOOK/hoshino/msghandler.py", line 28, in handle_message
    await service_func.func(bot, event)
  File "/root/HoshinoBot_yubao_KOOK/hoshino/service.py", line 224, in wrapper
    return await func(bot, event)
  File "/root/HoshinoBot_yubao_KOOK/hoshino/modules/kaiheila/kaiheila.py", line 121, in kaiheila_server_status
    await bot.send(ev, msg)
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/__init__.py", line 271, in send
    return await self.send_msg(**params)
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/__init__.py", line 238, in call_action
    return await self._api.call_action(action=action, **params)
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/api_impl.py", line 178, in call_action
    result = await self._wsr_api.call_action(action, **params)
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/api_impl.py", line 153, in call_action
    return _handle_api_result(await
  File "/usr/local/lib/python3.9/dist-packages/aiocqhttp/api_impl.py", line 108, in fetch
    raise NetworkError('WebSocket API call timeout')
aiocqhttp.exceptions.NetworkError: WebSocket API call timeout

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.