diff --git a/HiraginoSansGB.ttc b/HiraginoSansGB.ttc new file mode 100644 index 00000000..0b0123aa Binary files /dev/null and b/HiraginoSansGB.ttc differ diff --git a/pkg/core/controller.py b/pkg/core/controller.py index 236dcde2..9cf4727a 100644 --- a/pkg/core/controller.py +++ b/pkg/core/controller.py @@ -78,6 +78,8 @@ async def _check_output(self, query: entities.Query, result: pipeline_entities.S self.ap.logger.debug(result.debug_notice) if result.console_notice: self.ap.logger.info(result.console_notice) + if result.error_notice: + self.ap.logger.error(result.error_notice) async def _execute_from_stage( self, diff --git a/pkg/pipeline/entities.py b/pkg/pipeline/entities.py index e687c082..305fbbeb 100644 --- a/pkg/pipeline/entities.py +++ b/pkg/pipeline/entities.py @@ -35,4 +35,7 @@ class StageProcessResult(pydantic.BaseModel): """只要设置了就会输出到控制台""" debug_notice: typing.Optional[str] = '' + + error_notice: typing.Optional[str] = '' + diff --git a/pkg/pipeline/process/handlers/chat.py b/pkg/pipeline/process/handlers/chat.py index 3e7673b1..c34f2298 100644 --- a/pkg/pipeline/process/handlers/chat.py +++ b/pkg/pipeline/process/handlers/chat.py @@ -2,6 +2,7 @@ import typing import time +import traceback import mirai @@ -78,6 +79,14 @@ async def handle( result_type=entities.ResultType.CONTINUE, new_query=query ) + except Exception as e: + yield entities.StageProcessResult( + result_type=entities.ResultType.INTERRUPT, + new_query=query, + user_notice=self.ap.tips_mgr.data['alter_tip_message'] if self.ap.cfg_mgr.data['hide_exce_info_to_user'] else f'{e}', + error_notice=f'{e}', + debug_notice=traceback.format_exc() + ) finally: query.session.using_conversation.messages.append(query.user_message) query.session.using_conversation.messages.extend(query.resp_messages) diff --git a/pkg/provider/requester/apis/chatcmpl.py b/pkg/provider/requester/apis/chatcmpl.py index 5101ad30..d82152bd 100644 --- a/pkg/provider/requester/apis/chatcmpl.py +++ b/pkg/provider/requester/apis/chatcmpl.py @@ -3,11 +3,14 @@ import asyncio import typing import json +from typing import AsyncGenerator import openai import openai.types.chat.chat_completion as chat_completion -from .. import api, entities +from pkg.provider.entities import Message + +from .. import api, entities, errors from ....core import entities as core_entities from ... import entities as llm_entities from ...tools import entities as tools_entities @@ -69,7 +72,7 @@ async def _closure( return message - async def request( + async def _request( self, query: core_entities.Query ) -> typing.AsyncGenerator[llm_entities.Message, None]: """请求""" @@ -116,3 +119,20 @@ async def request( pending_tool_calls = msg.tool_calls req_messages.append(msg.dict(exclude_none=True)) + + async def request(self, query: core_entities.Query) -> AsyncGenerator[Message, None]: + try: + async for msg in self._request(query): + yield msg + except asyncio.TimeoutError: + raise errors.RequesterError('请求超时') + except openai.BadRequestError as e: + raise errors.RequesterError(f'请求错误: {e.message}') + except openai.AuthenticationError as e: + raise errors.RequesterError(f'无效的 api-key: {e.message}') + except openai.NotFoundError as e: + raise errors.RequesterError(f'请求路径错误: {e.message}') + except openai.RateLimitError as e: + raise errors.RequesterError(f'请求过于频繁: {e.message}') + except openai.APIError as e: + raise errors.RequesterError(f'请求错误: {e.message}') diff --git a/pkg/provider/requester/errors.py b/pkg/provider/requester/errors.py new file mode 100644 index 00000000..4feddeab --- /dev/null +++ b/pkg/provider/requester/errors.py @@ -0,0 +1,5 @@ +class RequesterError(Exception): + """Base class for all Requester errors.""" + + def __init__(self, message: str): + super().__init__("模型请求失败: "+message) \ No newline at end of file diff --git a/test.html b/test.html new file mode 100644 index 00000000..bdb9b804 --- /dev/null +++ b/test.html @@ -0,0 +1,10 @@ + +
+Test
+This is a test for QChatGPT.
+ + \ No newline at end of file diff --git a/tests/models_api_compability/compability.py b/tests/models_api_compability/compability.py new file mode 100644 index 00000000..cbd75b82 --- /dev/null +++ b/tests/models_api_compability/compability.py @@ -0,0 +1,25 @@ + +import os + +import openai + +client = openai.Client( + api_key=os.environ["OPENAI_API_KEY"], +) + +openai.proxies = { + 'http': 'http://127.0.0.1:7890', + 'https': 'http://127.0.0.1:7890', +} + +resp = client.chat.completions.create( + model="code-davinci-002", + messages=[ + { + "role": "user", + "content": "Hello, how are you?", + } + ] +) + +print(resp) \ No newline at end of file diff --git a/tests/plugin_examples/auto_approval/main.py b/tests/plugin_examples/auto_approval/main.py index ba9e924e..b1e5ccff 100644 --- a/tests/plugin_examples/auto_approval/main.py +++ b/tests/plugin_examples/auto_approval/main.py @@ -1,6 +1,6 @@ from mirai import Mirai -import pkg.qqbot.manager +import pkg.platform.manager from pkg.plugin.models import * from pkg.plugin.host import PluginHost @@ -23,13 +23,13 @@ class AutoApproval(Plugin): # 插件加载时触发 def __init__(self, plugin_host: PluginHost): qqmgr = plugin_host.get_runtime_context().get_qqbot_manager() - assert isinstance(qqmgr, pkg.qqbot.manager.QQBotManager) + assert isinstance(qqmgr, pkg.platform.manager.PlatformManager) self.bot = qqmgr.bot # 向YiriMirai注册 加群申请 事件处理函数 @qqmgr.bot.on(MemberJoinRequestEvent) async def process(event: MemberJoinRequestEvent): - assert isinstance(qqmgr, pkg.qqbot.manager.QQBotManager) + assert isinstance(qqmgr, pkg.platform.manager.PlatformManager) if event.group_id == __group_id__: if any([x in event.message for x in __application_contains__]): logging.info("自动同意加群申请") diff --git a/tests/qq_offcial_api/botpy.log b/tests/qq_offcial_api/botpy.log new file mode 100644 index 00000000..2951a8d9 --- /dev/null +++ b/tests/qq_offcial_api/botpy.log @@ -0,0 +1,939 @@ +2023-11-15 12:25:09,291 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 12:25:09,690 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 12:25:09,691 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 12:25:09,691 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 12:25:09,691 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 12:25:09,820 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 12:25:09,926 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 12:25:09,927 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 12:55:09,973 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 4009, 返回信息: Session timed out +2023-11-15 12:55:14,977 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 12:55:14,978 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 12:55:14,979 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 12:55:15,174 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 12:55:15,272 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 12:55:15,273 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 13:08:41,818 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 13:08:42,180 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 13:08:42,181 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 13:08:42,181 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 13:08:42,181 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 13:08:42,297 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 13:08:42,402 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 13:08:42,402 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 13:09:30,455 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 13:09:30,884 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 13:09:30,884 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 13:09:30,885 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 13:09:30,885 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 13:09:31,015 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 13:09:31,104 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 13:09:31,104 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 13:39:31,034 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 4009, 返回信息: Session timed out +2023-11-15 13:39:36,038 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 13:39:36,039 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 13:39:36,039 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 13:39:36,178 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 13:39:36,271 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 13:39:36,271 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 14:04:43,218 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 14:04:48,222 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 14:04:48,223 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 14:04:48,223 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 14:04:48,348 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 14:04:48,433 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 14:04:48,433 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 14:20:50,895 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 14:20:55,898 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 14:20:55,898 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 14:20:55,899 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 14:20:56,029 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 14:20:56,120 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 14:20:56,121 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 14:39:46,908 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 14:39:51,910 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 14:39:51,911 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 14:39:51,911 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 14:39:52,033 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 14:39:52,115 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 14:39:52,116 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 14:55:37,964 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 14:56:54,815 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 14:56:54,815 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 14:56:54,815 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 14:56:54,962 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 14:56:55,053 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 14:56:55,054 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 15:21:37,166 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 15:21:37,525 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 15:21:37,526 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 15:21:37,526 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 15:21:37,526 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 15:21:37,643 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 15:21:37,741 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 15:21:37,741 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 15:22:13,891 [ERROR] (http.py:73)_handle_response [botpy] 接口请求异常,请求连接: https://api.sgroup.qq.com/channels/5508784/messages, 错误代码: 500, 返回内容: {'message': 'internal error', 'code': 102}, trace_id:18fcd41d05a8c27cbb4e0ba04775b59d +2023-11-15 15:22:28,619 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 15:22:28,981 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 15:22:28,982 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 15:22:28,982 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 15:22:28,982 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 15:22:29,098 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 15:22:29,200 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 15:22:29,201 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 15:24:03,955 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 15:24:04,348 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 15:24:04,348 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 15:24:04,349 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 15:24:04,349 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 15:24:04,470 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 15:24:04,602 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 15:24:04,602 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 15:24:28,183 [ERROR] (http.py:73)_handle_response [botpy] 接口请求异常,请求连接: https://api.sgroup.qq.com/channels/5508784/messages, 错误代码: 500, 返回内容: {'message': 'internal error', 'code': 102}, trace_id:955d545d6efbc39050c385b2eff568f2 +2023-11-15 15:24:36,343 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 15:24:36,699 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 15:24:36,699 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 15:24:36,699 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 15:24:36,699 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 15:24:36,816 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 15:24:36,891 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 15:24:36,891 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 15:25:04,368 [WARNING] (http.py:188)request 请求超时,请求连接: https://api.sgroup.qq.com/channels/5508784/messages +2023-11-15 15:26:01,385 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 15:26:01,760 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 15:26:01,761 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 15:26:01,761 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 15:26:01,761 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 15:26:01,876 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 15:26:01,978 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 15:26:01,978 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 15:28:42,595 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 15:28:42,955 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 15:28:42,955 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 15:28:42,955 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 15:28:42,955 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 15:28:43,074 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 15:28:43,182 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 15:28:43,182 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 15:58:43,065 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 4009, 返回信息: Session timed out +2023-11-15 15:58:48,070 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 15:58:48,071 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 15:58:48,072 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 15:58:48,214 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 15:58:48,296 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 15:58:48,296 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 16:03:28,531 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 16:03:28,905 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 16:03:28,905 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 16:03:28,905 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 16:03:28,905 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 16:03:29,019 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 16:03:29,119 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 16:03:29,119 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 16:22:41,712 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 16:22:42,114 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 16:22:42,115 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 16:22:42,115 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 16:22:42,115 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 16:22:42,235 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 16:22:42,341 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 16:22:42,341 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 16:24:55,592 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 16:24:55,954 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 16:24:55,954 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 16:24:55,955 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 16:24:55,955 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 16:24:56,071 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 16:24:56,239 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 16:24:56,240 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 16:25:46,185 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 16:25:46,562 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 16:25:46,563 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 16:25:46,563 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 16:25:46,563 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 16:25:46,683 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 16:25:46,814 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 16:25:46,815 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 16:26:13,405 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 16:26:14,113 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 16:26:14,113 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 16:26:14,114 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 16:26:14,114 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 16:26:14,228 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 16:26:14,313 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 16:26:14,313 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 16:28:56,303 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 16:28:56,718 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 16:28:56,719 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 16:28:56,719 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 16:28:56,719 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 16:28:56,923 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 16:28:57,021 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 16:28:57,021 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 16:32:27,942 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 16:32:28,301 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 16:32:28,301 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 16:32:28,301 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 16:32:28,301 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 16:32:28,428 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 16:32:28,521 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 16:32:28,522 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 17:02:28,432 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 4009, 返回信息: Session timed out +2023-11-15 17:02:33,435 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:02:33,435 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:02:33,436 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:02:33,564 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 17:02:33,690 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 17:02:33,690 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 17:10:57,944 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 17:10:58,317 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 17:10:58,318 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:10:58,318 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:10:58,318 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:10:58,432 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:10:58,511 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:10:58,511 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:11:03,512 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:11:03,513 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:11:03,513 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:11:03,632 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:11:03,721 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:11:03,722 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:11:08,723 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:11:08,724 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:11:08,724 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:11:08,839 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:11:08,892 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:11:08,892 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:11:13,893 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:11:13,894 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:11:13,894 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:11:14,023 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:11:14,073 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:11:14,073 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:11:19,073 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:11:19,074 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:11:19,074 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:11:19,204 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:11:19,259 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:11:19,259 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:11:31,785 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 17:11:32,162 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 17:11:32,162 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:11:32,162 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:11:32,162 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:11:32,277 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:11:32,330 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:11:32,330 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:11:37,331 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:11:37,331 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:11:37,332 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:11:37,452 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:11:37,505 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:11:37,505 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:13:33,604 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 17:13:33,964 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 17:13:33,964 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:13:33,965 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:13:33,965 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:13:34,087 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:13:34,156 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:13:34,156 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:13:39,158 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:13:39,158 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:13:39,158 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:13:39,275 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:13:39,344 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:13:39,344 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:14:05,711 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 17:14:06,088 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 17:14:06,088 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:14:06,088 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:14:06,088 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:14:06,215 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:14:06,268 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:14:06,269 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:14:38,780 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 17:14:39,153 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 17:14:39,154 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:14:39,155 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:14:39,155 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:14:39,279 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:14:39,341 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:14:39,341 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:15:09,333 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 17:15:09,683 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 17:15:09,684 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:15:09,684 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:15:09,684 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:15:09,807 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:15:09,868 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:15:09,868 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:15:14,870 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:15:14,870 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:15:14,871 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:15:15,003 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:15:15,063 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:15:15,063 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:15:20,065 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:15:20,066 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:15:20,066 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:15:20,193 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:15:20,242 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:15:20,243 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:15:25,243 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:15:25,243 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:15:25,243 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:15:25,477 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:15:25,531 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:15:25,531 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:15:30,533 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:15:30,534 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:15:30,534 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:15:30,659 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:15:30,710 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:15:30,711 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:15:35,712 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:15:35,713 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:15:35,713 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:15:35,840 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:15:35,888 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:15:35,889 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:15:40,890 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:15:40,892 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:15:40,892 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:15:41,018 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:15:41,072 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:15:41,072 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:15:46,073 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:15:46,073 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:15:46,073 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:15:46,189 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:15:46,240 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:15:46,240 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:15:51,242 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:15:51,242 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:15:51,242 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:15:51,363 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:15:51,448 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:15:51,448 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:15:56,450 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:15:56,451 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:15:56,451 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:15:56,636 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:15:56,690 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:15:56,691 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:01,692 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:01,693 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:01,693 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:01,822 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:01,875 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:16:01,875 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:06,877 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:06,877 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:06,877 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:07,008 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:07,057 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: timed out +2023-11-15 17:16:07,057 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:12,059 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:12,059 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:12,059 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:12,184 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:12,291 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:16:12,291 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:17,293 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:17,293 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:17,294 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:17,440 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:17,493 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:16:17,493 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:22,495 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:22,496 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:22,496 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:22,621 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:22,674 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:16:22,674 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:27,675 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:27,675 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:27,676 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:27,790 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:27,842 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:16:27,842 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:32,842 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:32,843 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:32,843 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:32,962 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:33,069 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:16:33,069 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:38,070 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:38,071 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:38,071 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:38,314 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:38,370 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:16:38,370 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:43,371 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:43,372 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:43,372 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:43,510 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:43,562 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:16:43,562 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:48,564 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:48,564 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:48,565 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:48,695 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:48,766 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:16:48,766 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:53,768 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:53,769 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:53,769 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:54,024 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:54,072 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:16:54,072 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:16:59,074 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:16:59,074 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:16:59,074 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:16:59,251 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:16:59,310 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:16:59,310 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:04,312 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:04,313 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:04,313 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:04,437 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:04,487 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:17:04,487 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:09,488 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:09,488 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:09,488 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:09,673 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:09,733 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:17:09,733 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:14,734 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:14,735 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:14,735 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:14,867 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:14,938 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:17:14,938 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:19,939 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:19,940 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:19,940 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:20,059 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:20,129 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:17:20,129 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:25,131 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:25,132 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:25,132 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:25,263 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:25,321 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:17:25,321 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:30,323 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:30,323 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:30,323 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:30,561 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:30,616 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:17:30,616 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:35,617 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:35,617 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:35,618 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:35,741 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:35,790 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:17:35,790 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:40,792 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:40,792 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:40,792 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:40,913 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:40,963 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:17:40,963 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:45,956 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:45,957 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:45,957 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:46,075 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:46,129 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:17:46,129 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:51,124 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:51,126 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:51,126 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:51,431 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:51,487 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:17:51,488 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:17:56,484 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:17:56,485 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:17:56,485 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:17:56,610 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:17:56,667 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:17:56,667 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:01,665 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:01,666 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:01,666 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:01,796 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:01,852 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:18:01,852 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:06,851 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:06,853 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:06,854 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:07,091 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:07,163 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:18:07,164 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:12,163 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:12,164 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:12,164 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:12,284 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:12,340 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: timed out +2023-11-15 17:18:12,340 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:17,340 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:17,342 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:17,342 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:17,461 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:17,532 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:18:17,533 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:22,533 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:22,533 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:22,534 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:22,657 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:22,708 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:18:22,708 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:27,709 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:27,711 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:27,711 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:27,958 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:28,012 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:18:28,013 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:33,013 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:33,014 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:33,014 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:33,129 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:33,181 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:18:33,181 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:38,182 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:38,182 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:38,183 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:38,300 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:38,355 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:18:38,355 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:43,356 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:43,357 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:43,357 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:43,481 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:43,579 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:18:43,579 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:48,580 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:48,581 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:48,581 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:48,784 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:48,854 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:18:48,854 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:53,856 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:53,856 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:53,856 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:53,972 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:54,025 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:18:54,025 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:18:59,027 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:18:59,028 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:18:59,028 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:18:59,163 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:18:59,218 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:18:59,218 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:04,219 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:04,220 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:04,220 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:04,339 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:04,389 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:19:04,390 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:09,390 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:09,392 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:09,392 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:09,597 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:09,648 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:19:09,648 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:14,649 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:14,649 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:14,650 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:14,794 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:14,848 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:19:14,851 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:19,853 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:19,853 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:19,853 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:19,967 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:20,019 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:19:20,019 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:25,020 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:25,022 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:25,022 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:25,137 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:25,249 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:19:25,249 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:30,249 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:30,250 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:30,250 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:30,403 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:30,452 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: timed out +2023-11-15 17:19:30,452 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:35,454 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:35,455 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:35,455 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:35,583 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:35,640 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:19:35,640 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:40,642 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:40,642 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:40,642 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:40,771 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:40,836 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:19:40,836 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:45,836 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:45,837 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:45,837 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:45,991 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:46,064 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:19:46,065 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:51,066 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:51,066 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:51,066 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:51,208 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:51,280 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:19:51,280 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:19:59,253 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 17:19:59,780 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 17:19:59,780 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:19:59,780 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:19:59,781 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:19:59,900 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:19:59,954 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:19:59,954 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:04,956 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:04,956 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:04,956 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:05,082 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:05,149 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:20:05,149 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:10,151 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:10,151 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:10,151 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:10,323 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:10,374 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:20:10,375 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:15,376 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:15,377 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:15,378 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:15,509 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:15,559 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:20:15,559 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:20,560 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:20,561 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:20,561 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:20,690 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:20,745 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:20:20,745 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:25,746 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:25,747 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:25,747 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:25,865 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:25,923 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:20:25,923 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:30,924 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:30,926 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:30,926 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:31,053 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:31,105 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:20:31,105 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:36,106 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:36,107 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:36,107 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:36,228 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:36,279 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:20:36,279 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:41,281 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:41,281 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:41,281 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:41,399 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:41,468 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:20:41,468 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:46,470 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:46,472 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:46,472 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:46,607 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:46,658 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:20:46,658 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:51,659 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:51,659 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:51,660 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:51,792 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:51,859 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:20:51,860 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:20:56,860 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:20:56,861 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:20:56,861 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:20:56,994 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:20:57,051 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:20:57,051 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:02,053 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:02,053 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:02,053 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:02,178 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:02,243 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:21:02,243 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:07,245 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:07,246 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:07,246 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:07,388 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:07,449 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:21:07,449 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:12,451 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:12,451 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:12,451 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:12,585 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:12,640 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:21:12,640 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:17,641 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:17,643 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:17,643 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:17,772 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:17,823 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:21:17,823 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:22,824 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:22,825 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:22,825 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:22,946 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:23,003 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:21:23,003 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:28,005 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:28,005 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:28,005 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:28,128 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:28,196 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:21:28,197 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:33,198 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:33,198 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:33,199 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:33,327 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:33,378 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:21:33,378 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:38,379 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:38,380 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:38,380 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:38,506 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:38,557 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:21:38,557 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:43,559 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:43,559 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:43,560 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:43,680 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:43,747 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:21:43,748 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:48,749 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:48,749 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:48,749 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:48,891 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:48,946 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:21:48,947 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:53,948 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:53,948 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:53,948 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:54,069 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:54,137 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: disallowed intents +2023-11-15 17:21:54,137 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:21:59,138 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:21:59,139 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:21:59,139 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:21:59,255 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:21:59,306 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:21:59,306 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:22:04,307 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:22:04,307 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:22:04,307 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:22:04,425 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:22:04,478 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:22:04,478 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:22:09,479 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:22:09,479 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:22:09,480 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:22:09,607 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:22:09,662 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:22:09,662 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:22:14,663 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:22:14,664 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:22:14,664 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:22:14,855 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:22:14,942 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:22:14,942 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:22:19,943 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:22:19,943 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:22:19,944 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:22:20,067 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:22:20,120 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 17:22:20,120 [INFO] (gateway.py:57)on_closed [botpy] 无法重连,创建新连接! +2023-11-15 17:22:23,740 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 17:22:24,117 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 17:22:24,117 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:22:24,117 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:22:24,117 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:22:24,239 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:22:24,321 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 17:22:24,322 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 17:27:21,927 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 17:27:22,309 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 17:27:22,309 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:27:22,309 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:27:22,309 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:27:22,431 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 17:27:22,530 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 17:27:22,530 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 17:57:22,550 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 4009, 返回信息: Session timed out +2023-11-15 17:57:27,555 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 17:57:27,556 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 17:57:27,556 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 17:57:27,688 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 17:57:27,769 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 17:57:27,769 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 18:03:51,912 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 18:03:52,286 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 18:03:52,287 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 18:03:52,287 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 18:03:52,287 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 18:03:52,409 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 18:03:52,513 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 18:03:52,513 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 18:10:00,835 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 18:10:01,200 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 18:10:01,200 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 18:10:01,200 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 18:10:01,200 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 18:10:01,321 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 18:10:01,419 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 18:10:01,419 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 18:10:40,952 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 18:10:41,317 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 18:10:41,318 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 18:10:41,318 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 18:10:41,318 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 18:10:41,437 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 18:10:41,514 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 18:10:41,515 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 18:12:01,462 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 18:12:01,854 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 18:12:01,854 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 18:12:01,854 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 18:12:01,855 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 18:12:01,976 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 18:12:02,064 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 18:12:02,065 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 18:43:18,043 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 18:43:23,048 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 18:43:23,050 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 18:43:23,051 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 18:43:23,207 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 18:43:23,294 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 18:43:23,294 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 18:49:09,003 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 18:49:14,004 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 18:49:14,005 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 18:49:14,005 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 18:49:14,136 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 18:49:14,226 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 18:49:14,226 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 18:55:00,469 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 18:55:05,470 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 18:55:05,471 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 18:55:05,471 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 18:55:05,600 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 18:55:05,682 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 18:55:05,683 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 19:13:00,221 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 19:13:05,223 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 19:13:05,224 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 19:13:05,224 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 19:13:05,351 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 19:13:05,433 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 19:13:05,433 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 19:29:17,550 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 19:29:22,552 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 19:29:22,553 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 19:29:22,553 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 19:29:22,679 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 19:29:22,790 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 19:29:22,791 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 19:34:35,783 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 19:34:40,789 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 19:34:40,791 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 19:34:40,792 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 19:34:40,939 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 19:34:41,016 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 19:34:41,017 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 19:48:37,551 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 1006, 返回信息: None +2023-11-15 19:48:42,555 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 19:48:42,556 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 19:48:42,556 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 19:48:42,680 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 19:48:42,772 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 19:48:42,772 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 19:58:09,391 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 19:58:09,742 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 19:58:09,743 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 19:58:09,743 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 19:58:09,743 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 19:58:09,866 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 19:58:09,970 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 19:58:09,971 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 20:28:09,895 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 4009, 返回信息: Session timed out +2023-11-15 20:28:14,899 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 20:28:14,900 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 20:28:14,900 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 20:28:15,026 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 20:28:15,107 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 20:28:15,107 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 20:58:15,052 [INFO] (gateway.py:54)on_closed [botpy] 关闭, 返回码: 4009, 返回信息: Session timed out +2023-11-15 20:58:20,059 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 20:58:20,060 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 20:58:20,060 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 20:58:20,185 [INFO] (gateway.py:169)ws_resume [botpy] 重连启动... +2023-11-15 20:58:20,270 [INFO] (gateway.py:85)on_message [botpy] 机器人重连成功! +2023-11-15 20:58:20,270 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 21:20:35,692 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 21:20:36,082 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 21:20:36,082 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 21:20:36,082 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 21:20:36,083 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 21:20:36,185 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 21:20:36,287 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 21:20:36,288 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 21:41:35,075 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 21:41:35,450 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 21:41:35,451 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 21:41:35,451 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 21:41:35,451 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 21:41:35,557 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 21:41:35,640 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 21:41:35,640 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 22:02:54,550 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 22:02:54,914 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 22:02:54,914 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 22:02:54,914 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 22:02:54,914 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 22:02:55,034 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 22:02:55,116 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 22:02:55,116 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 22:03:11,959 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 22:03:12,280 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 22:03:12,281 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 22:03:12,281 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 22:03:12,282 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 22:03:12,432 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 22:03:12,526 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 22:03:12,527 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 22:25:23,062 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 22:25:23,423 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 22:25:23,423 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 22:25:23,423 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 22:25:23,423 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 22:25:23,529 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 22:25:23,630 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 22:25:23,631 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... +2023-11-15 22:26:21,402 [INFO] (client.py:159)_bot_login [botpy] 登录机器人账号中... +2023-11-15 22:26:21,766 [INFO] (client.py:178)_bot_init [botpy] 程序启动... +2023-11-15 22:26:21,766 [INFO] (connection.py:59)multi_run [botpy] 最大并发连接数: 1, 启动会话数: 1 +2023-11-15 22:26:21,766 [INFO] (client.py:236)bot_connect [botpy] 会话启动中... +2023-11-15 22:26:21,766 [INFO] (gateway.py:110)ws_connect [botpy] 启动中... +2023-11-15 22:26:21,874 [INFO] (gateway.py:136)ws_identify [botpy] 鉴权中... +2023-11-15 22:26:21,951 [INFO] (gateway.py:80)on_message [botpy] 机器人「QChatBot-测试中」启动成功! +2023-11-15 22:26:21,952 [INFO] (gateway.py:217)_send_heart [botpy] 心跳维持启动... diff --git a/tests/qq_offcial_api/channel_client.py b/tests/qq_offcial_api/channel_client.py new file mode 100644 index 00000000..94af6d9e --- /dev/null +++ b/tests/qq_offcial_api/channel_client.py @@ -0,0 +1,87 @@ +import re + +import botpy +from botpy.message import Message, DirectMessage + +import openai +import datetime + +openai_client = openai.Client() + + +intents = botpy.Intents( + public_guild_messages=True, + direct_message=True, +) +client = botpy.Client(intents=intents) + +def wrapper(func): + async def fn(*args, **kwargs): + return await func(client, *args, **kwargs) + + return fn + +print(int('11374654729765438030')) + +@wrapper +async def on_at_message_create(self, message: Message): + # await self.api.post_message(channel_id=message.channel_id, content=openai_client.chat.completions.create( + # model="gpt-3.5-turbo", + # messages=[ + # { + # "role": "user", + # "content": message.content + # } + # ] + # ).choices[0].message.content) + print(self) + + print(message.content) + + # 删除消息中:<@!12345678> 这样的内容 + message.content = re.sub(r"<@!\d+>", "", message.content) + + print(message.content) + # image_url = openai_client.images.generate( + # model="dall-e-3", + # prompt=message.content, + # size="1024x1024", + # quality="standard", + # n=1, + # ).data[0].url + # print(image_url) + print(message.member.roles) + # 2022-06-04T22:56:51+08:00 + time_str = message.member.joined_at + date_obj = datetime.datetime.strptime(time_str, "%Y-%m-%dT%H:%M:%S%z") + print(date_obj.timestamp()) + + print(f"message.channel_id: {message.channel_id}, message.id: {message.id}, message.content: {message.content}, message.author: {message.author}, message.attachments: {message.attachments}") + print(message.mentions) + + await self.api.post_message( + channel_id=message.channel_id, + msg_id=message.id, + image="https://gchat.qpic.cn/download?appid=1407&fileid=CgoxMDEwNTUzODkyEhS7rtLyruPu6lyTBvTjQwZul5vuERjx-wEg_woo6oKkscHDggNQgL2jAQ&rkey=CAMSMEpZEUuWzKJ8k5PQaayVPrGr_qQ1zF89b65iW_h_w-HlQvPmNfEeCLBaR3Mhtt1FTA&spec=0", + # content=message.content + ) + + print(message.channel_id, message.id) + print(type(message.channel_id), type(message.id)) + + await self.api.post_message( + channel_id=message.channel_id, + msg_id=message.id, + image="https://gchat.qpic.cn/download?appid=1407&fileid=CgoxMDEwNTUzODkyEhS7rtLyruPu6lyTBvTjQwZul5vuERjx-wEg_woo6oKkscHDggNQgL2jAQ&rkey=CAMSMEpZEUuWzKJ8k5PQaayVPrGr_qQ1zF89b65iW_h_w-HlQvPmNfEeCLBaR3Mhtt1FTA&spec=0", + # content=message.content + ) + +@wrapper +async def on_direct_message_create(self, message: DirectMessage): + print(f"message.channel_id: {message.channel_id}, message.id: {message.id}, message.content: {message.content}, message.author: {message.author}, message.attachments: {message.attachments}") + await self.api.post_dms(guild_id=message.guild_id, content="hi") + + +setattr(client, "on_at_message_create", on_at_message_create) +setattr(client, "on_direct_message_create", on_direct_message_create) +client.run(appid="102076866", token="jwn1C2V1S9q3PBHoSLKfA7pKzKVyWzkm") diff --git a/tests/test_session_console.py b/tests/test_session_console.py index e0446ee8..4939d6c0 100644 --- a/tests/test_session_console.py +++ b/tests/test_session_console.py @@ -1,14 +1,14 @@ import config import unittest -import pkg.openai.session -import pkg.openai.manager +import pkg.provider.session +import pkg.provider.manager class TestOpenAISession(unittest.TestCase): def test_session_console(self): - interact = pkg.openai.manager.OpenAIInteract(config.openai_config['api_key'], config.completion_api_params) + interact = pkg.provider.manager.OpenAIInteract(config.openai_config['api_key'], config.completion_api_params) - session = pkg.openai.session.Session('test') + session = pkg.provider.session.Session('test') print(session.append('你好')) print("#{}#".format(session.prompt)) diff --git a/tests/tools/tool_call_test.py b/tests/tools/tool_call_test.py new file mode 100644 index 00000000..20287fe6 --- /dev/null +++ b/tests/tools/tool_call_test.py @@ -0,0 +1,86 @@ +from openai import OpenAI +import json + +client = OpenAI( + api_key='' +) + +client.base_url = "https://oneapi.rockchin.top/v1" +client.api_key = "sk-YikPSaMii0LquY5T0b2a13C0C493414790C8Fc3751Aa8aB2" + +# Example dummy function hard coded to return the same weather +# In production, this could be your backend API or an external API +def get_current_weather(location, unit="fahrenheit"): + """Get the current weather in a given location""" + if "tokyo" in location.lower(): + return json.dumps({"location": "Tokyo", "temperature": "10", "unit": unit}) + elif "san francisco" in location.lower(): + return json.dumps({"location": "San Francisco", "temperature": "72", "unit": unit}) + elif "paris" in location.lower(): + return json.dumps({"location": "Paris", "temperature": "22", "unit": unit}) + else: + return json.dumps({"location": location, "temperature": "unknown"}) + +def run_conversation(): + # Step 1: send the conversation and available functions to the model + messages = [{"role": "user", "content": "What's the weather like in San Francisco, Tokyo, and Paris?"}] + tools = [ + { + "type": "function", + "function": { + "name": "get_current_weather", + "description": "Get the current weather in a given location", + "parameters": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The city and state, e.g. San Francisco, CA", + }, + "unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}, + }, + "required": ["location"], + }, + }, + } + ] + response = client.chat.completions.create( + model="gpt-3.5-turbo-1106", + messages=messages, + tools=tools, + tool_choice="auto", # auto is default, but we'll be explicit + ) + response_message = response.choices[0].message + print(response_message) + tool_calls = response_message.tool_calls + # Step 2: check if the model wanted to call a function + if tool_calls: + # Step 3: call the function + # Note: the JSON response may not always be valid; be sure to handle errors + available_functions = { + "get_current_weather": get_current_weather, + } # only one function in this example, but you can have multiple + messages.append(response_message) # extend conversation with assistant's reply + # Step 4: send the info for each function call and function response to the model + for tool_call in tool_calls: + function_name = tool_call.function.name + function_to_call = available_functions[function_name] + function_args = json.loads(tool_call.function.arguments) + function_response = function_to_call( + location=function_args.get("location"), + unit=function_args.get("unit"), + ) + messages.append( + { + "tool_call_id": tool_call.id, + "role": "tool", + "name": function_name, + "content": function_response, + } + ) # extend conversation with function response + second_response = client.chat.completions.create( + model="gpt-3.5-turbo-1106", + messages=messages, + ) # get a new response from the model where it can see the function response + return second_response +print(run_conversation()) diff --git "a/\346\234\252\345\221\275\345\220\215.txt" "b/\346\234\252\345\221\275\345\220\215.txt" new file mode 100644 index 00000000..ad396935 Binary files /dev/null and "b/\346\234\252\345\221\275\345\220\215.txt" differ