mirror of
https://github.com/KimigaiiWuyi/GenshinUID.git
synced 2025-05-12 06:55:58 +08:00
🎨 支持部分情况的前缀去除
This commit is contained in:
parent
b358fc374e
commit
3ea613fb97
@ -150,7 +150,7 @@ async def get_all_message(bot: Bot, ev: Event):
|
||||
elif isinstance(ev, GroupAtMessageCreateEvent):
|
||||
sp_bot_id = 'qqgroup'
|
||||
user_type = 'group'
|
||||
group_id = str(ev.group_id)
|
||||
group_id = str(ev.group_openid)
|
||||
msg_id = ev.id
|
||||
sender = ev.author.dict()
|
||||
elif isinstance(ev, C2CMessageCreateEvent):
|
||||
@ -542,10 +542,11 @@ def convert_message(_msg: Any, message: List[Message], index: int):
|
||||
_msg.data['text'] if 'text' in _msg.data else _msg.data['content']
|
||||
)
|
||||
|
||||
if index == 0:
|
||||
if index == 0 or index == 1:
|
||||
for word in command_start:
|
||||
if data.startswith(word):
|
||||
data = data[len(word) :] # noqa:E203
|
||||
_data = data.strip()
|
||||
if _data.startswith(word):
|
||||
data = _data[len(word) :] # noqa:E203
|
||||
break
|
||||
message.append(Message('text', data))
|
||||
elif _msg.type == 'image':
|
||||
|
@ -23,7 +23,7 @@ build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry]
|
||||
name = "nonebot-plugin-genshinuid"
|
||||
version = "4.4.2"
|
||||
version = "4.4.3"
|
||||
description = "支持OneBot(QQ)、OneBotV12、QQ频道、微信、KOOK(开黑啦)、Telegram(电报)、FeiShu(飞书)、DoDo、Villa(米游社大别野)、Discord的全功能NoneBot2原神插件"
|
||||
authors = ["KimigaiiWuyi <444835641@qq.com>"]
|
||||
license = "GPL-3.0-or-later"
|
||||
|
Loading…
x
Reference in New Issue
Block a user