Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
🐛 fix res error when enable completion session
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Jun 28, 2023
1 parent 0a2dfc6 commit 4c336d4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"},
Expand Down
2 changes: 1 addition & 1 deletion src/nonebot_plugin_alconna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 插件",
Expand Down
5 changes: 3 additions & 2 deletions src/nonebot_plugin_alconna/rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4c336d4

Please sign in to comment.