mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
🎨 引入ev.real_bot_id
解决同个应用端但不同协议的问题
This commit is contained in:
parent
e101d942a2
commit
0e54c60b63
@ -139,7 +139,7 @@ class Bot:
|
||||
message,
|
||||
self.ev.user_type,
|
||||
self.ev.group_id if self.ev.group_id else self.ev.user_id,
|
||||
self.ev.bot_id,
|
||||
self.ev.real_bot_id,
|
||||
self.bot_self_id,
|
||||
self.ev.msg_id,
|
||||
at_sender,
|
||||
@ -158,7 +158,7 @@ class Bot:
|
||||
message,
|
||||
target_type,
|
||||
target_id,
|
||||
self.ev.bot_id,
|
||||
self.ev.real_bot_id,
|
||||
self.ev.bot_self_id,
|
||||
self.ev.msg_id,
|
||||
at_sender,
|
||||
|
@ -24,14 +24,20 @@ async def get_user_pml(msg: MessageReceive) -> int:
|
||||
|
||||
|
||||
async def msg_process(msg: MessageReceive) -> Event:
|
||||
if ':' in msg.bot_id:
|
||||
bot_id = msg.bot_id.split(':')[0]
|
||||
else:
|
||||
bot_id = msg.bot_id
|
||||
|
||||
event = Event(
|
||||
msg.bot_id,
|
||||
bot_id,
|
||||
msg.bot_self_id,
|
||||
msg.msg_id,
|
||||
msg.user_type,
|
||||
msg.group_id,
|
||||
msg.user_id,
|
||||
msg.user_pm,
|
||||
real_bot_id=msg.bot_id,
|
||||
)
|
||||
_content: List[Message] = []
|
||||
for _msg in msg.content:
|
||||
|
@ -20,6 +20,7 @@ class MessageReceive(Struct):
|
||||
|
||||
|
||||
class Event(MessageReceive):
|
||||
real_bot_id: str = ''
|
||||
raw_text: str = ''
|
||||
command: str = ''
|
||||
text: str = ''
|
||||
|
Loading…
x
Reference in New Issue
Block a user