super1207 / kookonebot Goto Github PK
View Code? Open in Web Editor NEWonebot 11 in kook!!! kook = 开黑啦
License: MIT License
onebot 11 in kook!!! kook = 开黑啦
License: MIT License
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心跳响应包
[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":""之后可以运行
背景:今天(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
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.