diff --git a/pyproject.toml b/pyproject.toml index fe775ef..4251941 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "nonebot-plugin-alconna" -version = "0.8.2" +version = "0.8.3" description = "Alconna Adapter for Nonebot" authors = [ {name = "RF-Tar-Railt", email = "rf_tar_railt@qq.com"}, diff --git a/src/nonebot_plugin_alconna/__init__.py b/src/nonebot_plugin_alconna/__init__.py index 333468b..6717f6f 100644 --- a/src/nonebot_plugin_alconna/__init__.py +++ b/src/nonebot_plugin_alconna/__init__.py @@ -22,7 +22,7 @@ from .rule import set_output_converter as set_output_converter from .config import Config -__version__ = "0.8.2" +__version__ = "0.8.3" _meta_source = { "name": "Alconna 插件", diff --git a/src/nonebot_plugin_alconna/rule.py b/src/nonebot_plugin_alconna/rule.py index f4f2c6d..51bcd47 100644 --- a/src/nonebot_plugin_alconna/rule.py +++ b/src/nonebot_plugin_alconna/rule.py @@ -93,10 +93,11 @@ async def handle(self, bot: Bot, event: Event, msg: Message): interface = CompSession(self.command) if self.comp_config is None: return self.command.parse(msg) - + res = None with interface: res = self.command.parse(msg) - + if res: + return res meta = CommandMeta(compact=True, hide=True) _tab = Alconna(self.comp_config.get("tab", ".tab"), Args["offset", int, 1], [], meta=meta) _enter = Alconna(self.comp_config.get("enter", ".enter"), Args["content", AllParam, []], [], meta=meta)