From 41774d77ea4ff45bf702f00fe2a0b010bbef241e Mon Sep 17 00:00:00 2001 From: XiaoDeng3386 <1744793737@qq.com> Date: Sat, 11 Jan 2025 00:42:39 +0800 Subject: [PATCH 1/3] fix #40 --- .gitignore | 3 ++- network/__init__.py | 12 +----------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 3e50cdb..bbd9786 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ __pycache__ config.json .vscode/ .cache/ -commands.json \ No newline at end of file +commands.json +.idea/ \ No newline at end of file diff --git a/network/__init__.py b/network/__init__.py index bf160ef..3cb2a99 100644 --- a/network/__init__.py +++ b/network/__init__.py @@ -1,13 +1,3 @@ -# from network.v12.http import HTTPServer -# import asyncio -# from network.v12.http_webhook import HttpWebhookConnect -# from network.v11.http import HTTPServer4OB11 -# from network.v11.http_post import HTTPPost4OB11 -# from network.v11.ws import WebSocket4OB11 -# from network.v11.ws_reverse import init_websocket_reverse_connection -# from network.v12.ws import WebSocketServer -# from network.v12.ws_reverse import WebSocketClient - from typing import Callable, Coroutine, Union import network.v12.http import network.v12.http_webhook @@ -56,7 +46,7 @@ async def start_connection( network.v12.ws.WebSocketServer(config), "start_server" ), "ws-reverse": lambda config: start_connection( - network.v12.ws_reverse.WebSocketClient(config), "connect" + network.v12.ws_reverse.WebSocketClient(config), "reconnect" ), }, 11: { From f2864436ca1e704d60ddd1a62cea036a71d3a8b7 Mon Sep 17 00:00:00 2001 From: XiaoDeng3386 <1744793737@qq.com> Date: Sat, 11 Jan 2025 00:45:11 +0800 Subject: [PATCH 2/3] Update README.md --- README.md | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/README.md b/README.md index e646d51..01fc651 100644 --- a/README.md +++ b/README.md @@ -17,15 +17,9 @@ Discord 平台的 OneBot 实现 [文档](https://onedisc.itcdt.top) · [下载](https://onedisc.itcdt.top/download.html) · [快速开始](https://onedisc.itcdt.top/quickstart.html) · [差异](https://onedisc.itcdt.top/differences.html) -> [!WARNING] -> 本项目含有部分较为混乱的代码,在阅读时请注意控制您的血压 - > [!IMPORTANT] > 在使用之前,我们建议您阅读: [差异:OneBot V12](https://onedisc.itcdt.top/differences.html) 与 [差异:OneBot V11](https://onedisc.itcdt.top/diff-v11.html) -> [!NOTE] -> OneDisc 的稳定版暂时没有 MacOS 版本[^2],我们建议 MacOS 用户使用测试版 - ## 兼容性 OneDisc 在 Discord 上实现了 OneBot V11/V12 标准,并做了一些拓展 @@ -50,7 +44,4 @@ OneDisc 在 Discord 上实现了 OneBot V11/V12 标准,并做了一些拓展 ## 性能 -内存占用约 70MB[^1],稳定运行无报错 - -[^1]: 就目前分析表明,这似乎是 `discord_event.py` 造成的,但是我们没有分析出具体原因 -[^2]: 我们尝试提供 MacOS 版本,但是 [Actions](https://github.com/ITCraftDevelopmentTeam/OneDisc/actions/workflows/build-release.yml) 报错了 +内存占用约 70MB,稳定运行无报错 From 045d652be64e96cfb46e7a76b548671e23e2a12f Mon Sep 17 00:00:00 2001 From: XiaoDeng3386 <1744793737@qq.com> Date: Sat, 11 Jan 2025 00:53:18 +0800 Subject: [PATCH 3/3] Update LICENSE --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 6a006da..59108da 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 IT Craft Development Team +Copyright (c) 2025 IT Craft Development Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal