mirror of
https://github.com/Genshin-bots/gsuid_core.git
synced 2025-05-12 06:55:49 +08:00
🐛 修复command_start
的BUG
This commit is contained in:
parent
13b240090e
commit
29d15bdcee
@ -94,13 +94,15 @@ async def handle_event(ws: _Bot, msg: MessageReceive):
|
||||
instances[uuid].set_event()
|
||||
return
|
||||
|
||||
is_start = False
|
||||
if command_start and event.raw_text:
|
||||
for start in command_start:
|
||||
if event.raw_text.strip().startswith(start):
|
||||
event.raw_text = event.raw_text.replace(start, '')
|
||||
break
|
||||
event.raw_text = event.raw_text.replace(start, '', 1)
|
||||
is_start = True
|
||||
else:
|
||||
return
|
||||
if not is_start:
|
||||
return
|
||||
|
||||
valid_event: Dict[Trigger, int] = {}
|
||||
pending = [
|
||||
|
@ -207,6 +207,8 @@ async def _convert_message_to_image(
|
||||
if isinstance(img, str) and img.startswith('base64://'):
|
||||
image_b64 = img
|
||||
image_bytes = b64decode(img[9:])
|
||||
elif isinstance(img, str) and img.startswith('link://'):
|
||||
return [Message(type='image', data=img)]
|
||||
else:
|
||||
image_bytes = img
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user