hyper-bot 0.80.2__tar.gz → 0.80.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.80.2 → hyper_bot-0.80.5}/PKG-INFO +1 -1
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyper_bot.egg-info/PKG-INFO +1 -1
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/OneBot.py +30 -1
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/__init__.py +1 -1
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/events.py +1 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/segments.py +7 -1
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/utils/apiresponse.py +2 -3
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/LICENSE +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyper_bot.egg-info/SOURCES.txt +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyper_bot.egg-info/dependency_links.txt +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyper_bot.egg-info/requires.txt +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyper_bot.egg-info/top_level.txt +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/Kritor.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/Manager.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/Res.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/authentication/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/common/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/core/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/customization/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/developer/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/event/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/file/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/friend/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/group/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/guild/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/message/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/process/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/reverse/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/web/__init__.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/OneBotLib/Manager.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/OneBotLib/Res.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/common.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/configurator.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/hyperogger.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/listener.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/network.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/service.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/utils/ArkSignHelper.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/utils/errors.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/utils/hypetyping.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/utils/logic.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/utils/screens.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/utils/typextensions.py +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/setup.cfg +0 -0
- {hyper_bot-0.80.2 → hyper_bot-0.80.5}/setup.py +0 -0
|
@@ -105,6 +105,26 @@ class Actions:
|
|
|
105
105
|
packet.send_to(self.connection)
|
|
106
106
|
return common.Ret.fetch(packet.echo, SendForwardRsp)
|
|
107
107
|
|
|
108
|
+
async def get_forward_msg(self, sid: str) -> common.Ret[common.Message]:
|
|
109
|
+
packet = common.Packet(
|
|
110
|
+
"get_forward_msg",
|
|
111
|
+
id=sid,
|
|
112
|
+
)
|
|
113
|
+
packet.send_to(self.connection)
|
|
114
|
+
ret = common.Ret.fetch(packet.echo, events.gen_message)
|
|
115
|
+
for i in ret.data:
|
|
116
|
+
if isinstance(i, segments.Node):
|
|
117
|
+
i.content = gen_message({"message": i.content})
|
|
118
|
+
|
|
119
|
+
return ret
|
|
120
|
+
|
|
121
|
+
async def forward_solve(self, message: common.Message) -> common.Message:
|
|
122
|
+
for i in message:
|
|
123
|
+
if isinstance(i, segments.Forward):
|
|
124
|
+
data = await self.get_forward_msg(i.id)
|
|
125
|
+
return data.data
|
|
126
|
+
raise ValueError("Incorrect message type")
|
|
127
|
+
|
|
108
128
|
async def send_group_forward_msg(self, group_id: int, message: common.Message) -> common.Ret[SendGrpForwardRsp]:
|
|
109
129
|
packet = common.Packet(
|
|
110
130
|
"send_group_forward_msg",
|
|
@@ -114,7 +134,8 @@ class Actions:
|
|
|
114
134
|
packet.send_to(self.connection)
|
|
115
135
|
return common.Ret.fetch(packet.echo, SendForwardRsp)
|
|
116
136
|
|
|
117
|
-
async def set_group_add_request(self, flag: str, sub_type: str, approve: bool,
|
|
137
|
+
async def set_group_add_request(self, flag: str, sub_type: str, approve: bool,
|
|
138
|
+
reason: str = "Not Mentioned") -> None:
|
|
118
139
|
common.Packet(
|
|
119
140
|
"set_group_add_request",
|
|
120
141
|
flag=flag,
|
|
@@ -179,6 +200,14 @@ class Actions:
|
|
|
179
200
|
packet.send_to(self.connection)
|
|
180
201
|
return common.Ret.fetch(packet.echo, GetMsgRsp)
|
|
181
202
|
|
|
203
|
+
async def send_callback(self, group_id: int, bot_id: int, data: dict) -> None:
|
|
204
|
+
common.Packet(
|
|
205
|
+
"send_group_bot_callback",
|
|
206
|
+
group_id=group_id,
|
|
207
|
+
bot_id=bot_id,
|
|
208
|
+
**data
|
|
209
|
+
).send_to(self.connection)
|
|
210
|
+
|
|
182
211
|
|
|
183
212
|
async def tester(
|
|
184
213
|
message_data: Union[Event, HyperNotify], actions: Actions
|
|
@@ -4,6 +4,7 @@ import typing
|
|
|
4
4
|
import uuid
|
|
5
5
|
|
|
6
6
|
from .utils.errors import *
|
|
7
|
+
from .utils.hypetyping import Union
|
|
7
8
|
from . import configurator
|
|
8
9
|
|
|
9
10
|
config = configurator.BotConfig.get("hyper-bot")
|
|
@@ -47,6 +48,9 @@ class Text(SegmentBase, st="text", su="<text>"):
|
|
|
47
48
|
text: str
|
|
48
49
|
|
|
49
50
|
|
|
51
|
+
class StreamTest(SegmentBase, st="stream", su="[Stream] <text>"):
|
|
52
|
+
text: str
|
|
53
|
+
|
|
50
54
|
class Image(MediaSeg, st="image", su="[Image]"):
|
|
51
55
|
file: str
|
|
52
56
|
url: str
|
|
@@ -99,7 +103,9 @@ class Forward(SegmentBase, st="forward", su="[Forward]"):
|
|
|
99
103
|
|
|
100
104
|
|
|
101
105
|
class Node(SegmentBase, st="node", su="[Node]"):
|
|
102
|
-
|
|
106
|
+
user_id: str
|
|
107
|
+
nickname: str
|
|
108
|
+
content: Union[dict, "common.Message"]
|
|
103
109
|
|
|
104
110
|
|
|
105
111
|
class CustomNode:
|
|
@@ -185,7 +185,8 @@ class GetMsgRsp(BaseResponse):
|
|
|
185
185
|
|
|
186
186
|
@classmethod
|
|
187
187
|
def build(
|
|
188
|
-
cls, time: int, message_type: Literal["private", "group"], message_id: int, real_id: int, sender: dict,
|
|
188
|
+
cls, time: int, message_type: Literal["private", "group"], message_id: int, real_id: int, sender: dict,
|
|
189
|
+
message: dict
|
|
189
190
|
):
|
|
190
191
|
return cls(
|
|
191
192
|
{
|
|
@@ -197,5 +198,3 @@ class GetMsgRsp(BaseResponse):
|
|
|
197
198
|
"message": message
|
|
198
199
|
}
|
|
199
200
|
)
|
|
200
|
-
|
|
201
|
-
|
|
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
|
{hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/authentication/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/customization/__init__.py
RENAMED
|
File without changes
|
{hyper_bot-0.80.2 → hyper_bot-0.80.5}/hyperot/Adapters/KritorLib/protos/developer/__init__.py
RENAMED
|
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
|