diff --git a/GenshinUID/__init__.py b/GenshinUID/__init__.py index 14bcee74..88fa20fa 100644 --- a/GenshinUID/__init__.py +++ b/GenshinUID/__init__.py @@ -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': diff --git a/pyproject.toml b/pyproject.toml index 2f59b2ce..a461fa38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"