hyper-bot 0.82.4__tar.gz → 0.82.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hyper_bot-0.82.4/src/hyper_bot.egg-info → hyper_bot-0.82.5}/PKG-INFO +1 -1
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/pyproject.toml +1 -1
- {hyper_bot-0.82.4 → hyper_bot-0.82.5/src/hyper_bot.egg-info}/PKG-INFO +1 -1
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/LecAdapters/OneBot.py +3 -1
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/__init__.py +1 -1
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/segments.py +7 -6
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/LICENSE +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/setup.cfg +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyper_bot.egg-info/SOURCES.txt +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyper_bot.egg-info/dependency_links.txt +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyper_bot.egg-info/requires.txt +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyper_bot.egg-info/top_level.txt +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/LecAdapters/Milky.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/LecAdapters/MilkyLib/Manager.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/LecAdapters/MilkyLib/Res.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/LecAdapters/MilkyLib/translator.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/LecAdapters/OneBotLib/Manager.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/LecAdapters/OneBotLib/Res.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/adapters/__init__.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/adapters/builtins.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/adapters/common.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/adapters/listener.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/adapters/obuilder.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/adapters/res.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/common.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/configurator.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/events.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/hyperogger.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/listener.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/network.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/utils/ArkSignHelper.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/utils/__init__.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/utils/apiresponse.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/utils/errors.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/utils/hypetyping.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/utils/screens.py +0 -0
- {hyper_bot-0.82.4 → hyper_bot-0.82.5}/src/hyperot/utils/typextensions.py +0 -0
|
@@ -4,6 +4,8 @@ import asyncio
|
|
|
4
4
|
import sys
|
|
5
5
|
from typing import Union, Callable
|
|
6
6
|
|
|
7
|
+
import websockets
|
|
8
|
+
|
|
7
9
|
from .. import network, events, common, segments, configurator, hyperogger
|
|
8
10
|
from ..utils import errors
|
|
9
11
|
from ..utils.apiresponse import *
|
|
@@ -282,7 +284,7 @@ async def run() -> None:
|
|
|
282
284
|
while True:
|
|
283
285
|
try:
|
|
284
286
|
data = await connection.recv()
|
|
285
|
-
except
|
|
287
|
+
except websockets.exceptions.ConnectionClosedError:
|
|
286
288
|
logger.error("连接断开")
|
|
287
289
|
break
|
|
288
290
|
except json.decoder.JSONDecodeError:
|
|
@@ -2,7 +2,7 @@ import dataclasses
|
|
|
2
2
|
import json
|
|
3
3
|
import os.path
|
|
4
4
|
import uuid
|
|
5
|
-
from typing import Union, TYPE_CHECKING, Any
|
|
5
|
+
from typing import Union, TYPE_CHECKING, Any
|
|
6
6
|
|
|
7
7
|
from .utils.errors import *
|
|
8
8
|
from . import configurator
|
|
@@ -133,11 +133,6 @@ class Contact(SegmentBase, st="contact"):
|
|
|
133
133
|
return f"[推荐{'群' if self.type == 'group' else '用户'}: {self.id}]"
|
|
134
134
|
|
|
135
135
|
|
|
136
|
-
@dataclasses.dataclass
|
|
137
|
-
class Forward(SegmentBase, st="forward", su="[Forward]"):
|
|
138
|
-
id: str
|
|
139
|
-
|
|
140
|
-
|
|
141
136
|
@dataclasses.dataclass
|
|
142
137
|
class Node(SegmentBase, st="node", su="[Node]"):
|
|
143
138
|
user_id: str
|
|
@@ -157,6 +152,12 @@ class CustomNode:
|
|
|
157
152
|
return f"[自定义节点]"
|
|
158
153
|
|
|
159
154
|
|
|
155
|
+
@dataclasses.dataclass
|
|
156
|
+
class Forward(SegmentBase, st="forward", su="[Forward]"):
|
|
157
|
+
content: list
|
|
158
|
+
id: str = ""
|
|
159
|
+
|
|
160
|
+
|
|
160
161
|
class KeyBoardButton:
|
|
161
162
|
def __init__(self,
|
|
162
163
|
text: str,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|