From 3ea613fb97eb1b36d171270a5a16149735cb0b79 Mon Sep 17 00:00:00 2001 From: KimigaiiWuyi <444835641@qq.com> Date: Wed, 29 Nov 2023 02:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20=E6=94=AF=E6=8C=81=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=83=85=E5=86=B5=E7=9A=84=E5=89=8D=E7=BC=80=E5=8E=BB?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GenshinUID/__init__.py | 9 +++++---- pyproject.toml | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) 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"